- Sign in with Google
*play_apps*Library & devices*payment*Payments & subscriptions*reviews*My Play activity*redeem*Offers*settings*Settings

4.4*star*

884 reviews

100K+

Downloads

Everyone*info*

RealPi provides some of the best and most interesting Pi calculation algorithms out there. This app is a benchmark which tests your Android device's CPU and memory performance. It calculates the value of Pi to the number of decimal places you specify. You can view and search for patterns in the resulting digits to find your birthday in Pi or find famous digit sequences like the "Feynman Point" (six 9's in a row at the 762nd digit position). There are no hard limits on the number of digits, if you experience a freeze please see "Warnings" below.

Leave comments with your Pi calculation time on the AGM+FFT formula for 1 million digits. Also the most digits you can calculate, which tests your phone's memory. The author's Nexus 6p takes 5.7 sec for 1 million digits. Note that the AGM+FFT algorithm works in powers of 2, so calculating 10 million digits takes just as much time and memory as 16 million digits (the internal precision is shown in the output). On multi-core processors RealPi tests the performance of a single core. For accurate benchmark timing ensure that no other applications are running and your phone is not hot enough to throttle the CPU.

Search function:

Use this to find patterns in Pi like your birthday. For best results calculate at least one million digits using the AGM + FFT formula, then select the "Search for Patterns" menu option.

Here's a summary of the available algorithms:

-AGM + FFT formula (Arithmetic Geometric Mean): This is one of the fastest available methods to calculate Pi, and is the default formula used by RealPi when you press "Start". It runs as native C++ code and is based on Takuya Ooura's pi_fftc6 program. For many millions of digits it can require a lot of memory, which often becomes the limiting factor in how many digits you can calculate.

-Machin's formula: This formula was discovered by John Machin in 1706. It's not as fast as AGM + FFT, but shows you all the digits of Pi accumulating in real time as the calculation proceeds. Choose this formula in the settings menu and then press "Start". It's written in Java using the BigDecimal class. Calculation times may start to get long around 200,000 digits, but on modern phones you can calculate and view 1 million digits using Machin if you're patient.

-Nth digit of Pi formula by Gourdon: This formula shows that it's possible (surprisingly) to calculate decimal digits of Pi "in the middle" without calculating the preceding digits, and needs very little memory. When you press the "Nth Digit" button RealPi determines 9 digits of Pi ending with the digit position you specify. It runs as native C++ code and is based on Xavier Gourdon's pidec program. Although it's faster than Machin's formula it can't beat the AGM + FFT formula in speed.

-Nth digit of Pi formula by Bellard: Gourdon's algorithm for the Nth digit of Pi can't be used for the first 50 digits, so this formula by Fabrice Bellard is used instead if digits < 50.

Other Options:

If you enable the "Calculate when in sleep" option RealPi will keep calculating while your screen is off, useful when calculating many digits of Pi. While not calculating or after the calculation finishes your device will go into deep sleep as usual.

Warnings:

This app can drain your battery quickly when doing a long calculation, especially if the "Calculate when in sleep" option is on.

Calculation speed depends on your device's CPU speed and memory. At very large numbers of digits RealPi may terminate unexpectedly or not produce an answer. It could also take a very long time to run (years). This is due to the large amount of memory and/or CPU time needed. The upper limit on the number of digits you can calculate depends on your Android device.

Changes to the "Calculate when in sleep" option take effect for the next Pi calculation, not in the middle of a calculation.

Leave comments with your Pi calculation time on the AGM+FFT formula for 1 million digits. Also the most digits you can calculate, which tests your phone's memory. The author's Nexus 6p takes 5.7 sec for 1 million digits. Note that the AGM+FFT algorithm works in powers of 2, so calculating 10 million digits takes just as much time and memory as 16 million digits (the internal precision is shown in the output). On multi-core processors RealPi tests the performance of a single core. For accurate benchmark timing ensure that no other applications are running and your phone is not hot enough to throttle the CPU.

Search function:

Use this to find patterns in Pi like your birthday. For best results calculate at least one million digits using the AGM + FFT formula, then select the "Search for Patterns" menu option.

Here's a summary of the available algorithms:

-AGM + FFT formula (Arithmetic Geometric Mean): This is one of the fastest available methods to calculate Pi, and is the default formula used by RealPi when you press "Start". It runs as native C++ code and is based on Takuya Ooura's pi_fftc6 program. For many millions of digits it can require a lot of memory, which often becomes the limiting factor in how many digits you can calculate.

-Machin's formula: This formula was discovered by John Machin in 1706. It's not as fast as AGM + FFT, but shows you all the digits of Pi accumulating in real time as the calculation proceeds. Choose this formula in the settings menu and then press "Start". It's written in Java using the BigDecimal class. Calculation times may start to get long around 200,000 digits, but on modern phones you can calculate and view 1 million digits using Machin if you're patient.

-Nth digit of Pi formula by Gourdon: This formula shows that it's possible (surprisingly) to calculate decimal digits of Pi "in the middle" without calculating the preceding digits, and needs very little memory. When you press the "Nth Digit" button RealPi determines 9 digits of Pi ending with the digit position you specify. It runs as native C++ code and is based on Xavier Gourdon's pidec program. Although it's faster than Machin's formula it can't beat the AGM + FFT formula in speed.

-Nth digit of Pi formula by Bellard: Gourdon's algorithm for the Nth digit of Pi can't be used for the first 50 digits, so this formula by Fabrice Bellard is used instead if digits < 50.

Other Options:

If you enable the "Calculate when in sleep" option RealPi will keep calculating while your screen is off, useful when calculating many digits of Pi. While not calculating or after the calculation finishes your device will go into deep sleep as usual.

Warnings:

This app can drain your battery quickly when doing a long calculation, especially if the "Calculate when in sleep" option is on.

Calculation speed depends on your device's CPU speed and memory. At very large numbers of digits RealPi may terminate unexpectedly or not produce an answer. It could also take a very long time to run (years). This is due to the large amount of memory and/or CPU time needed. The upper limit on the number of digits you can calculate depends on your Android device.

Changes to the "Calculate when in sleep" option take effect for the next Pi calculation, not in the middle of a calculation.

Updated on

Safety starts with understanding how developers collect and share your data. Data privacy and security practices may vary based on your use, region, and age. The developer provided this information and may update it over time.

No data shared with third parties

Learn more about how developers declare sharing

No data collected

Learn more about how developers declare collection

4.4

884 reviews

A Google user

- Flag inappropriate
- Show review history

March 19, 2020

Oh wow. 1.9 sec to the dot on a Razer Phone 2 for Pi to one million digits. Phenomenal! This app is super cool and the fact it has a little Bing bing bing bong bong noise is fun. (beware! It might scare your cat if you have your media volume turned up and you're not expecting it 🤣) PS. 56.42 seconds for 10million digits? Insane. Nice app and this gave me a new perspective on my phone's real raw power.

9 people found this review helpful

Did you find this helpful?

A Google user

- Flag inappropriate
- Show review history

January 14, 2020

I like it. Would be cool to have a website that shows data for all smartphones to compare. My phone: Samsung Galaxy 8 Active - 1 million was 2.97 seconds. I will use the app to check how my cpu is doing over time and health.

24 people found this review helpful

Did you find this helpful?

A Google user

- Flag inappropriate

January 27, 2019

When the value is calculated, there is a really sweet sound played at the end. Could you please tell me more about it? The horrible and sad notifications that I get would be more bearable if I get to listen to that sweet symphony.

17 people found this review helpful

Did you find this helpful?

-Optimized Machin's formula code, now ~10 times as fast and uses less memory.

-Made Machin digit display smoother on Android 6+

-Minor updates for Android 12

-Made Machin digit display smoother on Android 6+

-Minor updates for Android 12

Play Pass

Play Points

Gift cards

Redeem

Refund policy

Parent Guide

Family sharing

United States (English (United States))