Skip to content
Toolcroft

Math Calculators

Big Number Calculator - Arbitrary Precision Integers

Perform exact arithmetic on integers of any size - no floating-point rounding. Supports addition, subtraction, multiplication, division, modulo, power, GCD, LCM, and factorial up to 10 000!.

Quick examples:

2 ^ 64 =

20 digits

18446744073709551616

Why arbitrary precision matters

Standard 64-bit floating-point arithmetic can only represent integers exactly up to 2⁵³ = 9,007,199,254,740,992 (~9 quadrillion). Beyond that, numbers are rounded. This calculator uses JavaScript's native BigInt type, which stores integers as sequences of digits with no upper size limit other than available memory.

Supported operations

  • Addition / Subtraction / Multiplication: Exact integer arithmetic.
  • Division: Integer (floor) division with a displayed remainder.
  • Modulo: Always returns a non-negative result for positive divisors.
  • Power: A raised to the B (non-negative integer). Large exponents may produce very long results; a limit is imposed to avoid browser freezes.
  • GCD: Greatest Common Divisor via the Euclidean algorithm.
  • LCM: Least Common Multiple, computed as |A·B| / GCD(A,B).
  • Factorial: n! for n up to 10 000. (10 000! has ~35 660 digits.)

Example: how large can results get?

  • 2¹⁰⁰ = 1,267,650,600,228,229,401,496,703,205,376 (31 digits)
  • 100! ≈ 9.33 × 10¹⁵⁷ (158 digits)
  • 1000! has 2568 digits
  • 10000! has 35 660 digits

Use cases

  • Cryptography: RSA-2048 uses 2048-bit keys - numbers with ~617 decimal digits. Factoring these numbers is computationally infeasible, which is the basis of RSA's security.
  • Combinatorics: the number of ways to arrange a 52-card deck is 52! ≈ 8.07 × 10⁶⁷ - vastly more than the number of atoms in the observable universe. Big-number arithmetic is required to compute this exactly.
  • Astronomical distances: the observable universe is approximately 8.8 × 10²⁶ meters across. Precise calculations involving such distances require arithmetic well beyond standard 64-bit float precision.

Performance note

Operations like factorial grow extremely fast. 10,000! produces a 35,660-digit string and takes tens of milliseconds to compute. To prevent the browser from freezing, this calculator limits factorial input to 10,000 and power exponents to values that would produce fewer than ~100,000 digits. Results exceeding these limits display a warning rather than a truncated answer.