Saved

Press the star next to a tool's name to save it.

All my tools

Pi Calculator

Use this pi calculator to get exact digits of π up to 2,000 decimal places, see how close a fraction or decimal is to π, and work out a circle's circumference and area.

Restored your last values ·

Choose Digits of pi and enter how many decimal places you want, up to 2,000. Choose Check an approximation to see how close a fraction or decimal is to pi, or leave it blank for a list of common ones. Choose Circle to find the circumference and area from a radius.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Choose what you want, enter the number, then press Calculate.

A pi calculator gives you the digits of π to as many places as you need, tests how close a fraction such as 22/7 or 355/113 is to π, and finds the circumference and area of a circle from its radius. Choose a mode, enter a number, and press the button. The digits are computed in your browser with exact whole-number arithmetic, so up to 2,000 decimal places are correct to the last digit.

How to use the pi calculator

  1. Choose Digits of pi, Check an approximation or Circle from the radius.
  2. Enter the number of decimal places, a fraction to test, or a radius.
  3. Press Calculate.

What pi is

The Wikipedia article on pi says that π is commonly defined as the ratio of a circle's circumference C to its diameter d, so π = C ÷ d.[1] The page shows its value as 3.1415926535897932384626433… and says that it is approximately equal to 3.14159.[1] The ratio is the same for every circle, which is why a single number appears in the formulas for the circumference, 2πr, and the area, πr². The number is irrational, so its decimal digits never end or repeat, and no fraction is exactly equal to it.

How the calculator finds the digits

The calculator uses Machin's formula. The Wikipedia page on Machin-like formulas gives it as π ÷ 4 = 4 arctan(1/5) − arctan(1/239), and attributes it to John Machin, whose formula William Jones published in 1706 with the first 100 digits of π.[2] The arctangent is computed from its series, arctan x = x − x³ ÷ 3 + x⁵ ÷ 5 − x⁷ ÷ 7 + ⋯.[2] The page says that applying the series directly to arctan 1 would need five billion terms to get 10 correct decimal digits, while Machin's formula needs only six terms.[2] The calculator multiplies Machin's formula by 4, to get π = 16 arctan(1/5) − 4 arctan(1/239), and sums the series with large whole numbers that carry a dozen extra guard digits. The digits are truncated, not rounded, at the place you ask for. For 50 decimals the result is 3.14159265358979323846264338327950288419716939937510.

Common approximations

A few fractions and decimals are used for π in everyday work. The number 3 is the roughest, with an error of 0.1416. The decimal 3.14 is within 0.0016. The fraction 22/7 is 3.142857, which is too large by about 0.00126, and it gets two decimal places right. The decimal 3.1416 is within 0.0000073. The fraction 355/113 is 3.14159292, which is too large by only 0.00000027, and it matches π to six decimal places. A larger fraction, 103993/33102, matches to nine. The approximation mode shows the value, the error, the percent error and the number of correct decimal places for any fraction or decimal that you type.

How many digits do you need?

Very few. With 15 digits, the circumference of the Earth can be worked out to a tiny fraction of a millimeter. NASA scientists have said that a few dozen digits are plenty for navigating spacecraft. The reason to compute thousands of digits is not use, but curiosity and the testing of computers and algorithms. The calculator's limit of 2,000 decimal places is enough to see the digits, copy them, and check them against a reference.

Using pi in circles

For a circle of radius 2, the diameter is 4, the circumference is 2π × 2, about 12.5664, and the area is π × 2², also about 12.5664. The two numbers match here only because the radius is 2. For radius 1, the circumference is 6.28319 and the area is 3.14159. The circle mode uses the double-precision value of π, which is accurate to about 15 digits and is more than enough for any measurement.

Why the digits do not repeat

A number whose decimal expansion ends or repeats is a ratio of whole numbers. Because π is irrational, its digits do no such thing, and it takes more digits to tell it from a given fraction the closer the fraction is. The continued fraction of π gives the best fractions for each size of denominator, and 22/7, 333/106, 355/113 and 103993/33102 are among the first of them. That is why 355/113 is so much better than other fractions of its size.

A worked example of checking an approximation

Suppose a recipe or a drawing uses 3.1416 for π. Type 3.1416 in the approximation mode. The value is 3.1416, the error against π is about 7.3 × 10⁻⁶, which is a percent error of 0.00023 percent, and it matches π to four decimal places. Now try 3.14: the error is 1.6 × 10⁻³ and two places match. A good test is to compare 22/7 and 3.1416, since the decimal is closer in spite of having fewer digits than people expect. For most school and workshop tasks, 3.1416 or the calculator's own value of π is more than accurate enough.

Pi Day and memorizing digits

Many people celebrate March 14, written 3/14, as Pi Day, and some memorize the digits. The record for reciting digits from memory is in the tens of thousands. If you want to test your memory, ask the calculator for 100 decimals, learn them in the groups of ten that it shows, and check yourself against the list.

Common mistakes

  • Rounding the digits that the calculator truncates. Round yourself if you need a rounded value.
  • Using 22/7 as exact. It is an approximation, good to two decimals.
  • Confusing the radius and the diameter. The circumference is πd or 2πr.
  • Counting the 3. The number of decimal places does not include the whole-number part.

What next

Use this often? Add Pi to your Home screen.

Frequently asked questions

What is a pi calculator?

A tool that gives the digits of π to a chosen number of decimal places, tests how close a fraction is to π, and uses π to find a circle's circumference and area.

How accurate are the digits?

Every digit is exact, up to 2,000 decimal places. They are computed with whole-number arithmetic and Machin's formula, and cut off, not rounded.

How good is 22/7 as an approximation of pi?

It is 3.142857, which is too large by about 0.00126 and matches pi to two decimal places. 355/113 is much closer and matches to six.

What is Machin's formula?

π ÷ 4 = 4 arctan(1/5) − arctan(1/239). It converges quickly, which is why it was used for hand and early computer calculations.

Is pi a fraction?

No. It is irrational, so no ratio of whole numbers equals it, and its decimal digits never end or repeat.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools