πculator

Input

Control

Speed Limit

Slow
Fast

Decimal Places

Algorithm

Output


  

Code

πculator Help

Welcome to πculator! This web app allows you to approximate π (pi), the ratio of a circle’s circumference to its diameter. It also provides its own JavaScript code so you can try it for yourself.

Usage

Select the number of decimal places to approximate and your preferred algorithm for the computation among the options available. Changing the number of decimal places or the algorithm will reset the approximation.

Use the “Run Continuously” button () to have the page continually update with a more accurate version of π by iterating the algorithm at a rate controlled by the “Speed Limit” slider. The iteration speed will be limited by the speed of the algorithm.

Use the “Do One Iteration” button () to update the page with only the next iteration of the algorithm. This button is independent of the “Speed Limit”.

Use The “Reset” button () to reset the approximation.

As the calculations progress, πculator shows how much each decimal place has changed from the previous iteration. This is represented in the background colour of the individual decimal places. If the background is white, the decimal place has not changed, otherwise, the background colour will range from lime green to purple, lime green being a smaller change, purple being a larger change.

Colours corresponding to change in decimal place value: 0123456789

Terminology

Decimal Places

How many digits of π to be approximated. Increasing the value of this number will slow down calculations.

Algorithm

The mathematical procedure for approximating π. In the πculator, the algorithms are identified by the names of their creators. Some such examples are "Chudnovsky" and "Leibniz".