Factorial Calculator
Enter a whole number and get its factorial — the product 1 × 2 × … × n that counts how many ways n distinct items can be arranged, the number behind permutations and combinations.
One number, one result
Enter a whole number n and the calculator returns n!, the product of every integer from 1 up to n — for example 5! = 120.
Counts arrangements
n! is the number of ways to put n distinct items in order, so it grows extremely fast — 10! is already over 3.6 million.
What is a factorial?
The product of every integer up to n
The factorial of a whole number n, written n! and read "n factorial", is the product of all positive integers up to n: n! = 1 × 2 × … × n. By convention 0! = 1, because there is exactly one way to arrange nothing. Factorials answer "how many ways can I order n distinct items", which is exactly the count behind permutations, and they appear inside the combinations formula too. Because each step multiplies by the next integer, factorials grow faster than any exponential — a small n already gives a huge n!.
Enter a whole number to get its factorial instantly, from 0! all the way up to 170!.
One formula, built from a single whole number n.
n! = 1 × 2 × … × nThe factorial multiplies every whole number from 1 up to n into a single running product. Starting from 1, the calculator multiplies by 2, then 3, and so on up to n. The empty product — the case n = 0 — is defined as 1, which is why 0! = 1. This tool supports values up to 170! because larger results exceed the range of standard floating-point numbers.
Suppose you want to know how many ways 5 books can be arranged on a shelf.
Identify n
n = 5 distinct books — order matters, so you want 5!.
Apply the formula
5! = 1 × 2 × 3 × 4 × 5.
Multiply
1 × 2 × 3 × 4 × 5 = 120 — there are 120 possible shelf orders.
The number you get is the count of distinct orderings of n different items — the number of ways to line them up so that order matters. The first thing to notice is how fast factorials grow: 5! is only 120, but 10! is already 3,628,800 (over 3.6 million) and 20! exceeds 2.4 quintillion, so even a modest n produces an enormous result. The edges are tidy: 0! = 1 and 1! = 1, since there is exactly one way to arrange nothing and one way to arrange a single item. Factorials are also the building block of other counts — permutations P(n, r) = n! ÷ (n − r)! and combinations C(n, r) = n! ÷ (r! × (n − r)!) both rest on them — so a factorial result is often a stepping stone to a probability or a counting answer rather than the final figure itself. Read a large factorial as "this many arrangements exist", and remember that values above 170! are beyond the range of standard floating-point numbers.
The factorial is exact, but a couple of points keep it from being misapplied.
Whole numbers only, 0 to 170
This calculator computes n! for whole numbers from 0 up to 170. The factorial as defined here has no value for negative numbers or fractions, so those return no result. The upper limit of 170 is a floating-point limit, not a mathematical one: 171! overflows the range of standard double-precision numbers and becomes infinity, so larger inputs return no result rather than a meaningless figure. For factorials of fractions you would need the gamma function, a different tool.