Big Number Calculator
Do exact arithmetic on whole numbers with hundreds or thousands of digits. Add, subtract, multiply, divide with remainder, take the modulo, raise to a power, or find the GCD and LCM, and see how many digits the answer has.
How to use the Big Number Calculator
- Enter number A; paste numbers of any length, with or without commas.
- Pick an operation: +, −, ×, ÷, mod, power, GCD, LCM or compare.
- Enter number B (the exponent for powers).
- Read the result, its digit count and scientific notation.
- Copy the full result with the Copy results button.
How big number arithmetic works
Ordinary calculators use floating-point numbers with about 15-17 significant digits, so 12345678901234567890 × 98765432109876543210 comes out rounded. This tool uses arbitrary-precision integers: each number is stored as an exact sequence of digits, so sums, products, quotients and powers are correct down to the last digit. Powers use exponentiation by squaring, which needs only about log₂(B) multiplications.
| Operation | Rule | Example |
|---|---|---|
| Integer division | A = B × q + r, with |r| < |B| | 100 ÷ 7 = 14 remainder 2 |
| Modulo | A mod B, always ≥ 0 | −7 mod 3 = 2 |
| Power | A^B = A × A × … (B times) | 2^64 = 18,446,744,073,709,551,616 |
| GCD | Euclid: gcd(A, B) = gcd(B, A mod B) | gcd(84, 36) = 12 |
| LCM | |A × B| ÷ gcd(A, B) | lcm(84, 36) = 252 |
| Digit count | floor(log₁₀ n) + 1 | 10^100 has 101 digits |
Famous large numbers
| Number | Digits | Where it appears |
|---|---|---|
| 2^53 − 1 = 9,007,199,254,740,991 | 16 | Largest exact integer in a JavaScript/double number |
| 2^64 = 18,446,744,073,709,551,616 | 20 | Number of values of a 64-bit integer |
| 2^128 | 39 | Number of possible IPv6 addresses and UUID-sized values |
| 2^256 | 78 | Size of 256-bit keys and hashes (SHA-256) |
| 10^100 (a googol) | 101 | A classic name for a very large number |
| 52! (ways to shuffle a deck) | 68 | About 8.0658 × 10^67 card orders |
Frequently asked questions
Why does a normal calculator give wrong answers for big numbers?
Most calculators and spreadsheets store numbers as 64-bit floating point, which keeps only about 15 to 17 significant digits. Integers above 9,007,199,254,740,991 (2^53 − 1) lose their last digits. This calculator uses arbitrary-precision integers, so every digit is exact.
How large can the numbers be?
Each input can have up to 100,000 digits, and powers are allowed when the result has up to 200,000 digits. Everything is computed in your browser, so very large operations may take a moment on slow devices.
How does division work for whole numbers?
The calculator gives the integer quotient (truncated toward zero) and the remainder, so that A = B × quotient + remainder. It also shows the first 20 decimal places of the exact quotient.
What is the difference between remainder and mod?
For positive numbers they are the same. For a negative A, the remainder keeps the sign of A (−7 ÷ 3 gives remainder −1), while A mod B is always non-negative (−7 mod 3 = 2).
How many digits does 2^256 have?
2^256 = 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936, which has 78 digits. In general, the number of digits of a positive integer n is floor(log10(n)) + 1.
Can I enter decimals or fractions?
No, this tool works with whole numbers (integers) only, which keeps every result exact. For decimals use a scientific calculator, or scale your numbers to integers first (for example work in cents instead of dollars).