Skip to content
Language:en

Permutation and combination calculator

nPr, nCr and n! with or without repetition, exact even for huge results.

Repetition

Runs entirely in your browser. Your files never leave your device.

About this tool

How many podiums can 10 runners make? How many lottery grids of 6 numbers out of 49? The first question is about permutations, where order matters; the second about combinations, where it does not. Enter n, the number of items, and r, how many you pick, and both counts appear together with n factorial.

Switch on repetition when an item can be picked again, like the digits of a PIN code or scoops of the same ice-cream flavour. The numbers grow fast, so results are computed exactly with big integers, and very large ones also come with a scientific-notation approximation. A handy check for probability exercises, card games and password strength estimates.

How it works

  1. Enter n, the number of items to choose from.
  2. Enter r, how many are chosen.
  3. Choose whether items can repeat.
  4. Read nPr, nCr and n!.

Without repetition: nPr = n! ÷ (n − r)! and nCr = n! ÷ (r! (n − r)!). With repetition: n^r ordered arrangements and (n + r − 1)Cr selections.

Worked example

10 runners, 3 places on the podium: order matters, so there are P(10, 3) = 10 × 9 × 8 = 720 possible podiums. If you only choose 3 runners for a relay team, order does not matter: C(10, 3) = 120 teams.

A 6 out of 49 lottery has C(49, 6) = 13,983,816 combinations, so one grid has about a 1 in 14 million chance. A 4-digit PIN with repetition allowed has 10^4 = 10,000 possibilities.

Good to know

  • Ask yourself: is ABC different from CAB? If yes, use permutations; if not, combinations.
  • Combinations are always permutations divided by r!, since each group can be arranged in r! orders.
  • For passwords, length matters more than character variety: each extra character multiplies the count.

Frequently asked questions

When does order matter?
When ABC and CBA count as different, such as rankings, codes or seating plans: use permutations. For a team, a hand of cards or a lottery draw, order does not matter: use combinations.
What are my odds in a 6 out of 49 lottery?
There are 49C6 = 13,983,816 possible grids, so one grid has about one chance in 14 million.
What is 0!?
By convention 0! = 1, so there is exactly one way to arrange nothing, and nC0 = nCn = 1.