Skip to content

Permutation and Combination Calculator

Count permutations (nPr) and combinations (nCr), with or without repetition, as exact numbers with steps, plus lottery odds such as Lotto 6/49.

Calculator Details

Combinations (order doesn’t matter):13,983,816See results ↓

How many different items there are to choose from

How many items are picked each time

No for lottery balls, cards or people; yes for PIN digits, dice or scoops of ice cream

Your Results

Combinations (order doesn’t matter): 13,983,816

Combinations (order doesn’t matter)

13,983,816

Chance of one particular selection: 1 in 13,983,816

Results

Permutations (order matters)

10,068,347,520

49P6

Combinations

13,983,816

49C6

Odds of one selection

1 in 13,983,816

Order doesn’t matter, all equally likely

Digits

8 / 11

In the combinations / permutations counts

All four ways to count

Choosing 6 of 49, with and without order and repetition
CountFormulaResult
Permutations (order matters)n! ÷ (n − r)!10,068,347,520
Combinations (order doesn’t matter)n! ÷ (r! × (n − r)!)13,983,816
Permutations with repetitionnʳ13,841,287,201
Combinations with repetition(n + r − 1)! ÷ (r! × (n − 1)!)25,827,165

Choosing 6 of 49 without repetition: 13,983,816 combinations (order doesn't matter) and 10,068,347,520 permutations (order matters).

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

How This Calculator Works

How permutations and combinations are counted

49P6 = 49! ÷ (49 − 6)! = 49! ÷ 43! = 10,068,347,520
49C6 = 49! ÷ (6! × 43!) = 10,068,347,520 ÷ 6! = 13,983,816
k = 0k = 49
C(49, k) for every k (sampled when n is large), relative to the largest. The highlighted bar is your r; the count peaks at k = n ÷ 2 and is symmetric, because choosing k items is the same as leaving n − k out.

A permutation counts ordered arrangements: picking a president, then a treasurer, is different from the reverse. A combination counts groups: the same six lottery numbers drawn in any order are one ticket. Each group of r items can be ordered in r! ways, so permutations = combinations × r!.

With repetition, every pick has all n choices again, giving nʳ ordered results. Unordered selections with repetition (a multiset, such as three scoops from ten flavours) use the “stars and bars” count C(n + r − 1, r). Every count here is an exact whole number, however many digits it has.

Frequently Asked Questions

What is the difference between a permutation and a combination?

Order. A permutation counts arrangements where order matters; a combination counts groups where it doesn’t. Gold, silver and bronze for 3 of 8 runners can be awarded in 336 ways (8P3), but the 3 runners who make the podium can be chosen in only 56 ways (8C3), because each group of 3 can be ordered in 3! = 6 ways.

What are the odds of winning Lotto 6/49?

Choosing 6 numbers from 49, in any order, gives C(49, 6) = 13,983,816 possible tickets, so a single ticket has a 1 in 13,983,816 chance of matching all six, the jackpot odds OLG publishes. Picking 7 from 50 (Lotto Max’s draw) gives 99,884,400 combinations per line.

How many 5-card poker hands are there?

C(52, 5) = 2,598,960. Order doesn’t matter in a hand, so it is a combination. If the order the cards were dealt mattered, there would be 311,875,200 sequences, which is 5! = 120 times more.

How many 4-digit PINs are possible?

10,000: each of the 4 positions can be any of the 10 digits and digits can repeat, so it is 10⁴, a permutation with repetition. A “combination lock” is really a permutation lock, since 1-2-3-4 and 4-3-2-1 open different locks.

What is a combination with repetition?

An unordered selection where the same item can be picked more than once, such as 3 scoops from 10 ice cream flavours where two scoops can be the same. The count is C(n + r − 1, r), the “stars and bars” formula: 220 for 3 scoops from 10 flavours. Excel calls it COMBINA.

What happens when r is bigger than n?

Without repetition there is no way to choose more distinct items than exist, so both nPr and nCr are 0 (Excel returns a #NUM! error instead). With repetition it is fine: 5 rolls of a 3-sided die give 3⁵ = 243 ordered results.

Why is C(n, 0) equal to 1?

There is exactly one way to choose nothing: the empty selection. The formula agrees, since n! ÷ (0! × n!) = 1 with 0! = 1. By the same symmetry, C(n, n) = 1 (take everything) and C(n, r) = C(n, n − r), because choosing which r to take is the same as choosing which n − r to leave.

Do these formulas use exact arithmetic?

Yes. Counts are worked out with whole numbers of unlimited size, so C(1000, 500), a 300-digit number, is exact to the last digit. Calculators that use floating point lose precision after about 15 digits and overflow beyond 10³⁰⁸.

Exact counts for choosing r of n distinct items (n and r up to 1,000): nPr, nCr, nʳ and C(n + r − 1, r), worked out with whole numbers of unlimited size. Odds assume every selection is equally likely, as in a fair lottery draw. Not included: items that are not all different (such as the letters of MISSISSIPPI), circular arrangements, restrictions such as “these two must sit together”, and the extra prize tiers of real lotteries.

Permutation and Combination Calculator: nPr, nCr and Lottery Odds

By FindMySum · Last reviewed

A permutation and combination calculator counts the ways to choose r items from a set of n. The answer depends on two questions: does the order of the chosen items matter, and can the same item be chosen more than once? Each pair of answers has its own formula, and the calculator works out all four exactly, however many digits the result has. This article explains when to use each, with the calculator's default example: the Canadian Lotto 6/49 draw.

The four counting formulas

Order mattersOrder doesn't matter
No repetitionnPr = n! ÷ (n − r)!nCr = n! ÷ (r! × (n − r)!)
Repetition allowednʳC(n + r − 1, r)

Excel has a function for each: PERMUT, COMBIN, PERMUTATIONA and COMBINA. The calculator's results match them where Excel can hold the number, and keep going where Excel overflows.

Permutations without repetition

Lining up r of n distinct items: n choices for the first position, n − 1 for the second, down to n − r + 1 for the last. Multiplying gives n! ÷ (n − r)!. Awarding gold, silver and bronze among 8 runners gives 8 × 7 × 6 = 336 outcomes.

Combinations without repetition

When order doesn't matter, every group of r items has been counted r! times among the permutations (once for each ordering), so divide by r!. The 3 podium finishers out of 8, regardless of medal, can be chosen in 336 ÷ 6 = 56 ways. This number, written C(n, r) or "n choose r", is the binomial coefficient described in NIST's Digital Library of Mathematical Functions §26.3.

Permutations with repetition

If each position can take any of the n items again, every one of the r positions has n choices, giving nʳ. A 4-digit PIN has 10⁴ = 10,000 possibilities; a 6-character password from 26 lowercase letters has 26⁶, about 309 million.

Combinations with repetition

Choosing r items where repeats are allowed and order doesn't matter is like putting r identical balls into n labelled boxes. The "stars and bars" argument turns it into choosing r positions out of n + r − 1, so the count is C(n + r − 1, r). Three scoops of ice cream from 10 flavours, where a double chocolate is allowed, can be served in C(12, 3) = 220 ways.

Worked example: Lotto 6/49

In Lotto 6/49 six numbers are drawn from 1 to 49 without replacement, and your ticket wins the jackpot if it matches all six in any order. Order doesn't matter and numbers can't repeat, so the number of possible tickets is

C(49, 6) = 49! ÷ (6! × 43!) = (49 × 48 × 47 × 46 × 45 × 44) ÷ 720 = 13,983,816

A single ticket has a 1 in 13,983,816 chance of the jackpot, which is the figure OLG publishes. If the order of the draw mattered, there would be 49 × 48 × 47 × 46 × 45 × 44 = 10,068,347,520 sequences: 720 times more, because each set of six can be drawn in 6! = 720 orders.

Reading the chart

The calculator draws C(n, k) for every k from 0 to n, with your r highlighted. The bars rise to a peak at k = n ÷ 2 and fall symmetrically, because choosing k items to take is the same as choosing n − k to leave behind: C(49, 6) = C(49, 43). For large n the shape approaches the bell curve of the normal distribution, the reason the binomial distribution is so often approximated by a normal one in statistics.

Edge cases

  • Choosing nothing. C(n, 0) = nP0 = 1: there is exactly one empty selection.
  • Choosing more than there are. Without repetition, r > n is impossible and both counts are 0. Excel reports #NUM! instead; mathematically the count is simply zero. With repetition, r can exceed n freely.
  • Very large numbers. C(1000, 500) has 300 digits. The calculator multiplies whole numbers of unlimited size, so the result is exact to the last digit, while a spreadsheet would show only the first 15 digits or overflow.

From counts to probabilities

When every selection is equally likely, the probability of one particular selection is 1 divided by the number of selections. That makes these counts the backbone of probability for cards, lotteries, quality-control samples and tournament brackets. For the chance of at least one success in repeated trials, or of exactly k successes, the probability calculator builds on the same binomial coefficients.

More questions

How do I decide whether a problem needs a permutation or a combination?

Swap two of the chosen items and ask whether you get a different outcome. If a committee of Ana and Ben is the same as Ben and Ana, order doesn't matter: use a combination. If Ana as chair with Ben as secretary differs from the reverse, order matters: use a permutation. Words like arrange, rank, sequence or code usually signal a permutation; group, team, hand or sample signal a combination.

How do I count arrangements of letters that repeat, such as in BANANA?

Divide the factorial of the total by the factorial of each repeated letter's count: 6! ÷ (3! × 2!) = 60 for BANANA, which has three As and two Ns. This multinomial coefficient is a different case from the four this calculator covers, which all assume the n items are distinct.

How many ways can people sit around a round table?

For n people around a circle, (n − 1)!, because rotating everyone one seat gives the same arrangement. Six people can sit in 5! = 120 distinct ways instead of 720. If a reflection counts as the same too (a necklace rather than a table), halve it again.

How are combinations related to Pascal's triangle?

Row n of Pascal's triangle lists C(n, 0), C(n, 1), …, C(n, n). Each entry is the sum of the two above it, which is the identity C(n, r) = C(n − 1, r − 1) + C(n − 1, r): a selection either includes a particular item or it doesn't. The same numbers are the coefficients when (a + b)ⁿ is expanded.

Does buying more lottery tickets change the odds a lot?

Each different ticket adds one more winning combination, so 10 tickets for Lotto 6/49 give 10 chances in 13,983,816, about 1 in 1.4 million. The odds improve in direct proportion to the number of distinct tickets, but they stay tiny; buying the same numbers twice adds nothing except a share of the prize.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy