← Math & statistics

Pi Algorithm Race

Run the same pi target through Gregory, Nilakantha, Machin-like, and Chudnovsky formulas. Use fixed time to see who gets furthest, or fixed digits to see who arrives first.

For the learning-first version, start with Pi Approximation Explorer. This page is for side-by-side comparison. When you need a practical decimal string at the end, continue to Pi Digits Generator.

Other languages ja | en | zh-CN | es | pt-BR | fr
3 quick steps
  1. Choose a race mode, keep all four algorithms on, and run the default target once.
  2. Check the winner card, then compare the chart and table together instead of reading one number in isolation.
  3. Load another sample or copy the URL when you want to reuse the same classroom setup.
Race mode

Use the same time budget for every algorithm and compare the number of matching digits reached.

Lower values produce denser chart points. Higher values reduce noise in the log and CSV.

Algorithms

Keep all four selected for the clearest comparison. Remove one only when you want to focus on a specific gap.

Winner
Best digits reached
Fastest to target
Compared algorithms
Mode
Target time
Winner estimate

Race chart

The chart uses elapsed time on the x-axis and matching digits on the y-axis. It is meant for trend reading, not for claiming exact performance on every device.

Comparison table

Algorithm Estimate Absolute error Matching digits Iterations Elapsed ms Status

Teacher notes

FAQ

Why do the algorithms separate so quickly?

They package information about pi very differently, so one extra step does not mean the same amount of progress across methods.

Why is Gregory so slow?

Its series is simple enough to explain from first principles, but each new term improves the estimate only a little.

Why is Chudnovsky faster here?

It converges far more aggressively, so one additional term can add many more correct digits than a basic series.

What is the difference between fixed time and fixed digits?

Fixed time compares how far each algorithm gets within the same budget. Fixed digits compares how long each algorithm needs to reach the same target.

What happens when I press stop?

The current run is cancelled immediately so the page stays responsive, and the last completed values remain visible.

Related calculators