Toolzeroo  ›  Permutation and Combination Calculator
FREE BROWSER TOOL

Permutation and Combination Calculator

Count the ways to arrange or choose items, with or without repetition.

PERMUTATIONS (ORDER MATTERS)—
COMBINATIONS (ORDER DOES NOT)—
This tool is designed to process your input in your browser. No account is required.

About this tool

Uses exact whole-number arithmetic, so even very large answers are correct to the last digit; answers longer than 21 digits are shown in scientific notation. Works for n and r up to 10,000.

How many ways can 3 runners finish first, second and third out of 10? How many different 6-number lottery tickets are there? Questions like these are about permutations, where order matters, and combinations, where it does not. Enter the number of items and how many you choose, say whether items can repeat, and get both answers exactly.

How to use the Permutation and Combination Calculator

  1. Enter n, the total number of items to choose from.
  2. Enter r, how many you pick.
  3. Choose whether the same item can be picked more than once.
  4. Read the number of permutations and combinations.

Choosing 3 from 10

From 10 people, the number of ways to award gold, silver and bronze (order matters) is 10 × 9 × 8 = 720 permutations. The number of ways to pick a committee of 3 (order does not matter) is 720 ÷ 3! = 720 ÷ 6 = 120 combinations. A 4-digit PIN, where digits can repeat and order matters, has 10^4 = 10 000 possibilities.

Permutations versus combinations

A permutation counts ordered arrangements: ABC and CBA are different. Without repetition, nPr = n! ÷ (n − r)!. A combination counts selections where order does not matter: ABC and CBA are the same group. Without repetition, nCr = n! ÷ (r! × (n − r)!), which is nPr divided by the r! ways of ordering each group. With repetition allowed, permutations are n^r (like a PIN or a password), and combinations are (n + r − 1)! ÷ (r! × (n − 1)!), sometimes called stars and bars, such as choosing 3 scoops from 5 ice-cream flavours where you may repeat a flavour. The ! means factorial: 5! = 5 × 4 × 3 × 2 × 1 = 120, and 0! = 1.

Frequently asked questions

What is the difference between nPr and nCr?

nPr counts arrangements where order matters; nCr counts groups where it does not. nCr is always nPr divided by r!.

What are the odds of winning a 6-from-49 lottery?

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

Why is the answer 0 when r is bigger than n?

Without repetition you cannot choose more items than you have, so there are no ways to do it.

How do I count passwords?

Use permutations with repetition: the number of allowed characters to the power of the length.