Permutation and Combination Calculator guide
Permutation and Combination Calculator: nPr and nCr
Use our permutation and combination calculator to work out nPr and nCr, with and without repetition, for any n and r.
By the AllCalculator editorial teamUpdated 16 October 20261 min read
How many ways can you choose a team, arrange books on a shelf or pick lottery numbers? Our Permutation and Combination Calculator counts them.
How to use the calculator (Permutation and Combination Calculator)
- Enter the total number of items (n).
- Enter how many you choose (r).
You'll see combinations and permutations, with and without repetition.
Permutations or combinations?
- Permutations count arrangements where order matters, like 1st, 2nd and 3rd in a race.
- Combinations count selections where order doesn't matter, like a lottery draw.
The formulas
| Formula | |
|---|---|
| Permutations nPr | n! ÷ (n − r)! |
| Combinations nCr | n! ÷ (r! × (n − r)!) |
| Permutations with repetition | nʳ |
| Combinations with repetition | (n + r − 1)! ÷ (r! × (n − 1)!) |
n! (n factorial) means n × (n − 1) × … × 1.
A worked example
With the calculator's default settings, choosing 3 from 10:
- Combinations: 10 × 9 × 8 ÷ (3 × 2 × 1) = 120
- Permutations: 10 × 9 × 8 = 720
The UK Lotto picks 6 numbers from 59, so there are 45,057,474 combinations.
Frequently asked questions
Why is nPr bigger than nCr?
Each combination of r items can be arranged in r! orders, so nPr = nCr × r!.
What does "with repetition" mean?
That you can choose the same item more than once, like digits in a PIN. A 4-digit PIN has 10⁴ = 10,000 possibilities.
What's 0!?
It's defined as 1, which makes the formulas work when r = 0 or r = n.
To work out the chance of an event, use our Probability Calculator.
Sources and further reading
- GOV.UK: National curriculum in England – mathematicsgov.uk
- Wolfram MathWorld: Combinationmathworld.wolfram.com
Links open official and independent websites in a new tab.
This guide is general information to help you understand your options. It isn't financial, tax, legal or building advice and doesn't take your personal circumstances into account. Figures were checked when the guide was last updated and can change, so confirm anything important with GOV.UK, HMRC, a regulated adviser or a qualified tradesperson.