Factorial

n!=n×(n−1)×⋯×2×1n! = n \times (n-1) \times \cdots \times 2 \times 1

Worked example: 5! = 120 — press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Try different units for next level excitement!

Here the solver did the work — could you?

Counting the ways →

Grade 12Grade 12 Math

Test your skills in the Exam Room: new numbers every attempt — free lessons for students, no sign-up, just pure learning.

See your Report Card
Compete with your friends
share your results
Learning zone

Factorial explained

nn!

n! counts the orderings of n distinct things: the first slot has n candidates, the next n − 1, and so on. Five books on a shelf can be arranged 5! = 5 × 4 × 3 × 2 × 1 = 120 ways; ten books already reach 10! = 3,628,800. The factorial's explosive growth is why brute-force scheduling and travelling-salesman searches collapse so quickly — 52!, the number of orders a shuffled deck can take, is about 8 × 10⁶⁷, so essentially every properly shuffled deck in history has been a first.

The "!" notation is Christian Kramp's, introduced in 1808 mainly because printers hated the older bracket symbols. Two conventions catch people out: 0! = 1, not 0 — there is exactly one way to arrange nothing, and the whole edifice of combinations depends on it — and n! is only defined for whole numbers in counting problems. This calculator quietly extends to fractional inputs through the gamma function (Euler's continuous version, with n! = Γ(n + 1)), so 0.5! returns π/2≈0.886\sqrt{\pi}/2 \approx 0.886, but for counting keep n a whole number. Above 170 the answer exceeds what a double can hold.

Factorial formula

n!=n×(n−1)×⋯×2×1n! = n \times (n-1) \times \cdots \times 2 \times 1
Where
  • n!n!= Factorial of n
  • nn= Number of objects

Missing one of these? Work it out first, then come back