Calculator and Converter

Factorial calculator

The factorial of a whole number n, written n!, is the product of every whole number from 1 up to n.

Results

Enter your values to see the result.

About this tool

Enter n and the calculator returns n!. Factorials appear when counting the number of ways to arrange items, for example how many different orders a set of books can be placed on a shelf.

How it is calculated
n! = n × (n − 1) × … × 2 × 1, and 0! = 1
Worked example
With n: 10, the result is: n!: 3,628,800.
Good to know
The calculator accepts whole numbers from 0 to 170, with 0! defined as 1. Larger results exceed exact whole-number precision, so values for bigger n are shown as close approximations.

Frequently asked questions

Why is 0! equal to 1?

By convention an empty product equals 1, and this choice keeps counting formulas and combination formulas working. It also matches the fact that there is exactly one way to arrange zero items.

Why does the calculator stop at 170?

Factorials grow extremely quickly, and 171! is too large for standard number storage. The limit of 170 keeps every answer within a range the calculator can represent.

What does n! tell me about arrangements?

It counts the different orders in which n distinct items can be lined up. With n set to 5 the answer is 120, meaning five different objects can be arranged in 120 sequences.

Related calculators