What the big number calculator does
Most calculators, spreadsheets and programming languages store numbers in double-precision floating point, which keeps only about 15 to 16 significant digits. Beyond that, digits are silently rounded away: in floating point, 264 + 1 equals 264. This tool stores numbers as exact strings of digits instead, so a 1,000-digit number keeps all 1,000 digits, and results such as 21000 (302 digits) or 1000! (2,568 digits) are printed in full.
Operations
- X + Y, X − Y, X × Y: exact sums, differences and products, including decimals.
- X / Y: the quotient, truncated (not rounded) to the number of decimal places set in Precision. Trailing zeros are dropped, so 1 / 4 shows 0.25.
- XY: X raised to a whole-number power Y. Positive powers are exact; negative powers are computed as 1 / X|Y| and truncated to the precision.
- √X: the square root of X, truncated to the precision.
- X2: X times itself, exact.
- X!: the factorial of a whole number X, the product 1 × 2 × 3 × ... × X.
- MOD: the remainder after dividing X by Y. The remainder takes the sign of X.
- GCD and LCM: greatest common divisor and least common multiple of two whole numbers.
Entering numbers
Type digits with an optional minus sign and decimal point. Commas and spaces are ignored, so you can paste numbers copied from a document. E notation is accepted: 23E18 means 23 × 1018 and 3.5e-4 means 0.00035. Inputs may be thousands of digits long.
Worked examples
| Input | Operation | Result |
|---|---|---|
| X = 2, Y = 100 | XY | 1,267,650,600,228,229,401,496,703,205,376 |
| X = 25 | X! | 15,511,210,043,330,985,984,000,000 |
| X = 2 | √X, precision 20 | 1.4142135623730950488 |
| X = 2, Y = 3 | X / Y, precision 5 | 0.66666 (truncated, not rounded up) |
| X = 1071, Y = 462 | GCD | 21 |
Notice the square root of 2 ends in ...0488 rather than ...04880: the twentieth decimal is a zero, and trailing zeros are not printed.
Names of large numbers
In the short scale used in the United States and in modern British English, each new name is a thousand times the previous one.
| Name | Power of ten | Zeros |
|---|---|---|
| Thousand | 103 | 3 |
| Million | 106 | 6 |
| Billion | 109 | 9 |
| Trillion | 1012 | 12 |
| Quadrillion | 1015 | 15 |
| Quintillion | 1018 | 18 |
| Sextillion | 1021 | 21 |
| Septillion | 1024 | 24 |
| Octillion | 1027 | 27 |
| Nonillion | 1030 | 30 |
| Decillion | 1033 | 33 |
| Googol | 10100 | 100 |
| Centillion | 10303 | 303 |
The long scale, still used in much of continental Europe and Latin America, calls 109 a "milliard" and 1012 a "billion", so always check which convention a source uses.
How the arithmetic works
Each number is stored as a whole number of digits plus a count of decimal places. 12.345 becomes 12345 with three decimal places. Adding or subtracting lines up the decimal places first; multiplying multiplies the digit strings and adds the decimal places. Division scales the dividend by a power of ten large enough for the requested precision, then performs exact integer division, which is why the result is truncated. Square roots use Newton's method on integers, and GCD uses the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero. LCM is then |X × Y| ÷ GCD(X, Y).
Where big numbers show up
Cryptography uses primes with hundreds of digits; RSA keys are typically 2,048 bits, about 617 decimal digits. Combinatorics produces enormous counts: a standard deck can be shuffled in 52! ways, a 68-digit number. Astronomy and physics deal with values such as the roughly 1080 atoms in the observable universe. In each case an exact tool avoids the rounding that ordinary floating point would introduce.