Math · free · step by step

Permutation and Combination Calculator

Work out nPr and nCr, with or without repetition, as exact whole numbers with the formula steps, and see every arrangement for small cases.

Answer

Step by step

Worked examples

Permutation and combination examples

Pnr=n!(n−r)!Cnr=n!r!(n−r)!

More math

Other math tools

Questions

Permutation and Combination Calculator FAQ

Free, private and works offline: everything is worked out in your browser.

What is the difference between a permutation and a combination?

In a permutation the order matters (a race finish, a PIN); in a combination it doesn’t (a team, a lottery draw). Choosing 3 from 10: there are 720 ordered arrangements but only 120 groups, because each group of 3 can be ordered 3! = 6 ways.

How do you calculate nPr?

nPr = n! ÷ (n − r)!. Cancelling leaves the r biggest numbers multiplied: 10P3 = 10 × 9 × 8 = 720.

How do you calculate nCr?

nCr = n! ÷ (r! (n − r)!), the number of ways to choose r items from n when order doesn’t matter. 10C3 = 720 ÷ 6 = 120, and a 5-card poker hand from 52 cards: 52C5 = 2,598,960.

What if repeats are allowed?

If order matters and items can repeat (like PIN codes), there are nʳ: a 4-digit PIN has 10⁴ = 10,000 possibilities. If order doesn’t matter and repeats are allowed (like choosing 3 scoops from 5 flavours), use (n + r − 1)Cr = 35.

What are my chances in a 6 from 49 lottery?

There are 49C6 = 13,983,816 possible draws, so one ticket has a 1 in 13,983,816 chance of the jackpot.

How big can the numbers be?

n and r can be up to 1,000, and answers are exact however many digits they have (1000! has 2,568 digits). Small cases also list every arrangement or group so you can see what is being counted.

Built and maintained by Zubaer Ahammed · Updated · Runs on your device; nothing you add is uploaded