🎲 Permutation & Combination Calculator

nPr and nCr with the formula, the factorial expansion, and when to use each.

-

Results

How to Use the Permutation and Combination Calculator

Enter n (how many items you have) and r (how many you choose). Get nPr, nCr, or both, with the factorial expansion shown so you can follow the arithmetic.

1

Enter n, the total pool of items (up to 170).

2

Enter r, how many items are selected (r cannot exceed n).

3

Read nPr (order matters) and nCr (order does not), with the formula steps.

Permutations vs Combinations

The entire distinction is whether order matters. Permutations (nPr): arrangements where position counts. Electing officers, race results, PIN codes, batting orders. Formula: n!/(nβˆ’r)!. Combinations (nCr): selections where only membership counts. Committees, lottery tickets, pizza toppings, card hands. Formula: n!/(r!(nβˆ’r)!). Because every combination of r items can be arranged r! ways, nPr = nCr Γ— r!, always.

Worked Examples

Permutation: gold, silver, bronze medals from 10 runners. P(10,3) = 10!/7! = 10Γ—9Γ—8 = 720 possible podiums. Combination: 3-person committee from 10 people. C(10,3) = 10!/(3!Γ—7!) = 120 possible committees. Note 720/120 = 6 = 3!: each committee of 3 can be ordered 6 ways, which permutations count separately. Edge cases: P(n,0) = C(n,0) = 1 (one way to choose nothing); P(n,n) = n! (arrange all); C(n,n) = 1.

Where This Shows Up

Password strength is permutation math: a 6-character lowercase password has P(26,6)-style magnitude (26^6 with repetition). Poker odds are combination math: C(52,5) = 2,598,960 possible hands. Quality control sampling, clinical trial groupings, and lottery design all run on nCr. Whenever you see "how many ways," reach for one of these two formulas first.

Frequently Asked Questions

What is the difference between permutations and combinations?

Order matters in permutations, not in combinations. Picking a president, vice-president, and treasurer from 10 people is a permutation: the same three people in different roles are different outcomes. Picking a 3-person committee is a combination: the same three people are one outcome regardless of order. When in doubt, ask: would rearranging change the result?

What are the formulas for nPr and nCr?

nPr = n! / (nβˆ’r)!. nCr = n! / (r! Γ— (nβˆ’r)!). The combination formula divides by r! to remove the duplicate orderings that permutations count separately. That is why nCr is always smaller than nPr for the same n and r.

What is 0! and why?

0! = 1 by definition. It keeps the formulas consistent: nCn = n!/(n!Γ—0!) must equal 1 (there is exactly one way to choose all n items), which only works if 0! = 1. Combinatorially, there is exactly one way to arrange nothing: the empty arrangement.

How do I know whether to use permutations or combinations?

Ask whether swapping two chosen items creates a different outcome. Race finishing order, passwords, and seating charts: permutations. Lottery numbers, committees, and card hands: combinations. Password "ABC123" vs "321CBA" are different logins (permutation); lottery ticket 5-12-23 wins regardless of draw order (combination).

Why do the numbers get so big so fast?

Factorials grow super-exponentially: 10! is 3.6 million, 20! is 2.4 quintillion. That is why passwords get strong quickly with length, and why brute-forcing a 52-card shuffle (52! β‰ˆ 8Γ—10^67) is physically impossible. This calculator handles up to n = 170 before exceeding floating-point range.