A fundamental counting principle calculator multiplies the number of choices at each stage of a process to find the total number of outcomes. It also counts repeated choices, ordered selections (permutations) and unordered selections (combinations). Enter the number of choices at each stage, or n and r, and press the button. The principle follows the Wikipedia page on the rule of product, and the work is done in your browser with exact whole numbers.
How to use the fundamental counting principle calculator
- Choose what you want: the counting principle, repeated choices, permutations or combinations.
- Enter the number of choices at each stage, separated by spaces, or enter n and r.
- Press Count.
The rule of product
The rule of product, also called the fundamental counting principle, says that if one choice can be made in a ways and another in b ways, then both can be made together in a × b ways. For several stages, the number of ways is the product of the numbers for each stage. The Wikipedia page gives the example of a set of 3 letters, A, B and C, and a set of 2 letters, X and Y: there are 3 × 2 = 6 pairs. It also gives a pizza example, with 2 crusts and 3 toppings, which can be ordered in 6 ways. In the calculator, enter 2 3 and you get 6.
More stages
The principle extends to any number of stages. A meal with 3 starters, 4 mains and 2 desserts can be chosen in 3 × 4 × 2 = 24 ways. A four-digit PIN with each digit from 0 to 9 has 10 × 10 × 10 × 10 = 10,000 possibilities. If any stage has no choices, the total is 0. Type the numbers of choices separated by spaces, and the calculator shows the multiplication and the result.
Repeated choices
When the same choice is made several times, with the same number of options each time, the product is a power. The page notes that if there are n types of sweets and k people each choose one, there are n to the power k outcomes. For 5 types and 3 people the answer is 5³, which is 125. A binary string of 10 bits has 2¹⁰, which is 1,024 possibilities.
Permutations
When items are chosen without repeats and the order matters, each choice reduces the number left by one. By the counting principle, the number of ordered selections of r items from n is n × (n − 1) × … × (n − r + 1). This is the number of permutations, written nPr. For 3 items chosen from 10, it is 10 × 9 × 8, which is 720. For all 5 items from 5, it is 5 × 4 × 3 × 2 × 1, which is 120, the factorial of 5.
Combinations
When the order does not matter, each group of r items has been counted r! times in the permutations, once for each order, so you divide by r factorial. The number of combinations is nPr divided by r!. For 3 items from 10, it is 720 divided by 6, which is 120. For a 5-card hand from 52 cards, the number of combinations is 2,598,960. The calculator shows the permutations and combinations side by side, so you can see how much the order adds.
Choosing the right method
Ask two questions. Do the choices happen one after another, in stages? Then multiply. Can the same item be chosen again? Then the number of options stays the same at each stage and you get a power. Does the order of the chosen items matter? If yes, use permutations, and if no, use combinations. The probability calculator on this site can then turn a count into a probability.
A worked example with a code
A locker code has 3 letters followed by 2 digits. If any letter from 26 and any digit from 10 can be used in each place, there are 26 × 26 × 26 × 10 × 10 codes, which is 1,757,600. Enter 26 26 26 10 10 in the calculator to see this. If letters cannot repeat, the choices for the letters drop to 26, 25 and 24, so the count falls to 26 × 25 × 24 × 100, which is 1,560,000. This is the difference between a stage-by-stage count with and without repeats.
Counting with restrictions
Sometimes a restriction changes the number of choices at one stage. If a three-digit number must not start with 0, the first digit has 9 choices, and the other two have 10 each, so there are 900 numbers. If the number must be even, the last digit has 5 choices, and then the count is 9 × 10 × 5, which is 450. The best method is to handle the most restricted stage first, and then multiply the choices at the other stages. The calculator multiplies the numbers you give, so you can enter the restricted counts directly.
Typing tips
Separate the numbers of choices with spaces or commas. The calculator handles up to 60 stages and very large totals exactly, so a long password count works as well as a small menu.
Common mistakes
- Adding instead of multiplying. Choices made in stages multiply.
- Counting order when it does not matter. Divide by r! for combinations.
- Forgetting that a stage with 0 choices gives 0. The whole product is then 0.
- Allowing repeats in a permutation. Each choice leaves one fewer item.
- Mixing up n and r. n is the pool, r is the number picked.
What next
Use this often? Add Fundamental to your Home screen.
Frequently asked questions
What is the fundamental counting principle?
If one choice can be made in a ways and another in b ways, then both can be made in a × b ways. With 2 crusts and 3 toppings there are 6 pizzas.
How do you use the fundamental counting principle calculator?
Enter the number of choices at each stage, separated by spaces. For 3 starters, 4 mains and 2 desserts, enter 3 4 2 to get 24.
What is the difference between a permutation and a combination?
A permutation counts ordered selections, nPr. A combination counts unordered ones, nPr ÷ r!. For n = 10 and r = 3: 720 and 120.
How many outcomes do repeated choices have?
n options chosen k times give n^k outcomes. For 5 options and 3 times, 5³ = 125.
What if one stage has no choices?
The product is 0, because the process cannot be completed.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.