Combination Calculator

Combination calculator (nCr): count the ways to choose r items from n, with or without repeats, and permutations (nPr) when order matters. With lottery and poker examples.

Your choice

Number of ways

Number of ways–
Chance of one particular pick–
Combinations (nCr)–
Permutations (nPr)–

nCr = n! ÷ (r! × (n − r)!). nPr = n! ÷ (n − r)!. With repeats: combinations = (n + r − 1)C r, permutations = nʳ.

Maths checked by Josh Miller · updated Nov 2026How we calculate →

The combination calculator counts how many ways there are to choose r items from n. Choose 6 numbers from 59, as in UK Lotto, and there are 45,057,474 combinations: that’s why one line has a 1 in 45 million chance in each Lotto round. It’s free, and it also handles permutations, where the order matters, and choices where repeats are allowed.

Combination calculator: which type do you need?

Type Order matters? Repeats? Example Ways
Combinations (nCr) No No 5-card poker hand from 52 2,598,960
Combinations with repeats No Yes 3 scoops from 5 flavours 35
Permutations (nPr) Yes No 1st, 2nd and 3rd from 10 runners 720
Permutations with repeats Yes Yes 4-digit PIN 10,000

The test is simple: if swapping two items gives you something different, order matters. A lottery line 4-8-15-16-23-42 is the same ticket in any order, so it’s a combination. A tricast 4-8-15 is a different bet from 15-8-4, so it’s a permutation.

The formulas

  • Combinations: nCr = n! ÷ (r! × (n − r)!)
  • Permutations: nPr = n! ÷ (n − r)!
  • Combinations with repeats: (n + r − 1)! ÷ (r! × (n − 1)!)
  • Permutations with repeats: nʳ

Permutations are always the bigger number, by a factor of r!. 10 runners give 120 ways to pick three of them, but 720 ways to pick them in order, because each group of three can finish 6 ways.

Combinations in gambling

Lottery odds are combinations. EuroMillions is 5 from 50 times 2 Lucky Stars from 12: 2,118,760 × 66 = 139,838,160 possible tickets. Poker probabilities start here too: of the 2,598,960 five-card hands, just 4 are royal flushes. And betting systems are combinations of selections: 4 picks make 6 doubles (4C2), 4 trebles (4C3) and 1 fourfold, which is a Yankee.

For full lottery prize odds, use the lottery odds calculator. For a chance of something happening at least once, the probability calculator is the next step.

Combinations are the building block of card-draw odds. The hypergeometric calculator uses them to give the chance of drawing a number of hits from a deck, with versions for MTG and Yu-Gi-Oh.

Frequently asked questions

How do I calculate combinations?

Use nCr = n! ÷ (r! × (n − r)!). For 6 from 59 that's 45,057,474.

What's the difference between combinations and permutations?

In combinations the order doesn't matter. In permutations it does, so there are always more permutations.

How many combinations are there in UK Lotto?

45,057,474, choosing 6 numbers from 59.

How many 5-card poker hands are there?

2,598,960, which is 52C5.

More Lottery calculators

View all →