QiLing Tools

💯Big Number Calculator - Arbitrary Precision, 2^1000, 1000!

Ordinary calculators give up after about 16 digits and show 1.07e301; this one uses the browser’s built-in BigInt, so every digit is exact — all 302 digits of 2^1000, all 2568 digits of 1000!, C(100, 50) or the 1000th Fibonacci number. The input is a full expression: + − × ÷ (division is an exact fraction, shown as a decimal to your chosen number of places and as quotient and remainder), // floor division, % remainder, ^ powers, n! factorials and brackets, plus functions such as C(n,k), P(n,k), fib(n), gcd, lcm, powmod, modinv, isqrt, a high-precision sqrt, isprime and digitsum. Results can be grouped with commas or spaces, shown in any base from 2 to 36, and come with the digit count, digit sum, bit length and a scientific-notation approximation. The work runs in a background Web Worker, so even 200000! (nearly a million digits) never freezes the page, and you can cancel at any time. A second tab converts integers with tens of thousands of digits between any bases.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use Big Number Calculator

  1. 1Type an expression such as 2^1000, 1000!, C(100, 50) or powmod(3, 10^100, 10^9+7), or click an example
  2. 2Set the decimal places for division, the digit grouping and the output base; the result updates when you stop typing (or press Enter)
  3. 3Copy the full result and read the digit count, digit sum and scientific notation; cancel long jobs, or use the base converter tab

FAQ

What are 2^1000 and 1000 factorial?
2^1000 has 302 digits, starting 10715086071862673209…, and its digits add up to 1366 (Project Euler problem 16). 1000! has 2568 digits, ends in 249 zeros and has a digit sum of 10539; 100! has 158 digits, about 9.3326 × 10^157. Type 2^1000, 1000! or digitsum(2^1000) to see and copy the full values.
Why does division show both a fraction and a decimal?
Division is exact: 22/7 is kept as the fraction 22/7, shown as a decimal truncated to the number of places you choose (3.142857…), and as quotient and remainder, 3 … 1/7. Use // when you only want the whole-number quotient and % or mod for the remainder. A division that comes out even, like 10^20/4, is shown as an integer or terminating decimal.
How big can the numbers get, and will it freeze my browser?
To avoid running out of memory, a single result is limited to about 3.4 million bits, roughly one million decimal digits — enough for 200000! (973,351 digits), 3^2000000 or fib(2000000), each in about a second. Everything runs in a background Web Worker, so the page stays responsive; long jobs show a timer and a cancel button. Anything over the limit is rejected up front with a “too large” message.
How reliable is the isprime test?
isprime runs the Miller-Rabin test with the first 20 primes as bases. For numbers below 3.3 × 10^24 that set of bases is proven to give the right answer every time; above that there is a theoretical but vanishingly small chance of error. For example isprime(2^127 − 1) returns 1 (a Mersenne prime) and isprime(561) returns 0 (a Carmichael number). Inputs are limited to 20,000 bits to keep the test fast.