Statohub Browse calculators
Calculator

Factorial Calculator

Calculate n! (n factorial) for any non-negative integer, showing the multiplication steps used to reach the final result.

Live calculator

Factorial Calculator

Calculate n! (n factorial) for any non-negative integer, showing the multiplication steps used to reach the final result.

Enter values and compute the result.

A factorial multiplies a whole number by every positive whole number below it, and it counts the number of ways a set of items can be arranged in order. This factorial calculator returns n! for any non-negative integer, the building block behind permutations, combinations, and most probability formulas.

How to use this calculator

  1. Enter a non-negative whole number n (0, 1, 2, 3, …).
  2. Read the result, written n! and spoken “n factorial”. The calculator multiplies n down to 1 for you, and returns 1 when n is 0.

Worked example

What is 5!? The factorial formula multiplies n by each smaller whole number down to 1:

n! = n × (n − 1) × (n − 2) × … × 2 × 1
5! = 5 × 4 × 3 × 2 × 1
   = 120

So 5! = 120, which is also the number of different orders in which 5 distinct items can be lined up. Factorials grow extremely fast: 6! = 720 and 10! = 3,628,800. For how factorials underpin counting, see the OpenStax College Algebra section on counting principles.

Frequently asked questions

Why does 0! equal 1?

By convention 0! = 1, because there is exactly one way to arrange an empty set — do nothing. Defining it this way keeps the permutation and combination formulas consistent, since they divide by factorials and would otherwise break when a term is zero.

What is the factorial formula?

The formula is n! = n × (n − 1) × (n − 2) × … × 2 × 1. Each factorial also builds on the last: n! = n × (n − 1)!, so 5! = 5 × 4! = 5 × 24 = 120.

What are factorials used for?

Factorials count arrangements (how many orders n items can take) and appear inside permutation and combination formulas, the binomial distribution, and many other probability and statistics calculations.