Permutation & Combination Calculator
Calculate permutations (nPr) and combinations (nCr).
Choose r items from n. Permutations count ordered selections, combinations count unordered ones.
Permutations (nPr)
720
Combinations (nCr)
120
nPr = n! ÷ (n−r)! and nCr = n! ÷ (r! · (n−r)!). Computed exactly with BigInt.
| Quantity | Value |
|---|---|
| n! | 3,628,800 |
| r! | 6 |
| (n − r)! | 5,040 |
| Permutations with repetition (nʳ) | 1,000 |
| Combinations with repetition C(n+r−1, r) | 220 |
Formulas
- Permutations: nPr = n! ÷ (n − r)!
- Combinations: nCr = n! ÷ (r! · (n − r)!)
- Permutations with repetition: nʳ
- Combinations with repetition: C(n + r − 1, r)
How to use Permutation & Combination Calculator
What this calculator does
This tool computes permutations (nPr) and combinations (nCr) — the two fundamental counting quantities from combinatorics. You enter the total number of items, n, and the number you are choosing, r, and the calculator returns both counts exactly. It also shows the supporting factorials (n!, r!, and (n − r)!) and the with-repetition variants, n to the power r for ordered selections and C(n + r − 1, r) for unordered ones. Because the numbers involved grow enormous very quickly, all the arithmetic uses BigInt for exact, full-digit results, and everything runs locally in your browser.
Why you might need it
Counting problems are the backbone of probability, statistics, and discrete maths. How many ways can you arrange a playlist of 12 songs? How many five-card poker hands exist? How many lottery tickets cover every combination? How many unique passwords of a given length are possible? Each of these is a permutation or combination calculation. Students need a dependable check for combinatorics homework, and anyone reasoning about probability needs accurate counts of favourable and total outcomes. A calculator that stays exact even when the numbers run to dozens of digits removes a real source of error.
How to use it
- Enter n, the total number of distinct items available.
- Enter r, how many of them you are selecting or arranging.
- Read nPr and nCr in the result card — they update as you type.
- Check the breakdown table for the factorials and the with-repetition variants, use the copy button for the headline result, and Reset to return to the example.
How it’s calculated
A permutation counts ordered selections. The formula is nPr = n! ÷ (n − r)!. The calculator evaluates it as a falling product, n × (n − 1) × … × (n − r + 1), which avoids building the full factorial and keeps the work small.
A combination counts unordered selections, so it divides out the r! ways each selection could have been ordered: nCr = n! ÷ (r! × (n − r)!), computed here as nPr ÷ r!. By definition nC0 and nCn both equal 1.
The with-repetition counts use different formulas. Ordered selections with repetition number nʳ, since every one of the r positions independently has n choices. Unordered selections with repetition — multisets — number C(n + r − 1, r), the “stars and bars” result. Every value is computed with BigInt so even large factorials are exact.
Common pitfalls
The most common error is choosing the wrong tool: if order matters use permutations, if it does not use combinations. A lottery draw is a combination; a race finishing order is a permutation. Another pitfall is forgetting that nPr and nCr assume no item is reused — for selections that allow repeats you need the with-repetition variants. People also try r greater than n, which has no valid count. Finally, beware ordinary calculators that overflow on large factorials and quietly return rounded or “infinity” results; exact counting needs exact arithmetic.
Tips and related calculations
A quick relationship worth knowing: nPr = nCr × r!, so permutations are just combinations multiplied by the number of orderings. Combinations are also symmetric — nCr equals nC(n − r) — so choosing what to leave out is the same as choosing what to take. Once you have a count of favourable and total outcomes from this calculator, a probability calculator can turn them into a probability. Because all the maths runs on your device with exact BigInt arithmetic, you can explore large counting problems freely and nothing you enter ever leaves the browser.
Frequently asked questions
What is the difference between a permutation and a combination?
Why does the calculator use BigInt?
What do 'with repetition' results mean?
What values of n and r are allowed?
Is anything I enter sent to a server?
Related tools
Probability Calculator
Calculate basic probabilities.
Factorial Calculator
Calculate factorials, even for very large numbers.
Fibonacci Generator
Generate the Fibonacci sequence up to any term.
Prime Number Checker
Check whether a number is prime.
Quadratic Equation Solver
Solve quadratic equations, including complex roots.
GCD & LCM Calculator
Find the GCD and LCM of multiple numbers.