Math Enthusiasts Unite to Have Rover Calculate Pi on the Moon

Later this year a tiny rover will carry out an unusual lunar task

Metallic rover roughly the size of a shoebox sitting on a table

Astrobotic’s CubeRover is slated to land on the moon in late 2025.

NASA/Kim Shiflett

While traversing the moon’s surface after a planned launch later this year, Astrobotic’s shoebox-sized CubeRover will have some downtime: extra computing power that won’t always be in use. And thanks to a hugely successful crowdfunding campaign, it will use that spare time for an age-old nerdy pursuit—calculating the value of pi.

When they realized that CubeRover wouldn’t need all of its computing time, engineers at the private spaceflight company Astrobotic e-mailed Matt Parker, a math YouTuber and stand-up comedian, asking if he could think of a good use for it. Given his history of calculating pi in creative and curious ways on his channel, Parker didn’t have to think long. “I don’t think I’d even gotten to the bottom of the e-mail,” Parker says. His first thought was “Pi on the moon”; his second thought was “Is this a scam?”

After determining the e-mail was legitimate and hastily responding, Parker got to work. He wanted to be the first to calculate pi on the moon, but it had to be more meaningful than using the rover like any old computer. Instead his proposed code would incorporate random numbers generated by the moon data that the rover will collect to calculate increasingly accurate values of pi. There are many ways to calculate pi (π) with random numbers, and Parker is still choosing between options; for instance, the rover could use random numbers to signify coordinates inside a 2 × 2 square and calculate the proportion of points that end up within a circle with a radius of 1 that is embedded in that square. That number will approach π/4: the area of the unit circle divided by the area of the square. Parker could similarly use the proportion of random points in three dimensions that land within a unit sphere. Another option uses the formula for the surface area of a section of a sphere, which is especially alluring because it involves charting a random path that is much like the path a rover might take on the moon’s surface.


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


Graphic shows how a circle with a radius of 1 inside a 2-by-2 square with points placed at random coordinates can be used to estimate the value of pi.

Amanda Montañez

Astrobotic officials were willing to do the project without making a profit but projected significant engineering costs to integrate the code into the rover and ensure it doesn’t interfere with the mission’s primary directive. If Parker could come up with $150,000, a small corner of the rover could be his. So he took to YouTube and the crowdfunding site Kickstarter and made a plea to his audience, hoping they could help make his dream come true. Just four hours after his announcement he had already exceeded his goal. Though he was initially taken by surprise by the support, Parker suspects he understands why people were so quick to rally around his project. “People love being part of a community,” he says, emphasizing how the Internet brings math enthusiasts together. “Maybe you were one of only a handful of students at school who loved math. But then, if you didn’t do math for a career afterward, you’d never really realize how many other people love it.... [Now] there’s a big nerdy community out there who have all found each other.”

Will calculating pi on the moon enable any novel insight or scientific discovery? No. But according to Parker, that’s part of the point. “People have this weird impression that math is both useful [and] not for them.... I want to get across the opposite of that. Math can be useless. You can do it for fun, and it is for everyone.” Math’s cognitive and social benefits are maximized, he says, when people do it for its own sake. He plans to collaborate with schools on this project, allowing any group of students who can prove they calculated the value of pi by hand to get involved. So far, Parker says, almost 100 schools and more than 2,000 students have signed on to participate.

Andrea Davis, project manager and lead mechanical engineer for the rover at Astrobotic, is especially excited to get students involved: “I’m hoping that a kid might see somebody like me and be like, ‘I can do that too. I can be a rover designer. I can put stuff on the moon, and I’m actively doing it right now with the calculation of pi.’”

Emma R. Hasson is Scientific American’s Games ace and a Ph.D. candidate in mathematics at the City University of New York Graduate Center with expertise in math education and communication. Hasson was also a 2025 AAAS Mass Media Fellow at Scientific American.

More by Emma R. Hasson

It’s Time to Stand Up for Science

If you enjoyed this article, I’d like to ask for your support. Scientific American has served as an advocate for science and industry for 180 years, and right now may be the most critical moment in that two-century history.

I’ve been a Scientific American subscriber since I was 12 years old, and it helped shape the way I look at the world. SciAm always educates and delights me, and inspires a sense of awe for our vast, beautiful universe. I hope it does that for you, too.

If you subscribe to Scientific American, you help ensure that our coverage is centered on meaningful research and discovery; that we have the resources to report on the decisions that threaten labs across the U.S.; and that we support both budding and working scientists at a time when the value of science itself too often goes unrecognized.

In return, you get essential news, captivating podcasts, brilliant infographics, can't-miss newsletters, must-watch videos, challenging games, and the science world's best writing and reporting. You can even gift someone a subscription.

There has never been a more important time for us to stand up and show why science matters. I hope you’ll support us in that mission.

Thank you,

David M. Ewalt, Editor in Chief, Scientific American

Subscribe