Math
Permutations & Combinations Calculator
Enter n (the number of items) and r (how many you choose) to get the number of permutations, where order matters, and combinations, where it does not.
Calculation inputs
n and r must be whole numbers with 0 ≤ r ≤ n. Very large results are shown in scientific notation.
Results
No result yet
Complete the fields and select Calculate to show results here.
About this calculator
This calculator finds the number of permutations (nPr) and combinations (nCr) when you choose r items from n, and shows the factorial working behind both. It suits students studying probability, and anyone counting arrangements or selections.
How the calculation works
- nPr = n! ÷ (n − r)!
- nCr = n! ÷ (r! × (n − r)!)
- nPr = nCr × r!
Notes and assumptions
Use permutations when order matters (race podiums, PIN codes without repeats) and combinations when it does not (lottery picks, committees).
By definition 0! = 1, so choosing zero items always gives exactly one way.
How it works in plain English
Permutations count arrangements where order matters. If you pick 3 people from 10 for gold, silver, and bronze, there are 10 choices for gold, 9 for silver, and 8 for bronze: 10 × 9 × 8 = 720. In factorial form that is 10! ÷ 7!, the general formula nPr = n! ÷ (n − r)!.
Combinations count selections where order does not matter. Choosing 3 people for a committee means each group of three was counted 3! = 6 times among the permutations, once for each ordering. Dividing removes the duplicates: nCr = n! ÷ (r! × (n − r)!), so 720 ÷ 6 = 120.
The tool multiplies only the terms it needs and uses exact whole-number arithmetic, so results stay accurate even when they run to dozens of digits. Very large answers are shown in scientific notation. Both formulas assume no repetition — each item can be used at most once.
The formula
- nPr = n! ÷ (n − r)!
- nCr = n! ÷ (r! × (n − r)!)
- nPr = nCr × r!
Worked example
A club of 12 members needs to choose a president, secretary, and treasurer, and separately a 3-person events committee.
The officer roles are distinct, so order matters: 12P3 = 12! ÷ 9! = 12 × 11 × 10 = 1,320 possible slates.
The committee has no roles, so order does not matter: 12C3 = 12! ÷ (3! × 9!) = 1,320 ÷ 6 = 220 possible committees. The ratio 1,320 ÷ 220 = 6 is exactly 3!, the number of ways to order three people.
Common counting results
| n, r | nPr | nCr | Example |
|---|---|---|---|
| 5, 2 | 20 | 10 | Pairs from 5 people |
| 10, 3 | 720 | 120 | Podium vs. group of 3 from 10 |
| 52, 5 | 311,875,200 | 2,598,960 | Five-card poker hands |
| 49, 6 | 10,068,347,520 | 13,983,816 | 6/49 lottery tickets |
Source: standard combinatorics formulas, as found in any probability textbook.
Frequently asked questions
When should I use permutations instead of combinations?
Use permutations when the order or position of the chosen items matters, such as race finishing places, seat assignments, or PIN codes with no repeated digits. Use combinations when only the group matters, such as lottery numbers, hands of cards, or a committee with no roles.
Why is 0! equal to 1?
There is exactly one way to arrange zero items — do nothing — so 0! is defined as 1. That definition also keeps the formulas consistent: nC0 and nCn both equal 1, since there is one way to choose nothing and one way to choose everything.
What if repetition is allowed?
This tool assumes each item is used at most once. If repetition is allowed and order matters, the count is n^r, such as 10^4 = 10,000 four-digit codes. With repetition and no order, the count is (n + r − 1)C r.
Why is nCr always smaller than or equal to nPr?
Every combination of r items can be arranged in r! orders, and each of those is a separate permutation. So nPr = nCr × r!, and since r! is at least 1, permutations are never fewer than combinations.
How large can n be?
The tool accepts whole numbers up to 1,000 and calculates exactly. Results with more than 21 digits are displayed in scientific notation so they stay readable.
Related tools
Trig, logs, powers, roots, factorials, and memory.
Add, subtract, multiply, and divide fractions.
Mean, variance, and standard deviation of a data set.
Discriminant and real or complex roots of a quadratic.