How do I use the factorial calculator?
Enter a whole number from 0 to 1000 and the exact value of n! appears instantly. The default 5 gives 5!=120. Press Sample for 20!=2,432,902,008,176,640,000 (shown without commas in the result box), a 19-digit number. The counters show the digit count, the trailing zeros and the double factorial, and the details box shows the worked expansion for smaller numbers. Copy the result with one click.
What is a factorial?
The factorial of a whole number n, written n!, is the product of every whole number from 1 up to n. So 4!=4 x 3 x 2 x 1=24 and 5!=120. By definition 0!=1, which keeps formulas consistent (there is exactly one way to arrange zero objects: do nothing). Factorials count arrangements: n! is the number of ways to order n different items in a row.
How do you calculate a factorial by hand?
Multiply the numbers from n down to 1 in any order: for 6!, 6 x 5=30, 30 x 4=120, 120 x 3=360, 360 x 2=720, so 6!=720. By hand this gets painful quickly because the numbers explode in size, and ordinary calculators give up around 170! (they overflow to infinity). This tool uses exact big-integer arithmetic, so it prints every digit correctly up to 1000!, a number with 2,568 digits.
Why do factorials grow so fast?
Each step multiplies by a bigger number than the last, so growth outruns even exponentials. 10! is already 3,628,800, 20! has 19 digits, and 52! (the number of ways to shuffle a deck of cards) has 68 digits — more arrangements than there are atoms in a large planet. That explosive growth is why trailing zeros also pile up: 100! ends with 24 zeros, one for every factor pair of 2 and 5 in the product.
What are factorials used for?
Factorials are the backbone of permutations and combinations (how many ways can things be arranged or chosen), probability calculations, and series expansions such as e^x=1 + x + x^2/2! + x^3/3! + … in calculus. They appear in statistics (binomial distributions), computer science (algorithm complexity), and puzzle and lottery maths. The double factorial n!!, the product of every second number down from n (5!!=5 x 3 x 1=15), shows up in some integrals and combinatorics.
Is it free and private?
Yes. The factorial calculator is completely free, needs no sign-up, and runs entirely in your browser. Your numbers are never uploaded to a server. It works on phones, tablets and desktop computers.