An ordinary calculator, a spreadsheet or a phone keeps about 15 or 16 significant digits. Beyond that it silently rounds, which is why appears as something like 1.6069E+60 and why adding 1 to a 20-digit number may change nothing at all. This big number calculator works differently: every number is stored as an arbitrary-length integer, so the result you see is exact down to the last digit.
It is a large number calculator for the jobs where approximations are not good enough: checking a cryptography exercise, computing or in full, multiplying two 40-digit numbers, dividing with 200 decimal places, or finding the remainder of a huge number modulo a prime. Operands may have up to 5000 digits each and results up to 20000 digits, which covers almost anything you would type by hand or paste from a document.
Alongside the exact answer you get the number of digits, the count of decimals and a short scientific-notation form, so you can tell at a glance how massive the number really is. For everyday arithmetic with short numbers, the scientific calculator is quicker; for factorial theory see the factorial calculator.
How to use this calculator
- Type or paste the first number a. Spaces, apostrophes and thousands commas are ignored, a leading minus sign is allowed, and short forms such as 1e40 (1 followed by 40 zeros) are accepted.
- Choose the operation: addition, subtraction, multiplication, division, power, remainder (mod), GCD and LCM, factorial or square root.
- Enter the second number b when the operation needs one. For a power, b is the whole-number exponent.
- For division, negative powers and square roots, choose how many decimal places you want (up to 1000).
- Read the exact result, then its digit count and scientific notation. Use the copy button to paste the full value elsewhere.
The formula
Every number is held as an integer together with a decimal scale , meaning . Addition and subtraction first bring both numbers to the same scale; multiplication multiplies the integers and adds the scales:
Division to decimal places computes , with halves rounded away from zero. A power with a whole exponent is repeated multiplication done by squaring. The factorial is , multiplied in a balanced tree so that large factors meet late. The remainder uses Euclidean division, with . The GCD comes from Euclid's algorithm, , and . Square roots use Newton's method on integers, .
No step goes through floating-point numbers, so no digit is ever lost.
Worked example
Powers of two. has 61 digits:
1606938044258990275541962092341162602522202993782792835301376
In scientific notation that is 1.606938044 × 10⁶⁰, which is all an ordinary calculator would show.
A factorial. = 265252859812191058636308480000000 (33 digits; the seven trailing zeros come from the pairs 2 × 5 among the factors). For comparison, has 158 digits, about 9.332621544 × 10¹⁵⁷.
A long division. to 50 decimal places gives 0.33333333333333333333333333333333333333333333333333; the calculator adds a note that the expansion repeats forever.
Multiplying two 30-digit numbers. The default values give 121932631137021795226185032733622923332237463801111263526900, a 60-digit product. Euclid in action: the GCD of 1071 and 462 is 21 and their LCM is 23562.
Why ordinary calculators fail on very large numbers
Most software stores numbers in IEEE 754 double precision: 53 bits of mantissa, roughly 15–17 decimal digits. Every integer above can no longer be represented exactly, so a calculator for very large numbers needs a different representation. This tool uses arbitrary-precision integers (the JavaScript BigInt type), whose size is limited only by memory; the limits of 5000 input digits and 20000 result digits are there to keep the page responsive on a phone.
That is what makes it a genuine very big number calculator rather than a big calculator with a large display: whether you need a massive number such as or a large digit calculation such as a 25-digit card-style checksum, every digit printed is correct.
How big can the numbers be?
| Operation | Limit |
|---|---|
| Each operand | 5000 digits |
| Any result | 20000 digits |
| Factorial | ( has 16,326 digits) |
| Decimal places | up to 1000 |
A power is refused before it is computed when its result would exceed the limit, so you get a clear message instead of a frozen tab. To read or write numbers in powers of ten, the scientific notation calculator helps, and the exponent calculator handles fractional and negative exponents numerically.
Frequently asked questions
Is this calculator for huge numbers really exact?
Yes for addition, subtraction, multiplication, whole-number powers, factorials, remainders and GCD: these results are exact integers or exact decimals. Division and square roots are exact when the answer ends within the chosen number of decimals; otherwise they are rounded at the last decimal and a note says so.
How many digits does 100 factorial have?
100! has 158 digits and ends with 24 zeros. Pick the factorial operation, type 100 and the full value appears.
Can I paste numbers with spaces or commas?
Yes. Spaces, apostrophes, underscores and thousands commas such as 1,234,567 are ignored. Use a dot for the decimal point; one comma alone, as in 3,5, is read as a decimal comma.
How does the modulo of a negative number work here?
The calculator uses Euclidean division, so the remainder is always between 0 and |b| − 1. For example −7 mod 3 = 2, because −7 = (−3) × 3 + 2. Some programming languages return −1 instead.
Why is there a limit at all?
Exact arithmetic on numbers with tens of thousands of digits is fast, but displaying and copying them is not. The 20000-digit cap keeps the page smooth on phones while still allowing results far beyond any pocket calculator.
Sources
- MDN Web Docs — BigInt (arbitrary-precision integers)
- OEIS A000142 — Factorial numbers
- Weisstein, Greatest Common Divisor — Wolfram MathWorld
- Weisstein, Factorial — Wolfram MathWorld
Last updated: