Calculate combinations (nCr), permutations (nPr), and their factorials.
Last updated: 2026-05-24T22:58:31.803Z
Enter integer values for n and r (0 ≤ r ≤ n ≤ 1000).
C(10,3) - Combinations
120
Order doesn't matter
P(10,3) - Permutations
720
Order matters
10! (Factorial)
3628800
3! (Factorial)
6
Combinations measure the number of ways to choose r items from n items where the order doesn't matter. This is written as C(n,r) or "n choose r". For example, choosing 3 toppings from 5 available toppings is a combination problem.
Permutations measure the number of ways to arrange or order r items from n items where order matters. This is written as P(n,r). For example, arranging 3 people in a line from a group of 5 is a permutation problem. Permutations always result in larger numbers than combinations.
C(n,r) = n! / (r! × (n-r)!)
Choose r items from n, order doesn't matter
Properties: C(n,0) = 1, C(n,n) = 1, C(n,r) = C(n, n-r)
P(n,r) = n! / (n-r)!
Arrange r items from n, order matters
Property: P(n,n) = n! Example: P(5,2) = 5 × 4 = 20
Example 1: Lottery Ticket (Combinations)
How many ways can you choose 6 numbers from 49?
C(49, 6) = 49! / (6! × 43!)
= (49 × 48 × 47 × 46 × 45 × 44) / (6 × 5 × 4 × 3 × 2 × 1)
= 10,068,347 ways
Example 2: Podium Winners (Permutations)
In how many ways can 1st, 2nd, and 3rd place be awarded among 8 runners?
P(8, 3) = 8! / (8 - 3)! = 8! / 5!
= 8 × 7 × 6 = 336 ways
Order matters in races!
When selecting items where order doesn't matter (committees, teams, pizza toppings, lottery tickets).
When arranging or ordering items (race placements, passwords, seating arrangements, line-ups).
Because permutations count all arrangements of each combination. Each combination can be arranged r! ways.
By definition, 0! = 1. This makes formulas consistent (there's 1 way to choose nothing).
No. You can't choose 5 items from 3 items. C(n,r) and P(n,r) are 0 when r > n.
Combinations: divide out repetitions. Permutations: multiply all choices. P(n,r) = C(n,r) × r!.
C(n,r) ignores order, P(n,r) counts each ordering separately. P(n,r) = C(n,r) × r!.
Probability, statistics, game design, scheduling, and cryptography all rely on counting combinations and permutations.
Related Tools