Skip to main content
Number tools100% FreeInstant

Pi Digits Viewer: Pi, e, Phi and Square Root of 2

This free tool computes pi, Euler's number e, the golden ratio and the square root of 2 to up to 5,000 decimal places with exact integer arithmetic. You can also search the digits for any number string.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

Irrational constants never end and never repeat. Seeing hundreds of digits is a fun way to feel what that means.

Choose a constant and how many digits to show.

How to Use This Tool

  1. Enter or paste your input in the box or boxes above.
  2. Choose the options, if there are any.
  3. Press the button to run the tool.
  4. Read the result and use the copy button where one is shown.

How the Calculation Works

Each constant is computed as a big integer scaled by a power of ten with ten extra guard digits. Pi = 16 arctan(1/5) - 4 arctan(1/239) using series. e is the sum of 1/k!. The square root of 2 and of 5 come from Newton iteration on integers, and phi = (1 + root 5) / 2. The guard digits are then cut off.

Worked Example

Pi to 20 places is 3.14159265358979323846. e is 2.71828182845904523536 and the golden ratio is 1.61803398874989484820.

Common Uses

  • Maths classes and Pi Day.
  • Memory challenges.
  • Testing code.
  • Finding your birthday in pi.

Tips and Common Mistakes

  • Search only works within the digits shown.
  • Use more digits for longer searches.
  • Digit counts start after the decimal point.
  • Check the first result against a case you already know, so you can trust the tool for the rest.
  • Nothing you type leaves your device. The work is done by your browser, so it also works with a slow connection once the page has loaded.

Next, you may need the exponent and root calculator, Fibonacci calculator, prime number checker, GCD and LCM calculator.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

Pi uses Machin's formula with big integers, e uses its factorial series, and the roots use integer Newton iteration. No digits are stored in advance.
No. They are cut (truncated), so the last digit shown is exactly the digit of the true value.
It looks for your digit string among the decimals shown and gives its position, counted from the first digit after the point.
Up to 5,000 decimal places, which keeps the page fast.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.