Big Number Calculator
Add, subtract, multiply, divide, take remainders and raise to powers with integers of hundreds of digits — exactly, well past what a normal calculator holds.
Big Number Calculator: with the default inputs, exact result is 121932631137021795226185032733622923332237463801111263526900.
For a power this is the exponent: a whole number from 0 upwards, small enough that the answer stays under 5,000 digits.
- Digits in the result
- 60
- With thousands separators
- 121,932,631,137,021,795,226,185,032,733,622,923,332,237,463,801,111,263,526,900
- Approximately
- 1.219326 × 10^59
- Remainder
- —
- Beyond double precision?
- Yes — it exceeds 9,007,199,254,740,991A JavaScript number is only exact up to 9,007,199,254,740,991.
Assumptions
- Whole numbers only; there is no decimal or fractional mode.
- Division truncates toward zero and the remainder takes the sign of the dividend.
- Operands are capped at 300 digits and results at 5,000, with the size of a power checked before it is computed.
How this is worked out
The formula
Every operation is exact integer arithmetic — no floating point anywhere.
a ÷ b gives the truncated quotient q and a remainder r with a = bq + r,
where r takes the sign of a and |r| < |b|.
a ^ e is computed by squaring: a^13 = a^8 · a^4 · a^1, so an exponent of e
costs about log₂(e) multiplications rather than e of them.
Digit count of a product ≈ digits(a) + digits(b).
Digit count of a power ≈ digits(a) × e. That estimate is what bounds this page:
the size of the answer is checked before it is built, never after.Open How it’s calculated above to see this worked through with your own numbers.
What you enter
- First number
- Free text.up to 320 characters · defaults to "123456789012345678901234567890"
- Operation
- Choose one of 6 options.+ add · − subtract · × multiply · ÷ divide (quotient and remainder) · mod remainder only · ^ raise to a power
- Second number
- For a power this is the exponent: a whole number from 0 upwards, small enough that the answer stays under 5,000 digits.up to 320 characters · defaults to "987654321098765432109876543210"
What you get back
- Exact resultmain answer
- Digits in the result
- With thousands separators
- Approximately
- Remainder
- Beyond double precision?
- A JavaScript number is only exact up to 9,007,199,254,740,991.
What this assumes
- Whole numbers only; there is no decimal or fractional mode.
- Division truncates toward zero and the remainder takes the sign of the dividend.
- Operands are capped at 300 digits and results at 5,000, with the size of a power checked before it is computed.
About this calculator
A normal calculator stores numbers as double-precision floats, which are exact for integers only up to 9,007,199,254,740,991. Past that, digits start silently disappearing: ask a spreadsheet for 12345678901234567 + 1 and it will hand back 12345678901234568 with no complaint even where the true answer differs. This calculator uses exact integer arithmetic instead, so every digit it prints is real.
What it does
Two whole numbers of up to 300 digits each, and six operations: add, subtract, multiply, divide, remainder, and raise to a power. Division gives both the quotient and the remainder, because with integers those are two separate facts. Alongside the exact answer you get the digit count, the number with thousands separators, a scientific-notation summary, and a flag telling you whether an ordinary calculator would have coped.
Where you need this
Cryptography, mostly. RSA keys are products of two large primes; 2048-bit keys are 617-digit numbers. Combinatorics gets there fast too — 100! has 158 digits, and the number of possible chess positions or shuffles of a deck (52! ≈ 8.07 × 10⁶⁷) exceeds anything a float can express. Mersenne numbers, factorial tails, hash arithmetic, and any accounting done in the smallest currency unit over a long horizon all run past the double barrier eventually.
Division and the remainder's sign
For integers, a ÷ b is not one number but two: a quotient and a remainder satisfying a = bq + r. This calculator truncates toward zero, so −17 ÷ 5 is −3 remainder −2 — the convention used by C, Java, JavaScript, Go and Rust. Mathematicians usually prefer the Euclidean version where the remainder is never negative (−17 = 5 × (−4) + 3), and the calculator shows that alternative whenever the signs make it differ.
The limits, and why they exist
Both operands are capped at 300 digits and the answer at 5,000. Powers are the reason: raising a 300-digit number to the power of a million would produce a 180-million-digit answer, and the request would tie up a server for minutes. The size of a power is predicted from digits × exponent before any multiplication happens, and the request is refused up front if it would be too large — so a hostile input fails instantly rather than after the damage is done. Answers longer than 1,200 digits are printed with the middle elided, though the digit count is always the true one.
Exponents must be whole and non-negative: a negative power gives a fraction, which is a different kind of arithmetic. And 0⁰ returns 1, the empty-product convention that makes the binomial theorem and power series work.
Frequently asked questions
▸Why does my spreadsheet get big numbers wrong?
It stores them as 64-bit floats, which are exact only up to 9,007,199,254,740,991 — about 16 digits. Beyond that it keeps the leading digits and rounds the rest, without warning you.
▸How many digits can I use?
Up to 300 in each operand, and the answer is capped at 5,000 digits. Powers are checked for size before being computed, so an impossible request is refused instantly rather than after a long wait.
▸What is −17 mod 5?
This calculator gives −2, following the truncated-division convention used by most programming languages, and also shows the Euclidean answer of 3, which is what number theory means by 17 ≡ 3 (mod 5).
▸Can I use decimals?
No — this is exact integer arithmetic, and decimals are where exactness ends. Multiply through by a power of ten to work in whole units, or use the scientific calculator for floating-point work.
▸What is 0 to the power 0?
1 here. It is the empty product, and it is the value that makes the binomial theorem, power series and combinatorial identities come out right.
Put this calculator on your own site
A working big numbers, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.
Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.
Big Number Calculator by CalculateItNow
The page's own title. The clearest description of what the link leads to.
The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.
Browse every calculator widget·How to add it to WordPress, Squarespace or Wix
Related calculators
The questions people ask next to a big numbers.
Every factor of a number, its prime factorisation, factor pairs, the divisor count and sum, and whether it is prime, perfect, abundant or deficient.
Divide with the full long-division layout: every bring-down, each quotient digit, the remainder, and the decimal with its repeating block marked.
n! computed exactly with big integers up to 1000, in scientific notation beyond, plus the digit count, trailing zeros and the gamma function for non-integers.
Raise any base to any power — negative, fractional or huge — with the expanded multiplication, scientific notation and the rule that applies shown.
Convert any number to scientific, engineering and E notation with chosen significant figures, or expand a × 10ⁿ back to a plain decimal — exactly, no float noise.
a mod b with the quotient and remainder, showing where the mathematical modulo and the % operator in C, Java and JavaScript disagree on negative numbers.