Factorial Calculator
Calculate n! factorials, nPr permutations, and nCr combinations for any positive integer up to 170.
🔢 What is a Factorial?
Factorial is the product of all positive integers from 1 up to a given number n. It is written as n! and pronounced "n factorial." For example, 5! = 5 × 4 × 3 × 2 × 1 = 120, and 10! = 3,628,800. By mathematical definition, 0! = 1 because there is exactly one way to arrange zero objects, and this definition keeps all combinatorial formulas consistent. The factorial function is defined only for non-negative integers.
Factorials appear throughout mathematics, statistics, and science. In combinatorics, n! gives the number of distinct orderings (permutations) of n objects: 3 books can be arranged on a shelf in 3! = 6 ways. In probability, factorials appear in binomial coefficients, which count the number of ways to choose k successes in n trials. In calculus, factorials appear in Taylor series and power series expansions: e^x = 1 + x + x²/2! + x³/3! + ...
This calculator covers three closely related computations. Factorial (n!) finds the product of all integers from 1 to n. Permutation (nPr) counts ordered arrangements: nPr = n! / (n-r)!, used when the order of selection matters (first place, second place, third place are distinct outcomes). Combination (nCr) counts unordered selections: nCr = n! / (r! × (n-r)!), used when only the membership of the group matters and not the order in which members were chosen.
A common source of confusion is whether to use permutation or combination. The key question is: does swapping two selected items create a different outcome? If yes (a lock combination where 1-2-3 differs from 3-2-1), use permutation. If no (a committee where the same three people form the same committee regardless of selection order), use combination. The relationship between them is nCr = nPr / r!, because dividing by r! removes the r! different orderings of the same group.