Homeโ€บCalculatorsโ€บMathโ€บFactorial Calculator

Factorial Calculator

Math

Calculate the factorial of any number from 0 to 170 instantly. Get the exact result with step-by-step multiplication shown, free and in your browser.

0170

n!

120

This calculator computes your n! from the values you enter.

Inputs
Number (n)
Outputs
n!

What is a Factorial?

A Factorial Calculator computes n! โ€” the product of all positive integers from 1 up to n โ€” for any value from 0 to 170. Factorials are one of the most fundamental building blocks in combinatorics and probability, representing the number of ways to arrange a set of distinct items in order, but they grow so explosively fast that calculating them by hand beyond single digits quickly becomes impractical.

This calculator computes the exact result instantly, along with a step-by-step expansion showing the multiplication chain for smaller values. It's the computational foundation behind the Permutation & Combination Calculator and Probability Calculator, both of which use factorials internally.

How to use this Factorial calculator

  1. Enter or slide to the Number (n) you want to calculate the factorial of, from 0 to 170.
  2. Read the n! result card for the exact factorial value.
  3. Open the step-by-step breakdown to see the multiplication chain (for smaller values) or the general expansion pattern (for larger ones).
  4. Adjust the input to explore how quickly the result grows as n increases.

Formula & Methodology

The factorial of n is defined as:

n! = n ร— (n โˆ’ 1) ร— (n โˆ’ 2) ร— ... ร— 2 ร— 1, with the special case 0! = 1

Worked example: for n = 6:
- 6! = 6 ร— 5 ร— 4 ร— 3 ร— 2 ร— 1
- = 720

Worked example (larger value): for n = 15:
- 15! = 15 ร— 14 ร— 13 ร— ... ร— 2 ร— 1
- = 1,307,674,368,000

Frequently Asked Questions

A factorial, written as n!, is the product of all positive integers from 1 up to n. For example, 5! = 5 ร— 4 ร— 3 ร— 2 ร— 1 = 120. Factorials grow extremely quickly โ€” even 20! is already over 2.4 quintillion.
0! is defined to equal 1, not 0, as a mathematical convention rather than something calculated by multiplication. This definition keeps formulas involving factorials (like combinations and permutations) consistent at the boundary case of zero items.
Each step in a factorial multiplies the running total by an increasingly large number, so the growth compounds rapidly โ€” 10! is about 3.6 million, but 20! is already over 2.4 quintillion. This explosive growth is why factorials are central to combinatorics, where the number of possible arrangements grows just as fast.
This calculator supports values of n from 0 to 170. Beyond 170!, the result exceeds the maximum value a standard computer number can represent (around 1.8 ร— 10ยณโฐโธ), so 171! and beyond would overflow to infinity rather than a precise number.
Factorials are fundamental to combinatorics โ€” counting the number of ways to arrange or select items, as used in the [Permutation & Combination Calculator](/permutation-combination-calculator/) and the [Probability Calculator](/probability-calculator/). They also appear in calculus (Taylor series), statistics, and computer science algorithm analysis.
Exponentiation (like 5ยฒ) multiplies the same number by itself a fixed number of times, while a factorial (5!) multiplies a decreasing sequence of different numbers together. 5ยฒ = 25, but 5! = 120 โ€” the two operations grow very differently.
No โ€” factorials are only defined for non-negative integers (0, 1, 2, 3, ...) in standard mathematics. Extending the concept to non-integers requires the Gamma function, which is a different, more advanced calculation outside the scope of this calculator.
10! = 10 ร— 9 ร— 8 ร— 7 ร— 6 ร— 5 ร— 4 ร— 3 ร— 2 ร— 1 = 3,628,800. This is a commonly referenced example since it's large enough to show how quickly factorials grow, but still small enough to display in full.
For values of n up to 170, the calculator computes the exact result using standard floating-point arithmetic, which remains precise to about 15โ€“17 significant digits. For very large results, the number is displayed using standard numeric formatting, which may show in scientific notation for extremely large values.
The number of ways to arrange n distinct items in order (permutations) is exactly n! โ€” for example, there are 3! = 6 ways to arrange 3 distinct books on a shelf. This direct relationship is why factorial is the building block for the [Permutation & Combination Calculator](/permutation-combination-calculator/).
Also known as
n factorial calculatorfactorial of a number5 factorialfactorial formula calculatorpermutation factorial