100+ free calculators, no signup | 💰 Financial ❤️ Health & Fitness 📐 Math 🔧 Other
🇺🇸 USD | About Contact

Big Number Calculator

Exact arithmetic on numbers with thousands of digits: sums, products, division, powers, factorials, roots, remainders, GCD and LCM.

Quick examples
123,456,789,012,345,678,901,234,567,890 × 987,654,321,098,765,432,109,876,543,210 =
≈ 1.2193263 × 10⁵⁹All 60 digits below

The exact product, a 60 digit whole number.

Full result

60 digits, with nothing rounded.

121,932,631,137,021,795,226,185,032,733,622,923,332,237,463,801,111,263,526,900
Digits60In the whole number
Digit sum207Divisible by 9
Trailing zeros2Zeros at the end
Even or oddEvenLast digit 0

Your calculation

The same steps the calculator runs, with your numbers.

  1. X has 30 digits and Y has 30 digits, so the product has 59 or 60 digits: here it has 60.
  2. Last digit check: X ends in 0 and Y ends in 0, and 0 × 0 = 0, so the product ends in 0.
  3. Multiply with exact whole number arithmetic, keeping every digit: 121932631137…63526900.

Every operation on X and Y

Long results are shortened here. Choose the operation to see all of its digits.

OperationResultDigits
X + Y1,111,111,110,111,111,111,011,111,111,10031
X − Y−864,197,532,086,419,753,208,641,975,32030
X × Y121932631137…6352690060
X ÷ Y0.1249999988609375000121
X mod Y123,456,789,012,345,678,901,234,567,89030
GCD9,000,000,000,900,000,000,09022
LCM13,548,070,124,980,948,012,498,094,801,236,261,41038
√X351,364,182,882,014.4253111222381698126135

Whole numbers are exact at any size. Division, square roots and negative powers are rounded half up at the decimal place you choose.

What Is a Big Number Calculator?

A big number calculator does arithmetic on numbers too long for an ordinary calculator, and it keeps every digit. Standard calculators and most software store numbers in double precision floating point, which holds only about 15 to 17 significant digits. Past that point, the last digits are rounded away or the answer switches to E notation.

This calculator stores whole numbers with JavaScript BigInt, which MDN describes as a type for integers too large for the ordinary number type. Decimals are handled by tracking the position of the decimal point separately, so 0.1 + 0.2 is exactly 0.3 here. Inputs can be up to 20,000 characters long, and results can reach 100,000 digits.

Use it to check homework with large factorials or powers, find the exact last digits of a product, count the digits of a huge number, compute remainders and greatest common divisors of long integers, or get a square root to hundreds of decimal places.

How to Use the Big Number Calculator

  1. Enter X and Y. Type or paste whole numbers or decimals of any length. Commas, spaces and line breaks are ignored, a leading minus sign makes a number negative, and E notation such as 1e30 is expanded to an exact 1 followed by 30 zeros.
  2. Pick an operation. Add, subtract, multiply, divide, power, modulo, GCD and LCM use both numbers. Square root and factorial use only X, so the Y box is hidden.
  3. Set decimal places if needed. Division, square roots and negative powers often never end, so the calculator stops at the number of decimal places you choose, from 0 to 1,000, and rounds the last digit half up.
  4. Read the results. Short answers appear in full at the top. Long answers appear there in scientific notation, and the Full result box below holds every digit with a Copy button. Tiles show the digit count, digit sum, trailing zeros and whether the result is even or odd.

The table at the bottom of the results runs every operation on the same X and Y at once, so you can compare the sum, product, quotient and remainder without switching operations.

Operations and Worked Examples

Every example below was computed with this calculator's own code.

OperationExampleExact result
Multiply123,456,789 × 987,654,321121,932,631,112,635,269
Power2⁶⁴18,446,744,073,709,551,616
Power2¹⁰⁰1,267,650,600,228,229,401,496,703,205,376
Factorial25!15,511,210,043,330,985,984,000,000
Divide10³⁰ ÷ 7, 20 places142,857,142,857,142,857,142,857,142,857.14285714285714285714
Square root√2, 30 places1.414213562373095048801688724210
Modulo2¹⁰⁰ mod 72
GCD and LCM1,071 and 462GCD 21, LCM 23,562

The square root of 2 to 30 places ends in 210 rather than 209 because the 31st decimal digit is 6, which rounds the 30th digit up. The division by 7 shows the repeating block 142857, since 1 ÷ 7 = 0.142857142857 and so on.

Why Ordinary Calculators Lose Digits

Double precision numbers have 53 bits for the significant digits. MDN explains that this makes whole numbers exact only up to 2⁵³ − 1 = 9,007,199,254,740,991, the value of Number.MAX_SAFE_INTEGER. Above it, neighbors start to collide: 9,007,199,254,740,993 is stored as 9,007,199,254,740,992.

The effect shows up quickly in real products. In ordinary JavaScript numbers, 123,456,789 × 987,654,321 gives 121,932,631,112,635,260, which is 9 too small, and 25! comes out as 1.5511210043330986 × 10²⁵ instead of all 26 digits.

⚠️
If an answer is longer than about 15 digits, treat the trailing digits from a standard calculator or spreadsheet as unreliable.

How Many Digits Will the Answer Have?

The number of digits in a positive whole number N is the whole number part of log₁₀ N, plus 1. For powers, log₁₀ Xʸ = Y × log₁₀ X, which predicts the length without multiplying.

digits(N) = ⌊log₁₀ N⌋ + 1 2¹⁰⁰: 100 × 0.30103 = 30.103 → 31 digits 2¹⁰⁰⁰: 1,000 × 0.30103 = 301.03 → 302 digits a digit × b digit product: a + b − 1 or a + b digits

The product rule explains the default example: two 30 digit numbers give a product of 59 or 60 digits, and this one has 60.

Factorials and Trailing Zeros

The factorial n! is the product of every whole number from 1 to n, and 0! = 1 by definition. OpenStax College Algebra uses n! as the number of ways to line up n objects. Factorials grow faster than powers, so they are the usual reason people need a big number calculator. This calculator handles factorials up to 5,000!.

Trailing zeros come from factors of 10, and each 10 needs a 2 and a 5. There are always more 2s than 5s, so count the 5s: n ÷ 5, plus n ÷ 25, plus n ÷ 125 and so on, keeping only whole number parts. For 100!, that is 20 + 4 = 24 zeros.

nDigits in n!Trailing zeros
107 (3,628,800)2
25266
10015824
1,0002,568249
5,00016,3261,249

Powers of Two Reference

PowerExact value
2¹⁰1,024
2¹⁶65,536
2³²4,294,967,296
2⁵³9,007,199,254,740,992
2⁶⁴18,446,744,073,709,551,616

2³² and 2⁶⁴ count the values a 32 bit or 64 bit unsigned integer can hold, which is why they appear in computing.

Names of Large Numbers

NIST lists the short scale names used in the United States next to each SI prefix:

NamePower of 10Prefix
million10⁶mega
billion10⁹giga
trillion10¹²tera
quadrillion10¹⁵peta
quintillion10¹⁸exa
sextillion10²¹zetta
septillion10²⁴yotta
octillion10²⁷ronna
nonillion10³⁰quetta

Remainders, GCD and LCM

The modulo operation returns the remainder r in X = Y × q + r. This calculator always returns a remainder from 0 up to, but not including, the size of Y, which is the usual math convention. Some programming languages truncate toward zero instead, so −7 mod 3 is 2 here, while JavaScript's % operator gives −1.

The greatest common divisor uses the Euclidean algorithm, which the NIST Dictionary of Algorithms and Data Structures defines as repeatedly replacing the pair (a, b) with (b, a mod b) until b is 0. For 1,071 and 462:

GCD(a, b) = GCD(b, a mod b), GCD(a, 0) = a 1,071 = 2 × 462 + 147 462 = 3 × 147 + 21 147 = 7 × 21 + 0 → GCD = 21 LCM = 1,071 × 462 ÷ 21 = 23,562

The number of steps grows with the number of digits, not with the size of the numbers, so two 30 digit numbers need only a few dozen steps. In the default example, X and Y share a GCD of 9,000,000,000,900,000,000,090.

Common Mistakes

  • Reading E notation as exact. 1.2193263 × 10⁵⁹ is a summary. The exact value is in the Full result box.
  • Too few decimal places. 1 ÷ 3 to 2 places is 0.33. Raise the decimal places to see more of a repeating decimal.
  • Using a decimal comma. Commas are read as thousands separators, so write 3.5, not 3,5.
  • Fractional powers. Xʸ needs a whole number Y here. Use √X for a power of one half.
  • Factorials of decimals. n! is defined here for whole numbers from 0 to 5,000.

Related Calculations

To write a long result in a compact form, use the Scientific Notation Calculator. For powers with fractional or negative exponents, use the Exponent Calculator, and for roots other than square roots, use the Root Calculator.

To break a number into primes, use the Prime Factorization Calculator. The GCF Calculator and LCM Calculator work with lists of numbers, and the Log Calculator finds logarithms for digit counts.

Frequently Asked Questions

How do you calculate very large numbers exactly?

Use arbitrary precision arithmetic, which stores every digit instead of a rounded approximation. This calculator uses JavaScript BigInt, which holds whole numbers of any size, and tracks the decimal point separately, so 123,456,789 × 987,654,321 gives exactly 121,932,631,112,635,269. A calculator that uses standard double precision numbers keeps only about 15 to 17 significant digits, so JavaScript's ordinary number type returns 121,932,631,112,635,260 for the same product. Exact digits matter when you need the last digits, a remainder or a digit count.

What is the largest number a calculator can handle?

It depends on how the calculator stores numbers. Most calculators and programming languages use double precision floating point, which MDN describes as exact for whole numbers only up to 2⁵³ − 1 = 9,007,199,254,740,991. Above that, some integers cannot be stored, so 9,007,199,254,740,993 becomes 9,007,199,254,740,992. The largest double is about 1.8 × 10³⁰⁸. This calculator accepts inputs up to 20,000 characters and results up to 100,000 digits, so it stays exact far beyond either limit.

How many digits are in 100 factorial?

100 factorial, written 100!, has 158 digits and ends in 24 zeros. It begins 9,332,621,544 and is the product of every whole number from 1 to 100. The zeros come from pairs of 2 and 5 among the factors, and there are fewer 5s than 2s, so count the 5s: 100 ÷ 5 = 20 multiples of 5, plus 100 ÷ 25 = 4 multiples of 25 that add an extra 5, for 24 in total. By the same count, 1,000! has 2,568 digits and 249 trailing zeros.

What is 2 to the power of 100?

2¹⁰⁰ = 1,267,650,600,228,229,401,496,703,205,376, a 31 digit number. You can predict the length without multiplying: the number of digits in a whole number N is the whole number part of log₁₀ N plus 1, and log₁₀ 2¹⁰⁰ = 100 × log₁₀ 2 ≈ 30.103, so 2¹⁰⁰ has 31 digits. For comparison, 2⁶⁴ = 18,446,744,073,709,551,616 has 20 digits, and 2¹⁰⁰⁰ has 302 digits.

How do you find the remainder of a large division?

Divide and keep the whole number part of the quotient, then multiply back and subtract: remainder = X − Y × quotient. For 10³⁰ ÷ 7, the quotient is 142,857,142,857,142,857,142,857,142,857 and the remainder is 1, because 7 times that quotient is 999,999,999,999,999,999,999,999,999,999, which is 1 less than 10³⁰. Choose mod in this calculator to get the remainder directly, for example 2¹⁰⁰ mod 7 = 2. The result is always at least 0 and smaller than the divisor.

How do you find the GCD of two large numbers?

Use the Euclidean algorithm: divide the larger number by the smaller, replace the larger with the remainder, and repeat until the remainder is 0. The last nonzero remainder is the greatest common divisor. For 1,071 and 462: 1,071 = 2 × 462 + 147, then 462 = 3 × 147 + 21, then 147 = 7 × 21 + 0, so the GCD is 21. The LCM is 1,071 × 462 ÷ 21 = 23,562. The method needs few steps even for numbers with hundreds of digits.

Sources & References

  • MDN Web Docs. BigInt (integers too large for the number type, BigInt division truncates toward zero). developer.mozilla.org
  • MDN Web Docs. Number.MAX_SAFE_INTEGER (2⁵³ − 1 = 9,007,199,254,740,991, largest double about 1.8 × 10³⁰⁸). developer.mozilla.org
  • Paul E. Black, NIST. Euclid's algorithm, Dictionary of Algorithms and Data Structures (2015). xlinux.nist.gov
  • OpenStax. College Algebra 2e, 9.5 Counting Principles (factorial notation, 0! = 1). openstax.org
  • NIST Office of Weights and Measures. Metric (SI) Prefixes (prefixes with short scale names from million to nonillion). nist.gov

Results are for educational purposes. Every number on this page was recomputed with the same code the calculator uses. Methodology reviewed: 2026.