A 13-year-old girl finds a mathematical error in a temple's wooden tablet during the Edo period. That one mistake becomes the thread that unravels how a young mind learns to see the world differently than everyone around her. The film trusts you to understand that intellect isn't a superpower, it's a lonely thing, especially when you're the only one in the room who notices what everyone else missed.
Thirteen-year-old Aki is on a pilgrimage to Sensou-ji, the Buddhist temple in Tokyo's Asakusa district, when she spots a mistake in the temple's sangaku. Word of her sharp mind spreads until it reaches Arima Yoriyuki, lord of the Kurume Domain and famous in his own right for approximating pi as a fraction. He engages her to teach arithmetic to the domain's princess, though she is not the only one he hires. Aki then faces other gifted prodigies in a mathematics contest, hoping to earn enough money to someday open a school where poor children can learn arithmetic too. The film adapts Endo Hiroko's 1973 children's novel, a story the author drew from a tale her father told her when she was young.