Permutation & Combination Calculator

nPr and nCr with and without repetition, exact for any size, with listings.

About this tool

Choose permutations or combinations, with or without repetition, and enter n and r. The exact count appears with the formula used and the odds of guessing one at random; examples load common cases. Type your own items to list every arrangement for small cases.

When order matters — and when it doesn't

Permutations count arrangements where order matters: the gold, silver and bronze from eight runners is 8P3 = 8 × 7 × 6 = 336, because Ada-Bob-Cy and Cy-Bob-Ada are different podiums. Combinations count selections where it doesn't: a lottery ticket of 6 numbers from 49 is 49C6 = 13,983,816, because the order you pick them is irrelevant. The general formulas are nPr = n! ÷ (n − r)! and nCr = n! ÷ (r! (n − r)!). Repetition changes both: a 4-digit PIN, where digits can repeat and order matters, has 10⁴ = 10,000 possibilities; choosing 3 pizza toppings from 10 where doubles are allowed is (10 + 3 − 1)C3 = 220. A five-card poker hand is 52C5 = 2,598,960. Results are exact for any size because the calculation uses big-integer arithmetic rather than floating point, and very large answers are also shown in scientific notation. Lottery odds explained: how the jackpot probability is calculated, and what it means and Dice probability explained: why 7 is the most common roll, and how to work out any odds put these counts to work, the lottery number generator draws a line, the dice roller rolls, and the random picker makes a real selection.

Frequently asked questions

What is the difference between a permutation and a combination?

Order matters in a permutation (podium places, passwords) and doesn't in a combination (lottery tickets, committees). For the same n and r there are always at least as many permutations.

How many combinations of 6 from 49 are there?

49C6 = 13,983,816, so one ticket has a 1 in 13,983,816 chance of matching all six.

What does 'with repetition' mean?

That the same item can be chosen more than once — like digits in a PIN, or a double topping on a pizza.

How large can n be?

Up to 10,000. Results are exact; listings are limited to the first 500 arrangements.