Permutations & Combinations Calculator

Calculate permutations (nPr) and combinations (nCr) — enter how many items you have and how many you're choosing, and both results update as you type.

n and r must be whole numbers, with r no greater than n. Permutations (nPr) count arrangements where order matters; combinations (nCr) count selections where it doesn't. These formulas assume each item can be chosen only once (without repetition).
Result Live
Permutations (nPr)
Order matters
Combinations (nCr)
Order doesn't matter

Permutations vs. combinations: does order matter?

This is the one question that decides which formula applies. A permutation counts arrangements where order matters — first place, second place, and third place are different outcomes even with the same three people. A combination counts selections where order doesn't matter — a 5-card poker hand is the same hand no matter what order the cards were dealt in. Combinations are always smaller than or equal to permutations for the same n and r, since a combination is really just a permutation with all the equivalent re-orderings collapsed into one.

Formulas

Permutations
nPr = n × (n−1) × (n−2) × … × (n−r+1)   Example: 5P2 = 5 × 4 = 20
Combinations
nCr = nPr ÷ r!   Example: 5C2 = 20 ÷ 2! = 20 ÷ 2 = 10

nCr is just nPr with the r! ways of ordering each selection divided back out. If two people can occupy 1st and 2nd place in 20 different ordered ways (5P2), but a combination doesn't care about order, each unordered pair of two people has been counted twice (once for each order) — dividing by 2! (2) accounts for that.

Worked example: a 5-card poker hand

How many different 5-card hands are possible from a standard 52-card deck? Since the order the cards are dealt in doesn't change what hand you hold, this is a combinations problem: 52C5. Working it out gives 2,598,960 possible hands — the number every poker probability calculation ultimately builds on.

Frequently asked questions

What is the difference between nPr and nCr?

nPr (permutations) counts arrangements where order matters. nCr (combinations) counts selections where it doesn't. nCr is always nPr divided by r!, since that's how many equivalent orderings each unordered selection represents.

How many 5-card poker hands are possible?

2,598,960. This is 52C5 (choosing 5 cards from 52, where the order dealt doesn't matter), the foundation for calculating the odds of any specific poker hand.

What is nPr when r is 0?

1. There's exactly one way to arrange (or choose) zero items from any set — the empty selection — regardless of how large n is.