Big Number Calculator
Add, subtract, multiply, divide and raise to a power whole numbers of any length, exactly. Ordinary calculators — and JavaScript itself — stop being exact above 9,007,199,254,740,991 and begin rounding silently, which is how 9007199254740993 + 2 comes back as 9007199254740994. Nothing is rounded here however many digits the answer runs to. Division gives a quotient and a remainder rather than a decimal, since exactness is the point. Each result comes with its digit count, an approximate order of magnitude, hexadecimal and binary forms, and — most usefully — the same sum done in ordinary floating point beside it, so you can see for yourself where the two answers part company.
How it works
Arithmetic on whole numbers of any length. Ordinary calculators — and JavaScript itself — stop being exact above 9,007,199,254,740,991 and start silently rounding; every answer here is exact however many digits it takes.
Whole numbers only: decimals cannot be represented exactly, so division gives a quotient and a remainder rather than rounding. Commas and 2e10 style shorthand are both accepted as input.
a + b
Result — Add
9,007,199,254,740,995
About this number
The same sum in ordinary floating point
What a calculator built on 64-bit floats would have told you.
9007199254740994
⚠ This differs from the exact answer above — the float result has been rounded.
Frequently asked questions
Why do I need a big number calculator?
Because standard numeric types stop being exact above about nine quadrillion. Cryptographic keys, factorials, combinatorics and hash values all live well past that, and an ordinary calculator quietly rounds them.
Why can I not enter decimals?
Decimals cannot be represented exactly in binary, which is the very problem this tool exists to avoid. Whole numbers only, and division gives a quotient plus a remainder instead of rounding.
How large can the numbers be?
Inputs are effectively unlimited. Powers are capped at around 100,000 digits in the result, which is checked before the calculation runs rather than after your browser freezes.
What does the floating point comparison show?
The same operation done the way a normal calculator would. When it differs from the exact answer it is flagged, which makes the reason for using this tool concrete rather than theoretical.
Can I paste numbers with commas?
Yes — commas, spaces and underscores are ignored, and shorthand like 2e10 is expanded to its full value.
Does it handle negative numbers?
Yes, throughout. Note that the remainder keeps the sign of the left operand, which is flagged when it comes up.
Related tools
Prime Factorization Calculator
Break any whole number into its prime factors, exactly, even well beyond the usual size limits.
GCD & LCM Calculator
Find the greatest common divisor and lowest common multiple of any set of whole numbers, with the steps.
Number Base Converter
A number base converter for binary, hex, decimal, octal, Roman numerals, balanced ternary, negabinary and more.