Big Number Calculator
Ordinary calculators quietly round anything past ~16 digits. This one doesn’t: paste numbers hundreds of digits long and add, subtract, multiply, divide, raise to powers, or take factorials with every digit exact, thanks to arbitrary-precision (BigInt) arithmetic.
Why exactness matters
Floating-point math — what spreadsheets, phones, and most calculators use — keeps roughly 15–17 significant digits and rounds the rest. Multiply two 12-digit numbers in a spreadsheet and the last digits of the 24-digit product are simply wrong. Cryptography, combinatorics, checksums, and number-theory homework all need every digit, which is what integer-exact BigInt arithmetic provides. Decimals are handled by scaling to integers, doing exact integer math, and placing the point back afterward.
How it’s calculated
Inputs are parsed as sign + digits + optional decimal point and scaled to exact integers. Addition, subtraction, and multiplication are exact; division computes ⌊X·10ᵖ/Y⌋ for your chosen k decimal places (truncated, not rounded); powers use exponentiation on the scaled integer; factorial multiplies 1×2×…×n. Limits: ~10,000-digit inputs, ~30,000-digit results, n ≤ 5,000 for factorial.
Everything runs locally in your browser — large factorials may take a moment on older devices.
Worked example
2^128 = 340,282,366,920,938,463,463,374,607,431,768,211,456 — 39 digits, the number of values a 128-bit register can hold. A spreadsheet would report 3.40282366920938E+38 and drop the rest. Similarly 70! is a 101-digit number beginning 1197857166…, and 123,456,789 × 987,654,321 = 121,932,631,112,635,269 exactly.
Common mistakes
- Trusting spreadsheet results past 15 digits — they are rounded even though no warning appears.
- Reading 1.23E+38 as exact; scientific notation on a normal calculator hides lost digits.
- Expecting X ÷ Y to round at the last shown decimal — this tool truncates at your chosen precision and says so.
- Asking for factorials of decimals or negatives — factorial is defined here for whole numbers 0 to 5,000.
Where it is used
- Cryptography classwork: modular arithmetic sanity checks on RSA-sized integers.
- Combinatorics: exact factorials, permutations, and combinations.
- Verifying financial or scientific code against known exact values.
- Number-theory puzzles and competitive-programming test cases.
Frequently asked questions
Why do normal calculators fail on big numbers?
Standard calculators and spreadsheet cells store numbers as 64-bit floating point, which keeps only about 15–17 significant digits — everything beyond that silently rounds. This tool uses arbitrary-precision integer arithmetic (BigInt), so every digit of a 10,000-digit result is exact.
How large can the inputs be?
Inputs up to 10,000 digits each work for add, subtract, multiply, and divide. Powers are capped where the result would exceed about 30,000 digits, and factorial accepts whole numbers up to 5,000 (5000! runs to 16,326 digits).
How is division handled without rounding errors?
Division is computed to the number of decimal places you request (default 20) using scaled integer division, truncating beyond that — so 1 ÷ 3 at 20 places is 0.33333333333333333333 exactly as printed, with no hidden binary rounding.
What is a factorial and why does it explode so fast?
n! multiplies every whole number from 1 to n; it counts the ways to arrange n items. Growth is ferocious: 70! already has 101 digits, which is why exact factorial work needs big-integer math.
Can I paste values in and copy the result out?
Yes — the inputs are large text boxes made for pasting hundred-digit values, and the copy button puts the full exact result on your clipboard, with a digit count and scientific approximation shown alongside.