About Big Number Calculator
Ordinary calculators keep about fifteen significant digits, so 0.1 + 0.2 comes out as 0.30000000000000004 and the last digits of a large product are lost. This calculator works in decimal with arbitrary precision: sums, differences, products and whole-number powers are exact to the last digit, and division, square roots and fractional powers are rounded to as many significant digits as you ask for, up to 300.
Each number may have up to 10,000 significant digits, between 10^-10,000 and 10^10,000. The result is shown in full, ready to copy, along with a short scientific form, its digit counts and whether it is exact or rounded.
How it works
- Numbers are stored as decimal digits with a power of ten, using the decimal.js library, so values like 0.1 are held exactly rather than as binary approximations.
- Addition, subtraction, multiplication and whole-number powers keep every digit. Division and powers with a fractional or negative exponent are rounded half up to the significant digits you choose; a division that comes out exact within them is marked as exact.
- Square roots are computed on whole numbers with Newton’s method and rounded half up, so every digit shown is correct.
- Whole-number division gives a quotient rounded toward zero and a remainder with the sign of the first number, as the % operator does in C and JavaScript.
Questions
How large can the numbers be?
Each number may have up to 10,000 significant digits, and must lie between 10^-10,000 and 10^10,000. A power whose result would run past 10,000 digits is refused with a message, because showing it would make the page stop responding.
Why is division not exact?
Most divisions never end: 1 ÷ 3 is 0.333… forever. The result is rounded to the number of significant digits you choose, up to 300. When the quotient does end within that many digits, the result is marked as exact.
Can I type commas as thousands separators?
No, because a comma is the decimal point in many countries and the number would be read wrongly. Spaces and underscores between digits are fine: 1 000 000 and 1_000_000 both work.
Does this handle negative numbers?
Yes, for every operation except the square root, which has no real value for a negative number. A negative number can only be raised to a whole-number power.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.