nCr and nPr Calculator
Compute combinations (nCr) and permutations (nPr), plus their with-repetition counterparts, for choosing r items from n.
How it works
nCr = n! ÷ (r!·(n − r)!) · nPr = n! ÷ (n − r)! · With repetition: combinations = (n + r − 1)C r, permutations = nʳ
Permutations count arrangements where order matters; combinations count selections where it does not. Because each combination of r items can be ordered r! different ways, nCr = nPr ÷ r! — combinations are always the smaller number. When items may be reused, the counts change: ordered selections with repetition are simply nʳ, and unordered selections with repetition use the “stars and bars” count (n + r − 1) choose r. This tool computes all four so you can pick the model that matches your problem.
Worked example
Choosing 3 from 10 without repetition: nPr = 10 × 9 × 8 = 720 ordered picks, and nCr = 720 ÷ 3! = 720 ÷ 6 = 120 unordered picks. Allowing repetition, ordered selections number 10³ = 1000, and unordered selections number (10 + 3 − 1) choose 3 = 12C3 = 220.
Sources: Combination — Wikipedia
Frequently asked questions
When should I use combinations versus permutations?
Use permutations when the order of selection matters — a podium of gold, silver and bronze, or a PIN. Use combinations when order is irrelevant — a hand of cards or a committee, where the same members in any order count once.
What does “with repetition” change?
It lets the same item be chosen more than once, like rolling a die several times or forming a multiset. Ordered-with-repetition is nʳ; unordered-with-repetition uses the stars-and-bars formula (n + r − 1) choose r.
Why can nCr be computed without giant factorials?
Multiplying and dividing term by term — res × (n − r + i) ÷ i for i from 1 to r — keeps the running value near the final answer and stays exact for integer results, so it handles large n that would overflow a direct n! computation.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.