Factorial / Big Integer Calculator
Compute exact factorials and arbitrary-precision integer expressions.
Overview
The Factorial and Big Integer Calculator computes exact factorials with no overflow and evaluates arbitrary-precision integer expressions involving addition, subtraction, multiplication, division and power. Ask it for 1000! and you get all 2,568 digits without losing a single one.
It is useful for combinatorics students, cryptography hobbyists exploring large primes, and developers verifying integer-overflow boundaries. Anywhere a 64-bit integer would silently overflow, this tool keeps full precision.
How it works
Factorial n! is defined as the product 1 * 2 * 3 * ... * n with the convention 0! = 1. The tool multiplies an arbitrary-precision integer iteratively rather than recursively to keep memory usage flat.
Big-integer arithmetic stores numbers as arrays of digits (base 2^32 or similar). Addition and subtraction run linearly in the number of digits, multiplication uses schoolbook for small operands and Karatsuba for large ones. Power computes a^b by repeated squaring in O(log b) multiplications.
Examples
10! → 3,628,800
20! → 2,432,902,008,176,640,000
50! → 30,414,093,201,713,378,043,612,608,166,
064,768,844,377,641,568,960,512,000,
000,000,000
100^100 → a 201-digit number starting with 1 followed by 200 zeros
FAQ
Is there a maximum n?
The maths is unlimited; the practical limit is memory and time. Tens of thousands run reasonably quickly; millions get slow.
Why is 0! = 1?
It's a convention that keeps the factorial recurrence n! = n * (n - 1)! consistent at n = 1, and it's needed for combinations formulae like C(n, 0) = 1.
How is it different from a normal calculator?
A normal calculator uses 64-bit floats, which lose precision around 17 digits and overflow above roughly 1.8 * 10^308. This tool keeps every digit.
Can I compute n! / k! for huge n?
Yes — the difference n! / k! is the product (k+1) * (k+2) * ... * n, which the engine can compute directly.
Does it support negative or non-integer factorials?
Use the Gamma & Beta Function Calculator: n! = Γ(n + 1) extends factorial to non-integers (but stays undefined at non-positive integers).