TFT

Factorial Calculator – Compute n! Instantly Online

Calculate the factorial of any non-negative integer instantly with our free online factorial calculator. Supports large factorials with exact results.

Understanding Factorials

The factorial of a number n (written as n!) is the product of all positive integers from 1 up to n. It's one of the most fundamental operations in combinatorics, probability, and calculus.

The Factorial Formula

n! = n × (n-1) × (n-2) × ... × 2 × 1

For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1 — this isn't a mistake, it's a convention that makes many formulas work cleanly.

Worked Examples

Example 1: 5!

5! = 5 × 4 × 3 × 2 × 1 = 120

Small factorials like this show up in permutation problems — like arranging 5 books on a shelf.

Example 2: 10!

10! = 3,628,800

Factorials grow fast. 10! is already over 3.6 million. This is why they're useful for counting large numbers of arrangements.

Example 3: 20!

20! = 2,432,902,008,176,640,000

20! is about 2.4 quintillion — more than the number of grains of sand on Earth. This is why we use BigInt for exact calculations.

A Quick Fact

The factorial notation was introduced by French mathematician Christian Kramp in 1808. Before that, mathematicians wrote out "factorial n" in words. The exclamation point is surprisingly fitting — factorials do tend to produce astonishingly large numbers.

Common Questions

Why is 0! equal to 1?

It's not arbitrary — defining 0! = 1 makes formulas work. For example, the number of ways to arrange 0 objects is 1 (do nothing). The binomial coefficient C(n,0) = n!/(0!×n!) only works if 0! = 1.

How fast do factorials grow?

Faster than exponential. 10! is 3.6 million, 20! is 2.4 quintillion, and 70! is about 1.2 × 10^100 — larger than the number of atoms in the observable universe.

Can I calculate factorials of negative numbers?

Not with the standard definition. The factorial is only defined for non-negative integers. There's a related function called the gamma function that extends the idea to negative and non-integer values, but that's beyond this calculator's scope.

What's the largest factorial I can calculate here?

This calculator handles up to 500!. The result has 1,135 digits. JavaScript's BigInt handles it exactly, but displaying larger values becomes impractical.

Where do factorials show up in real problems?

Anywhere you count arrangements or permutations. Password combinations, seating arrangements, card shuffles, scheduling problems — if you're counting "how many ways can I order these things," factorials are involved.

Other Free Tools

Permutation Calculator – Calculate nPr Online

Calculate permutations (nPr) instantly with our free online permutation calculator. Find the number of ways r items can be arranged from n items with formula and solution shown.

Combination Calculator – Calculate nCr Online

Calculate combinations (nCr) instantly with our free online combination calculator. Find how many ways r items can be chosen from n items using the combination formula.

Probability Calculator – Calculate Probability of Events Online

Calculate the probability of any event with our free online probability calculator. Find simple, complementary, and conditional probabilities with formula explanations.

Pascal's Triangle Generator – Generate Pascal's Triangle Online

Generate Pascal's Triangle up to any number of rows with our free online generator. Visualize binomial coefficients, patterns, and number relationships in a clear triangle format.

Binomial Expansion Calculator – Expand (a+b)^n Online

Expand any binomial expression (a + b)^n with our free online binomial expansion calculator. Uses the binomial theorem with Pascal's triangle coefficients and full term listing.

Fibonacci Sequence Generator – Calculate Fibonacci Numbers Online

Generate the Fibonacci sequence up to any number of terms or find the nth Fibonacci number with our free online Fibonacci calculator. Fast and accurate for any value of n.

Big Number Calculator – Compute Huge Numbers Online

Calculate with extremely large integers using our free online big number calculator. Perform addition, subtraction, multiplication, and division on numbers of any size without overflow errors.

Random Number Generator – Generate Random Numbers Online

Generate random numbers within any range with our free online random number generator. Useful for games, statistics, lotteries, and any application requiring random values.