KO

Permutations vs combinations: nPr and nCr explained

The difference between permutations (nPr) and combinations (nCr), their formulas, how to enter them on a scientific calculator, and worked examples from lottery odds to PIN codes and card hands.

If order matters, it is a permutation: nPr = n!/(n−r)!. If order doesn’t matter, it is a combination: nCr = n!/(r!(n−r)!). Choosing a president and vice-president from 5 people gives 5P2 = 20 ways; choosing 2 representatives gives 5C2 = 10.

Does order matter?

Say you pick 2 of 5 people: Ann, Ben, Cal, Dee and Eve.

A combination is a permutation divided by the r! ways to arrange the chosen items, so nCr = nPr ÷ r!.

Formulas

Entering them on the calculator

Type n, press SHIFT × (nPr) or SHIFT ÷ (nCr), type r and press =. On a keyboard, type 5P2 or 5C2 with a capital P or C. Factorial is SHIFT x⁻¹ (x!).

Try 5P2 ▸ Try 5C2 ▸

Examples

SituationExpressionWays
Pick 6 lottery numbers from 1–4545C68,145,060
A 5-card poker hand from 5252C52,598,960
4-digit PIN, all digits different10P45,040
4-digit PIN, repeats allowed10⁴10,000
Line up 10 people10!3,628,800

The chance of matching all 6 numbers in a 6/45 lottery is 1 ÷ 45C6 = 1/8145060 ≈ 0.000000123, shown as 1.22773804×10⁻⁷ in scientific notation.

Try 1÷45C6 ▸

Big numbers

Factorials grow fast: 70! is about 1.197857167×10¹⁰⁰. This calculator handles integer factorials up to 3000! and switches to scientific notation when the result is long.

Published 2026-10-06 · Updated 2026-10-06 · Lumen Lab

More guides