Excel function

FACTfunction

Returns the factorial of a number (1 × 2 × … × n).

All versions
=FACT(A2)
A
B
1
2
3
4
5
6
7

Click a cell in the table to change number. 3.14159 is treated as 3 and 2.5 as 2. Try breaking it on purpose to see the errors.

Result

6

number
A2You can also click a cell in the table

The cell with the number to calculate. Click another value in the table.

What is the FACT function?

=FACT(number)

FACT multiplies every whole number from 1 up to the number (n!). Use it to count arrangements.

Decimals are truncated and negative numbers return #NUM!. Click a value in column A; column B shows the same formula copied down.

FACT is mostly a building block for counting arrangements and selections. Factorials grow very fast: FACT(170) is about 7.26 × 10^306, and anything larger is beyond what Excel can store, so it returns #NUM!.

Arguments

number
A number of 0 or more.

FACT examples

  1. Example 1. 5!

    =FACT(5)

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

  2. Example 2. 0!

    =FACT(0)

    1.

  3. Example 3. Ways to line people up

    =FACT(4)

    Four people can stand in a line in 24 ways.

  4. Example 4. How fast factorials grow

    =FACT(A2)

    Each step multiplies by the next number, so the result jumps quickly.

    A2=FACT(A2)
    36
    5120
    75,040
    103,628,800
  5. Example 5. Arrange 3 of 5 people

    =FACT(5)/FACT(2)

    60 ways, the same as PERMUT(5, 3).

  6. Example 6. Choose 3 of 5 people

    =FACT(5)/(FACT(3)*FACT(2))

    Order does not matter, so 10 ways, the same as COMBIN(5, 3).

Common mistakes

FAQ

Combinations?
Use COMBIN.
Permutations?
Use PERMUT.
Is there a double factorial?
Yes, FACTDOUBLE. FACTDOUBLE(6) is 6 × 4 × 2 = 48.