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.

Reviewed by the thecalcu.com team ยท Last updated July 30, 2026

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.

Why Use a Factorial Calculator?

Factorials grow so quickly that even moderately sized inputs produce enormous results, 10! is already over 3.6 million, and 20! exceeds 2.4 quintillion. Calculating these by hand means multiplying a long chain of numbers together, where a single arithmetic slip anywhere in the chain throws off the entire result.

This calculator removes that risk, computing the exact value instantly regardless of how large the input is, up to the limits of standard floating-point precision. A student verifying a combinatorics homework answer, or anyone working through a probability problem that requires a factorial as an intermediate step, gets an instant, reliable result.

Who Should Use This Calculator?

  • Students and teachers working through combinatorics, probability, or algebra problems that require factorial calculations.
  • Computer science students analysing algorithm complexity, where factorial growth rates appear in certain problem classes.
  • Anyone solving permutation or combination problems who needs the underlying factorial values as part of a larger calculation.
  • Statistics students working with probability distributions or combinatorial formulas that rely on factorials.
  • Puzzle and maths enthusiasts curious about how quickly factorial values grow for larger inputs.

What Insights Does the Factorial Calculator Give You?

The calculator gives you the exact factorial value, along with a breakdown that makes the calculation transparent:

  • n!, the headline result, the exact product of all integers from 1 to n.
  • Expansion, for smaller values of n, the step-by-step breakdown shows the full multiplication chain, making it easy to verify the calculation by hand if needed.

For larger values where showing the full chain wouldn't be practical, the breakdown instead shows the general pattern (n ร— (nโˆ’1) ร— (nโˆ’2) ร— ... ร— 2 ร— 1) so you can still see exactly how the result was derived.

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.
Show formula & methodology โ†“Show less โ†‘

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

What is a factorial?
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.
What is 0 factorial?
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.
Why do factorials grow so quickly?
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.
What is the largest factorial this calculator can compute?
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.
What are factorials used for?
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.
How is factorial different from exponentiation?
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.
Can I calculate the factorial of a negative number?
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.
What is the factorial of 10?
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.
How does this calculator handle very large factorials?
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.
What's the connection between factorial and permutations?
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