Ten-year-old Mckenna Grace is an actress who plays a math genius in the new movie “Gifted.” (Wilson Webb/Fox Searchlight)

Mckenna Grace doesn’t know how to do college-level calculus like Mary, the 7-year-old she plays in the movie “Gifted,” but math happens to be her favorite subject, too.

“Mary and I do have some things in common,” the 10-year-old actress told KidsPost.

In the new drama, Mckenna plays a first-grade math genius who lives in Central Florida with her Uncle Frank (Chris Evans, who also plays Captain America). Frank doesn’t want Mary to grow up without friends — as his sister, Mary’s dead mother, did — so he sends her to public school. On her first day of school, however, Mary proves just how boring regular classes can be for a truly gifted kid by answering every math problem her teacher can come up with.

“Mary is really a great character. She has a lot of emotions and has a lot going on in her life,” Mckenna explained. “She’s a really gifted little girl in math.”

To prepare for her big role, Mckenna, who has been acting professionally since she was 6, did her own homework — watching award-winning movies suggested by her director, Marc Webb. All of them starred young actors or were about child prodigies (kids who are very advanced at a skill).

Mckenna shares a love of singing with “Gifted” co-star Chris Evans, who plays her Uncle Frank. (Wilson Webb/Fox Searchlight)

“I watched a lot of movies: ‘Paper Moon,’ ‘In America,’ ‘Kramer vs. Kramer,’ ‘I Am Sam,’ which I absolutely loved, and ‘Good Will Hunting,’ ” she said. “I also studied Mary’s character in the script for almost a year.”

While learning about Mary, Mckenna discovered that she could relate to the character. Not only do they both love math, but they are also both only children. They both love to play the piano and sing, too.

Mckenna’s love of singing helped her bond with Evans during the two-month movie shoot in Georgia. In the film, Evans’s character fights to keep his niece from being sent to live with his strict mathematician mother, who has her own ambitions for Mary.

“We had an immediate connection. On the shoot and off the shoot, we were always singing,” she said about Evans. “We were just always hanging out together, singing a few songs from a band called the Presidents of the United States of America: ‘Back Porch’ and ‘Peaches.’ ”

Singing also helped Mckenna with the math in the movie script. In a few scenes, Mary shows off how gifted she is by discussing, writing and solving complicated equations — in one case in front of a professor from a college for math whizzes.

“So my mom and I, we turned it into a song, that’s how I memorized it all,” she said. “It was such a catchy tune. It had to be so I could remember everything.”

Mckenna may not be ready for college-level math, but she does understand the need for an alternative school environment. In Los Angeles, California, where her family lives, Mckenna is home-schooled to accommodate her showbiz schedule. On days when she’s on television or film sets, she’s taught by tutors.

Mckenna arrives at the Teen Choice Awards in Los Angeles, California, on August 13, 2017. The young actress says she would like to work with Emma Watson, who starred in the Harry Potter movies. (Jordan Strauss/Invision/AP)

“On Mondays, I go to a creative-writing workshop with other home-schooled kids,” she said.

But the movie isn’t really about math or school or what qualifies as gifted, Mckenna said: “I think it’s about how family comes in all shapes and sizes, beliefs, colors.”

More about Mckenna

Pets: Two dogs. “Marshmallow is a girl, and she’s like a grumpy old man. Baby Unicorn is a boy, and he’s very happy. He’s such a sweet little dog.”

Favorite book:Where the Red Fern Grows” by Wilson Rawls. “But I cried for three hours after reading it. I thought it was a really sweet story about a boy and his dog.”

Favorite movie: “I love ‘E.T.,’ because he’s so adorable.”

Siblings: None. “I play an only child, and I am an only child.”

Favorite superhero: Captain America. “I loved Captain America even before I worked with him. He’s been my favorite superhero forever.”

Actor she’d most like to work with: Emma Watson. “I loved her so much as Belle in the new ‘Beauty and the Beast.’ She has an amazing singing voice!”

Other film and TV projects: “Fuller House” on Netflix; “Designated Survivor” and “Once Upon a Time” on ABC; and the upcoming movie “I, Tonya,” in which Mckenna plays young competitive figure skater Tonya Harding.