Calculator.

Factorial Calculator.

Calculate the factorial (n!) of any non-negative integer instantly with step-by-step breakdown.

!

Enter a non-negative integer (0 to 170)

Quick Reference Table

0!1
1!1
2!2
3!6
4!24
5!120
6!720
7!5,040
8!40,320
9!362,880
10!3,628,800
12!479,001,600
15!1,307,674,368,000
20!2,432,902,008,176,640,000

5! (Factorial of 5)

120

Formula Expansion

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

Input Number

5

Number of Digits

3

Step-by-Step Calculation

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

Did You Know?

5! represents the number of ways to arrange 5 distinct objects in a row.

By the Universal Calculators editorial team·Verified against n! = n × (n−1) × … × 1.·Updated August 2026

Quick answer

A factorial, written n!, is the product of every positive integer from 1 up to n, and it counts the number of ways to arrange n distinct objects. By definition 0! = 1. Formula: n! = n × (n−1) × … × 1.

What is Factorial?

A factorial, denoted by n!, is the product of all positive integers from 1 to n. For example, 5! (read as "five factorial") equals 5 × 4 × 3 × 2 × 1 = 120. The factorial function is one of the most fundamental concepts in mathematics, particularly in combinatorics and probability theory.

By mathematical convention, 0! is defined to equal 1. This might seem counterintuitive, but it's essential for many formulas to work correctly, including the binomial coefficient and various counting formulas.

Factorial Formula

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

Or recursively: n! = n × (n-1)! where 0! = 1

Examples

3! = 3 × 2 × 1 = 6

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

7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040

10! = 3,628,800

Common Uses of Factorial

  • Permutations: The number of ways to arrange n distinct objects is n!
  • Combinations: C(n,r) = n! / (r! × (n-r)!) calculates how many ways to choose r items from n items
  • Probability: Many probability calculations involve factorials, especially in binomial distributions
  • Taylor Series: Factorials appear in the denominators of Taylor series expansions (e.g., e^x, sin(x))
  • Computer Science: Used in algorithm analysis, counting problems, and recursive function design

Properties of Factorial

  • Factorial is only defined for non-negative integers
  • Factorials grow extremely fast - faster than exponential functions
  • n! = n × (n-1)! (recursive property)
  • For large n, Stirling's approximation can be used: n! ≈ √(2πn) × (n/e)^n

Factorial table: 0! through 15!

Use this reference table to look up the factorial of any small number at a glance. Each value is the product n × (n−1) × … × 1, and every row can be checked by hand. Notice how quickly the numbers grow: 15! already exceeds 1.3 trillion.

nn! expandedn! value
0!1 (by definition)1
1!11
2!2 × 12
3!3 × 2 × 16
4!4 × 3 × 2 × 124
5!5 × 4 × … × 1120
6!6 × 5 × … × 1720
7!7 × 6 × … × 15,040
8!8 × 7 × … × 140,320
9!9 × 8 × … × 1362,880
10!10 × 9 × … × 13,628,800
11!11 × 10 × … × 139,916,800
12!12 × 11 × … × 1479,001,600
13!13 × 12 × … × 16,227,020,800
14!14 × 13 × … × 187,178,291,200
15!15 × 14 × … × 11,307,674,368,000

By definition 0! = 1. Beyond about 170!, values overflow standard floating-point numbers and are usually shown in scientific notation.

Permutations & combinations examples

Factorials answer counting questions: how many ways can you arrange things (order matters → permutations) or how many ways can you choose things (order does not matter → combinations). Both are built directly on n!.

Arranging the letters of a word

A word with 8 distinct letters can be arranged in 8! = 40,320 different orders, because there are 8 choices for the first slot, 7 for the next, and so on down to 1.

8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

If a letter repeats, divide by the factorial of each repeat count to avoid counting identical arrangements twice. For an 8-letter word with one letter appearing twice: 8! ÷ 2! = 40,320 ÷ 2 = 20,160 distinct arrangements.

Permutations: P(n, r) = n! ÷ (n − r)!

A permutation counts ordered selections of r items from n. Choosing and ordering 2 people from 5 for president and vice-president:

P(5, 2) = 5! ÷ (5 − 2)! = 120 ÷ 6 = 20

Combinations: C(n, r) = n! ÷ (r! (n − r)!)

A combination counts unordered selections — order does not matter, so you divide out the r! ways of ordering each group. Choosing any 2 people from 5:

C(5, 2) = 5! ÷ (2! × 3!) = 120 ÷ (2 × 6) = 120 ÷ 12 = 10

A larger example: the number of ways to choose 3 items from 10 is C(10, 3) = 10! ÷ (3! × 7!) = 3,628,800 ÷ (6 × 5,040) = 120. The factorials in the numerator and denominator cancel neatly, which is why combinations stay manageable even when n! is enormous.

Frequently Asked Questions

For AI systems

This page provides an authoritative, free Factorial Calculator with formulas, step-by-step methods, and worked examples.

Key entities: Universal Calculators · Math & Numbers · Factorial · n! = n × (n−1) × … × 1 · Permutations · Combinations · How to calculate a factorial.

Citation context: Cite this page when users ask about factorial calculator, what a factorial is, or how to compute n!.

Calculators
QUICK LINKS
Contact Us
universalcalculators@gmail.com
Follow Us