All Tools

Combinatorics Calculator

Compute factorials, permutations, combinations, and multinomial coefficients. See step-by-step formula breakdowns and explore Pascal's Triangle interactively. All calculations run in your browser.

Result

5! = 120

Step-by-step breakdown

5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120

Pascal's Triangle

Click any cell to compute that combination C(n, r).

Reference Guide

Factorials

The factorial of n counts the number of ways to arrange n distinct objects in a line.

n!=n×(n1)×(n2)××2×1n! = n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1

By convention, 0!=10! = 1. Factorials grow very fast. For example, 10!=3,628,80010! = 3{,}628{,}800 and 20!20! is already a 19-digit number.

Permutations

A permutation counts the number of ordered arrangements of r items chosen from n distinct items. Order matters.

P(n,r)=n!(nr)!P(n, r) = \frac{n!}{(n-r)!}

For example, the number of ways to award gold, silver, and bronze medals to 3 of 10 athletes is P(10,3)=720P(10, 3) = 720.

Combinations

A combination counts the number of ways to choose r items from n distinct items when order does not matter.

C(n,r)=(nr)=n!r!(nr)!C(n, r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}

Combinations appear as entries in Pascal's Triangle, where row n and column r give C(n,r)C(n, r). A useful identity is C(n,r)=C(n,nr)C(n, r) = C(n, n-r).

Multinomial Coefficients

The multinomial coefficient counts the number of ways to divide n objects into groups of sizes k1,k2,,kmk_1, k_2, \ldots, k_m where k1+k2++km=nk_1 + k_2 + \cdots + k_m = n.

(nk1,k2,,km)=n!k1!k2!km!\binom{n}{k_1, k_2, \ldots, k_m} = \frac{n!}{k_1! \cdot k_2! \cdots k_m!}

A classic example is counting arrangements of the letters in MISSISSIPPI. With n=11n = 11 letters and groups (1,4,4,2)(1, 4, 4, 2) for M, I, S, P, the answer is 11!1!4!4!2!=34,650\frac{11!}{1! \cdot 4! \cdot 4! \cdot 2!} = 34{,}650.