Do exact arithmetic on whole numbers with thousands of digits: addition, subtraction, multiplication, division, powers, factorials, square roots, modulo, GCD and LCM.
Whole numbers of any length (up to 20,000 digits) are calculated exactly. X and Y may be negative. Commas and spaces inside numbers are ignored. Factorials are limited to 5,000! and powers to results of about 100,000 digits.
A big number calculator does exact arithmetic on whole numbers far too large for an ordinary calculator, with thousands of digits if needed. It can add, subtract, multiply and divide them, find quotients and remainders, raise numbers to powers, calculate factorials, square roots, modulo, the greatest common divisor and the least common multiple, and it shows every digit of the answer.
For example, 2¹⁰⁰ = 1,267,650,600,228,229,401,496,703,205,376, 25! = 15,511,210,043,330,985,984,000,000, and 123,456,789 × 987,654,321 = 121,932,631,112,635,269.
Most calculators and spreadsheets store numbers in a format called double-precision floating point, which keeps only about 15 to 17 significant digits. Beyond that, the extra digits are lost. For instance, a spreadsheet will show 2⁶⁴ as 18,446,744,073,709,600,000, but the true value is 18,446,744,073,709,551,616. For whole numbers larger than 9,007,199,254,740,991 (2⁵³ − 1), ordinary arithmetic can’t even guarantee that adding 1 changes the result.
This calculator uses arbitrary-precision integer arithmetic, which stores every digit. Its answers are exact, however many digits they have.
These work exactly as you’d do them by hand, digit by digit, with nothing rounded. Multiplying two 30-digit numbers gives a result of 59 or 60 digits, every one of them correct.
Choose X ÷ Y (decimal) for a decimal answer to 10, 20, 50 or 100 places. For example, 1 ÷ 7 to 20 decimal places is 0.14285714285714285714, showing the repeating pattern 142857. Choose quotient and remainder for whole-number division: 100 ÷ 7 = 14 remainder 2.
X to the power Y multiplies X by itself Y times. Powers grow extremely fast: 2¹⁰ is 1,024, 2¹⁰⁰ has 31 digits and 2¹⁰⁰⁰ has 302 digits.
X! is the product of all whole numbers from 1 to X. Factorials grow even faster than powers: 10! = 3,628,800, 25! has 26 digits, and 100! has 158 digits, ending in 24 zeros. They count arrangements: 52! is the number of ways to shuffle a deck of cards, a number with 68 digits.
The calculator finds the integer square root, the largest whole number whose square doesn’t exceed X, and tells you whether X is a perfect square. √(10⁴⁰) = 10²⁰ exactly.
X mod Y gives the remainder after dividing X by Y, always shown as a non-negative number, which is the convention in number theory: −7 mod 3 = 2. The greatest common divisor and least common multiple are calculated with the Euclidean algorithm, which stays fast even for numbers with thousands of digits.
Each trailing zero comes from a factor of 10, which is 2 × 5. Factorials have plenty of 2s, so the number of zeros equals the number of 5s in the factorisation. For 100!, count the multiples of 5 (20) plus the multiples of 25 (4), giving 24 trailing zeros. For 25!, there are 5 + 1 = 6.
An old legend tells of a ruler who offered a reward and was asked for one grain of wheat on the first square of a chessboard, two on the second, four on the third, doubling each time. The total on all 64 squares is 2⁶⁴ − 1 = 18,446,744,073,709,551,615 grains, far more wheat than has ever been grown. You can check this with the calculator: find 2 to the power 64, then subtract 1. The story is a classic illustration of how quickly repeated doubling, or exponential growth, produces enormous numbers.
For many everyday purposes, an approximate answer such as 1.27 × 10³⁰ is fine. But there are times when every digit matters. Checking whether a large number is divisible by another, verifying a cryptographic key, testing a programming routine or confirming a mathematical identity all need exact values. A single wrong digit in the middle of a 40-digit number makes it a completely different number. That’s why this calculator always works with the full integer and only uses scientific notation as a helpful summary.
Prime numbers become rarer as numbers grow, but they never run out; Euclid proved more than 2,000 years ago that there are infinitely many. The largest known primes have tens of millions of digits and are found by distributed computing projects. Primes with hundreds of digits are at the heart of modern online security: multiplying two large primes is easy, but splitting their product back into the two primes is so hard that it would take ordinary computers far longer than the age of the universe. You can multiply two big numbers here instantly, which shows the easy direction of that one-way problem.
If you’ve done a long multiplication on paper, the calculator is an easy way to check it. A quick independent test is casting out nines: add the digits of each number repeatedly until you get a single digit, multiply those, and reduce again. The result should match the digit sum of your answer. For 123,456,789 × 987,654,321, both numbers reduce to 9, so the product must reduce to 9 as well, and 121,932,631,112,635,269 does.
Very large answers can contain tens of thousands of digits, which would overwhelm the page. The calculator shows the first 5,000 characters on screen, tells you the total number of digits and lets you copy the complete result with one click. Everything is calculated in your browser, so nothing you type is sent anywhere, and results appear almost instantly for numbers with a few thousand digits.
The calculator groups digits in threes with commas and also shows an approximate value in scientific notation, which gives a quick sense of size. In the short-scale system used in English today, a million is 10⁶, a billion is 10⁹, a trillion is 10¹², a quadrillion is 10¹⁵ and a quintillion is 10¹⁸. A googol is 10¹⁰⁰, a 1 followed by 100 zeros, which you can calculate here as 10 to the power 100.
For related questions, use the exponent calculator to raise any number to any power, or the fraction calculator to add, subtract, multiply and divide fractions.
Each input can have up to 20,000 digits. Powers are limited to results of about 100,000 digits and factorials to 5,000!.
Yes. Whole-number results are exact to the last digit. Decimal division is rounded to the number of places you choose.
Spreadsheets keep only about 15 significant digits, so they round large numbers. This calculator keeps every digit.
1,267,650,600,228,229,401,496,703,205,376, a 31-digit number.
158 digits, including 24 trailing zeros.
Yes, for addition, subtraction, multiplication, division, powers and modulo. Square roots and factorials need non-negative numbers.
The remainder when X is divided by Y. For example, 100 mod 7 = 2.
The inputs must be whole numbers. Multiply decimals by a power of 10 to make them whole, calculate, then adjust the result.
Press Copy result to copy the full number, even when only part of it is displayed.
10 to the power 100, a 1 followed by 100 zeros. Enter 10, choose X to the power Y and enter 100 to see it.
No. All calculations run in your browser, so the numbers you enter stay on your device.
Usually about 15 to 16 digits. Whole numbers above 9,007,199,254,740,991 can't all be stored exactly in standard floating point.
18,446,744,073,709,551,616. Subtract 1 to get the famous chessboard wheat total.
It gives the whole-number part of the square root and the remainder, and tells you when the number is a perfect square.