MATHS & STATISTICS / PROBABILITY

Permutation and combination calculator (nPr, nCr)

Count the ways to choose r items from n, with and without order and with and without repetition: nCr, nPr, nʳ and multisets.

Last reviewed:

← All tools

Your numbers

◈ Your values stay in your browser. No account needed.
YOUR RESULT

Enter your numbers to see a result.

WORKED EXAMPLE

Permutation and combination calculator (nPr, nCr): a worked example

With total items (n) 52, items chosen (r) 5, the combinations (order does not matter) is 2,598,960.

Inputs
Total items (n)52
Items chosen (r)5
Results
Combinations (order does not matter)2,598,960
Permutations (order matters)311,875,200
Permutations with repetition380,204,032
Combinations with repetition3,819,816
THE METHOD

How it works

Use combinations when order does not matter, such as lottery numbers or a hand of cards, and permutations when it does, such as race finishing positions or a PIN. Repetition means the same item can be chosen more than once. All four counts are calculated exactly with whole-number arithmetic; very large results are summarised in scientific notation.

FormulanPr = n! ÷ (n − r)!. nCr = n! ÷ (r!(n − r)!). With repetition: nʳ ordered, C(n + r − 1, r) unordered.
ASSUMPTIONS

Assumptions and limits

  • Without repetition, r cannot exceed n.
  • Counts are exact up to 30 digits; longer counts are rounded to six significant figures and marked as approximate.
  • Items are treated as distinguishable.
  • Results are estimates based on the inputs and assumptions on this page, not professional advice.
  • Try this: use “Save scenario A”, change one input and compare the two results side by side.
QUESTIONS

Frequently asked questions

How is the result of the “Permutation and combination calculator (nPr, nCr)” calculated?

nPr = n! ÷ (n − r)!. nCr = n! ÷ (r!(n − r)!). With repetition: nʳ ordered, C(n + r − 1, r) unordered. Use combinations when order does not matter, such as lottery numbers or a hand of cards, and permutations when it does, such as race finishing positions or a PIN. Repetition means the same item can be chosen more than once. All four counts are calculated exactly with whole-number arithmetic; very large results are summarised in scientific notation.

What does the worked example show?

With total items (n) 52, items chosen (r) 5, the combinations (order does not matter) is 2,598,960. Permutations (order matters): 311,875,200; Permutations with repetition: 380,204,032; Combinations with repetition: 3,819,816.

What assumptions and limits apply?

This is an estimate based on the inputs and assumptions shown on this page, not professional advice. Check anything with financial, health or safety consequences independently.

Is my data private?

Yes. Calculations run in your browser and your numbers are not sent to a server. A share link contains the inputs you choose to share, so check it before sending it to anyone.

How many 5-card hands are there in a 52-card deck?

52C5 = 2,598,960. Order does not matter in a hand, so this is a combination.

What is the difference between a permutation and a combination?

A permutation counts arrangements, so ABC and CBA are different. A combination counts selections, so they are the same. For the same n and r, nPr = nCr × r!.

How do I find the odds of winning a lottery?

Calculate the combinations for the draw, for example 6 numbers from 49 gives 49C6 = 13,983,816. One ticket's chance of matching all six is 1 in that number.

FOR WEBSITE OWNERS

Embed this calculator on your site

Free to use. Paste this where you want the calculator to appear. It resizes itself and links back to Calculator786.