Big Number Calculator
This big number calculator adds, subtracts, multiplies, divides, raises to a power and takes the modulo of numbers of any length, with every digit kept exactly. No rounding, no scientific notation, and a warning when an ordinary calculator would have lost accuracy.
How to use the big number calculator
- Type or paste the first number. There is no digit limit, and commas and spaces in what you paste are ignored.
- Type the second number.
- Pick the operation: +, −, ×, ÷, power or mod.
- Read the full answer, digit for digit, as it updates.
Two details worth knowing. Powers take whole-number exponents only, so 2 to the power 100 is fine but a fractional exponent is not. Division is carried out exactly to 30 decimal places, which is far past the point where a normal calculator has given up.
When the same calculation would have gone wrong in ordinary floating-point arithmetic, the result says so and shows you the incorrect answer you would otherwise have seen. That comparison is usually more convincing than any explanation.
Why ordinary calculators go wrong past 15 digits
Almost every calculator app, spreadsheet and programming language stores numbers as double-precision floating point. A double has 64 bits: one for the sign, 11 for the exponent and 52 for the digits themselves. Those 52 bits, plus one implied leading bit, give 53 bits of precision, which works out at roughly 15 to 17 significant decimal digits.
Above that limit, integers start to disappear. There is no way to store 9,007,199,254,740,993, so it silently becomes 9,007,199,254,740,992. Beyond 2⁵⁴ only even numbers survive; beyond 2⁵⁵ only multiples of 4, and so on. Nothing warns you. The calculator does not error, it just answers a slightly different question than the one you asked.
JavaScript, which runs in every browser, uses doubles for all ordinary numbers, which is why Number.MAX_SAFE_INTEGER is exactly 9,007,199,254,740,992. Spreadsheets are stricter still: many display only 15 significant digits and quietly zero out anything past that, so a 16-digit account number pasted into a cell can come back with a different final digit.
Example: adding 1 to a 20-digit number
The exact answer differs from the floating-point one by 723, and nothing on screen suggests a problem.
This calculator does not use floating point at all. It works digit by digit in exact integer arithmetic, the same way you would on paper, so a 200-digit product is 200 correct digits.
Why 0.1 + 0.2 does not equal 0.3
The problem is not limited to huge numbers. Floating point stores values in binary, and most decimal fractions have no exact binary form, in the same way that 1/3 has no exact decimal form.
That is not a bug in any particular calculator. Neither 0.1 nor 0.2 can be written exactly in binary, so each is stored as the nearest available value. Add the two approximations and the small errors survive into the answer. Test 0.1 + 0.2 == 0.3 in almost any programming language and it comes back false.
The same effect explains why a spreadsheet total of a long column of prices can end up a hundredth of a cent off, and why money is usually stored in whole cents rather than dollars. A tenth is awkward in binary; a hundredth is no better.
Exact answers next to floating-point answers
Each row below is a calculation where the exact result and the floating-point result differ. The wrong answers are not random noise; they are the nearest value a 53-bit number can hold.
| Calculation | Exact answer | What floating point stores instead |
|---|---|---|
| 2⁵³ + 1 | 9,007,199,254,740,993 | 9,007,199,254,740,992 |
| 0.1 + 0.2 | 0.3 | 0.30000000000000004 |
| 3⁴⁰ | 12,157,665,459,056,928,801 | 12,157,665,459,056,928,768 |
| 7³⁰ | 22,539,340,290,692,258,087,863,249 | 22,539,340,290,692,256,209,305,600 |
| 12,345,678,901,234,567,890 + 1 | 12,345,678,901,234,567,891 | 12,345,678,901,234,567,168 |
| 1,234,567,890,123,456,789² | 1,524,157,875,323,883,675,019,051,998,750,190,521 | 1,524,157,875,323,883,517,734,620,550,918,045,696 |
| 80 choose 40 | 107,507,208,733,336,176,461,620 | 107,507,208,733,336,184,815,616 |
Look at the third row. Both answers have 20 digits and agree for the first 17 of them, which is exactly the failure mode that makes floating-point errors so easy to miss. The number looks right at a glance, it is the right size, and it is wrong.
Some tools hide the damage further by printing the stored value in a shortened form, so 12,157,665,459,056,928,768 appears as 1.2157665459056929e+19. The digits past the seventeenth were gone before the display ever rounded them.
Where exact big-number math actually matters
Long numbers turn up more often than people expect, and in most of these cases an answer that is close is worth nothing.
- Factorials. 20! is 2,432,902,008,176,640,000 and still fits in a double. 21! does not. By 100!, the answer has 158 digits, and the number of ways to shuffle a standard deck of cards, 52!, has 68.
- Powers of two. 2¹⁰⁰ is 1,267,650,600,228,229,401,496,703,205,376. Powers of two survive in floating point because they are exactly representable, but add 1 to one of them and the extra digit vanishes.
- Cryptographic key sizes. An RSA-2048 modulus is a 617-digit decimal number. Key generation, modular exponentiation and signature checks all depend on every one of those digits being right.
- Combinatorics. Counting problems grow explosively. The number of 40-item subsets of an 80-item set is 107,507,208,733,336,176,461,620, and floating point gets the last five digits wrong.
- Long identifiers. Credit card numbers, IMEI numbers, order and transaction IDs are digit strings, not quantities. A 16-digit card number can exceed 2⁵³, and paste one into a spreadsheet cell formatted as a number and the final digits may change.
- Money at scale. National budgets, market capitalizations and interest calculations over long periods all accumulate rounding drift if the arithmetic is approximate.
If your problem is the opposite — you want fewer digits, deliberately — that is rounding rather than exact arithmetic, and the significant figures calculator handles it. For step-by-step long multiplication on ordinary numbers, use the multiplication calculator.
Division, powers and modulo on huge numbers
The three operations that behave slightly differently from ordinary arithmetic are worth spelling out.
Division to 30 decimal places
Exact division of integers often produces an infinitely repeating decimal, so a cut has to happen somewhere. It happens at 30 decimal places, which is roughly double what a standard calculator can hold in total.
Example: 1 ÷ 7 to 30 places
Powers with whole-number exponents
Raise any number to any whole exponent and every digit of the result is kept. Powers grow fast, so this is where the digit counts become dramatic.
Modulo
Modulo gives the remainder after division, and on big numbers it is the backbone of cryptography, hashing and checksum digits. The result stays small even when the inputs are enormous.
For remainder work on everyday-sized numbers, including negative dividends, the remainder calculator shows the quotient alongside the remainder.
Common mistakes with large numbers
- Trusting a scientific-notation answer. A display of 1.2193263112482853e+38 has kept 17 digits and thrown away 21. It is an estimate presented as a result.
- Assuming agreement means correctness. The exact and floating-point answers to 3⁴⁰ match for 17 digits and then diverge. Checking the first few digits proves nothing.
- Pasting long IDs into spreadsheet number cells. Format the column as text first, or the last digits of a card or order number may be rewritten.
- Comparing decimals with an equality test. 0.1 + 0.2 is not 0.3 in floating point. Compare within a tolerance, or work in whole units such as cents.
- Expecting fractional exponents. Powers here take whole-number exponents. A fractional exponent is a root, which generally has no exact decimal answer.
- Reading a long answer without grouping. Count digits in groups of three. Two answers differing by a single digit in the middle are easy to mistake for each other.
Frequently asked questions
What is the largest number an ordinary calculator can handle exactly?
9,007,199,254,740,992, which is 2⁵³. Below that, every whole number can be stored exactly in double-precision floating point. Above it, gaps appear: first only even numbers can be represented, then only multiples of 4, and so on. That threshold is about 16 digits, which is why accuracy tends to fail somewhere between 15 and 17 significant digits.
What is 2 to the power of 100?
1,267,650,600,228,229,401,496,703,205,376, a 31-digit number. A floating-point calculator happens to display this one correctly, because powers of two are exactly representable in binary. Ask it for 2¹⁰⁰ + 1 and the extra 1 disappears, since there is no room to store the difference.
Why does 0.1 + 0.2 not equal 0.3?
Because neither 0.1 nor 0.2 has an exact binary representation, in the same way 1/3 has no exact decimal one. Each is stored as the closest available binary value, and adding the two approximations gives 0.30000000000000004. The error is tiny but real, which is why financial code usually stores whole cents rather than fractional dollars.
How many digits does 100 factorial have?
158 digits. Factorials grow faster than almost anything else in everyday math: 20! is about 2.4 quintillion and still fits inside a double, while 21! does not. Even 52!, the number of ways to arrange a deck of cards, runs to 68 digits.
Can I use decimals in this calculator?
Yes for the four basic operations, with division carried out exactly to 30 decimal places. Powers are the exception: the exponent has to be a whole number, since fractional exponents are roots and rarely have exact decimal values. Whole-number inputs are where exact arithmetic pays off most.
What is 2 to the power of 100 mod 1,000,000,007?
976,371,285. Modulo gives the remainder after division, so even though 2¹⁰⁰ has 31 digits, the answer is under 10 digits. This kind of calculation appears constantly in cryptography and competitive programming, where 1,000,000,007 is a common prime modulus chosen to keep intermediate results manageable.
Why did my spreadsheet change the last digits of a long ID number?
Because it stored the ID as a number rather than text. Many spreadsheets keep only about 15 significant digits and replace the rest with zeros, so a 16- or 19-digit card or order number comes back altered. Format the column as text before pasting, and the digits stay as typed.
How long is a 2048-bit encryption key in decimal digits?
617 digits. An RSA-2048 modulus is a number just under 2²⁰⁴⁸, and every digit is part of the key. Arithmetic on numbers that size has to be exact, which is why cryptographic libraries use dedicated big-integer code instead of the hardware floating-point unit.
Is there a limit to how many digits I can enter?
There is no fixed digit cap. The arithmetic is exact regardless of length, and the practical limit is how long a very large power takes to work out and how much text your screen can display. Ordinary tasks — factorials, key-sized numbers, hundred-digit products — resolve as you type.
Related calculators
Put this calculator on your own site (free)
Copy this into any page. The calculator stays up to date on its own, works on mobile, and carries a small credit link back here.
https://fourfunctioncalculator.com/big-number-calculator/