Frank Adler (Chris Evans) is a single man raising his seven-year-old niece Mary (Mckenna Grace). Although she was home schooled and wants to keep being taught at home, Frank decides to send Mary to school so she can find friends of her own age and learn to be social.
Her teacher, Bonnie (Jenny Slate), quickly realizes Mary is a mathematical genius. She and the principal tell Frank his niece would be better off at a school for gifted youngsters. Frank refuses, saying he promised his sister he would give Mary a normal life. As it turns out, Mary's mother was a mathematical wiz who didn't get much of a childhood because of her abilities.
Frank's mother Evelyn (Lindsay Duncan) disagrees with her son about Mary's schooling and decides to petition the court to get custody of the little girl. Frank, who loves Mary deeply and wants to do what's best for her, fights to retain his rights to raise his little niece.