Math calculators

Arbitrary Precision Calculator

Updated Dec 4, 2026 By Infinity Calculator Formulas Sources
Rate
Global Configuration
Precision Mode
Applies to every result instantly.
Rendering digits (Scientific / Floating).
Result Options
Quick Expression
Press Enter to calculate. May reference the variables p, q, r, s, t, v, w, x, y and z.
0.000s
Example Expressions
Variable Workspace
Type an expression, then press → or Tab to evaluate. Expressions may use other variables by letter, and anything that uses a variable updates when it changes.
Result Size by Variable
Order of magnitude (number of digits) of each evaluated result.

Introduction

This arbitrary precision calculator lets you work with very large numbers and exact fractions. In JavaScript, the language that runs in web pages, an ordinary number stays exact only up to 9,007,199,254,740,991, which is 2^53 − 1.1 This one can handle hundreds or even thousands of digits with exact results. You can add, subtract, multiply, divide, raise numbers to large powers, compute factorials, find square roots, and much more.

Type an expression like 2^1000 or 100! into the quick input box and press Calculate to see the full result. Use the ten variables p, q, r, s, t, v, w, x, y and z in the variable workspace to store values and build on them. The calculator supports functions such as sqrt, gcd, log, sin, cos, and factorial, along with constants like pi, e, and phi. You can choose how results display (as fractions, decimals, scientific notation, or even hexadecimal) and adjust precision up to 2,000 decimal places.

Whether you need to check a big exponent, test whether a number is prime, or simply do math beyond what a standard calculator allows, this tool gives you the exact answer fast, right in your browser.

How to Use Our Arbitrary Precision Calculator

This calculator lets you type math expressions with very large or very small numbers and get exact results. You enter expressions, pick how precise and how formatted you want the output, and the calculator returns your answer instantly.

Precision Mode: Choose "Arbitrary" to work to 100 decimal places, or "Fixed" to set the number of decimal places yourself. Arbitrary mode works well for most tasks. Use Fixed mode when you need to control how deep the calculation goes.

Decimal Places: This box appears when you pick Fixed mode. Type a number from 1 to 2000 to set how many decimal places the calculator works to. A lower number runs faster. A higher number gives more detail.

Output Display Format: Pick how your answer looks. "Fixed Decimal" shows a normal number. "Rational" shows exact results as fractions and approximate results, such as square roots, logs and pi, as decimals. "Scientific" uses powers of ten. "Floating" shows a short decimal. "Magnitude" shows the rough size. "Hexadecimal" shows base-16.

Display Digits: Set how many digits show up in Scientific and Floating formats. You can pick from 1 to 200.

Show Primality (P?): Click this button to turn on a tag that tells you if a whole-number result is a prime number or not. The test gives a sure answer for numbers below 318,665,857,834,031,151,167,461.9 A number at or above that bound that passes it has not been proven prime.

Group Digits: Click this button to add thin spaces every three digits in the whole-number part of your results. This makes big numbers easier to read.

Quick Expression: Type any one-off math expression here, like 2^1000 or 100!, and press Enter or click "Calculate" to get your answer right away. You can also click any example chip below the box to load a sample expression.

Variable Workspace: Use these ten rows, one for each of the letters p, q, r, s, t, v, w, x, y and z, to store and chain expressions. Type a formula next to any letter, then press the arrow button or Tab to evaluate it. Variables can reference each other by letter. For example, set p = 2^100 and then set q = p + 1. All dependent results update automatically when you change a value.

Evaluate All / Reset: Click "Evaluate All" to recalculate every variable and the quick expression at once. Click "Reset" to restore all fields back to the default sample values.

What Is Arbitrary Precision Arithmetic?

Most calculators and computers have a limit on how many digits they can handle. Once a number gets too big or has too many decimal places, they round it off, show an error, or give a wrong answer. Arbitrary precision arithmetic removes that limit. It lets you work with numbers that have hundreds, thousands, or even millions of digits and still get an exact result.2

Why Does Precision Matter?

Regular calculators and computer programs store each number in a fixed amount of memory. JavaScript, for example, stores ordinary numbers in the IEEE 754 binary64 format.2 Each of those numbers takes up 64 bits. In that format, 9,007,199,254,740,993 is stored as 9,007,199,254,740,992.1 That works fine for everyday math, but it falls apart with very large or very small numbers. For example, 2 raised to the power of 1000 creates a number with over 300 digits. A normal calculator cannot show the full answer. An arbitrary precision calculator can.

How This Calculator Works

This tool uses rational arithmetic to keep results exact whenever possible. A rational number is one that can be written as a ratio of two integers, like 1/7 or 355/113. Instead of turning fractions into rounded decimals right away, the calculator stores the top number (numerator) and bottom number (denominator) separately. This means no precision is lost during addition, subtraction, multiplication, or division.

For operations like square roots, logarithms, and trigonometric functions, the answer is usually not an exact fraction. The square root of a perfect square stays exact, so sqrt(9/4) gives 3/2. In the other cases, the calculator uses scaled integer math to compute results to 100 decimal places in Arbitrary mode, or to as many as you choose, up to 2,000, in Fixed mode.

Common Uses

Arbitrary precision calculators are useful in number theory, cryptography, and scientific research where rounding errors can cause real problems. With this one you can explore large factorials, test whether huge numbers are prime, or see hundreds of digits of pi. Programmers can use it to check the output of code that works with big integers.

Key Features

  • Big number support: handle numbers with thousands of digits without overflow.
  • Exact fractions: results are kept as exact ratios (like 1/3) instead of rounded decimals (like 0.333), and the Rational format shows them as fractions.
  • Variable workspace: store results in ten variables (p, q, r, s, t, v, w, x, y and z) and reference them in other expressions.
  • Built-in functions: factorial, square root, GCD, LCM, logarithms, trig functions, and more.
  • Multiple output formats: view results as fractions, decimals, scientific notation, or hexadecimal.
  • Primality testing: quickly check whether a whole number is prime.

Formulas used

Pi (Machin's formula) 4
\pi = 16\arctan\!\left(\frac{1}{5}\right) - 4\arctan\!\left(\frac{1}{239}\right)
Exponential (Taylor series with argument reduction) 5
e^{x} = \sum_{k=0}^{\infty} \frac{x^{k}}{k!}
Natural logarithm (series) 6
\ln v = 2\sum_{k=0}^{\infty} \frac{1}{2k+1}\left(\frac{v-1}{v+1}\right)^{2k+1}
Sine (Taylor series) 7
\sin x = \sum_{k=0}^{\infty} \frac{(-1)^{k}\, x^{2k+1}}{(2k+1)!}
Cosine (Taylor series) 7
\cos x = \sum_{k=0}^{\infty} \frac{(-1)^{k}\, x^{2k}}{(2k)!}
General real power 5
a^{b} = e^{\,b \ln a}
Square root (Newton's method) 8
x_{n+1} = \frac{1}{2}\left(x_n + \frac{N}{x_n}\right)
Golden ratio 3
\phi = \frac{1 + \sqrt{5}}{2}

Frequently asked questions

What does arbitrary precision mean?

Arbitrary precision means the calculator keeps as many digits as a number needs. Whole numbers and fractions stay exact however long they get, and square roots, logarithms and trig functions that have no exact fraction are worked out to 100 decimal places in Arbitrary mode, or to the number you set, up to 2,000, in Fixed mode.

How do I calculate a factorial?

You can use either the ! symbol or the factorial() function. For example, 100! and factorial(100) both give you 100 factorial. The input must be a non-negative whole number.

Sources

  1. ECMAScript 2027 Language Specification (ECMA-262), 21.1 Number Objects. Ecma International. § 21.1.2.6 Number.MAX_SAFE_INTEGER. Accessed September 28, 2026.
  2. ECMAScript 2027 Language Specification (ECMA-262), 6.1 ECMAScript Language Types. Ecma International. § 6.1.6.1 The Number Type. Accessed September 28, 2026.
  3. Sloane NJA. A001622: Decimal expansion of golden ratio phi (or tau) = (1 + sqrt(5))/2. The OEIS Foundation. A001622. Accessed September 28, 2026.
  4. O'Connor JJ, Robertson EF. John Machin (1680 - 1751) - Biography. MacTutor History of Mathematics. University of St Andrews. 2003. Accessed September 28, 2026.
  5. NIST Digital Library of Mathematical Functions, §4.2 Definitions. National Institute of Standards and Technology. Eqs. 4.2.19, 4.2.26. Accessed September 28, 2026.
  6. NIST Digital Library of Mathematical Functions, §4.6 Power Series. National Institute of Standards and Technology. Eq. 4.6.4. Accessed September 28, 2026.
  7. NIST Digital Library of Mathematical Functions, §4.19 Maclaurin Series and Laurent Series. National Institute of Standards and Technology. Eqs. 4.19.1, 4.19.2. Accessed September 28, 2026.
  8. Strang G, Herman E. Calculus Volume 1, 4.9 Newton's Method. OpenStax. 2016;§ 4.9. Accessed September 28, 2026.
  9. A014233: Smallest odd composite number that is a strong pseudoprime to each of the first n prime bases. The OEIS Foundation. A014233, a(12). Accessed November 22, 2026.