Permutation and combination calculator (nPr, nCr)
Calculate permutations nPr and combinations nCr exactly, with or without repetition, for n up to 1,000.
Input
Tip: press Ctrl + Enter to run
Saved settings
About this tool
How many ways can a committee be chosen, a password be formed or a lottery ticket be filled? Permutations count arrangements where order matters; combinations count selections where it does not. This calculator gives both for n items taken r at a time, with or without repetition, using exact big-integer arithmetic so even huge counts are precise.
How to use it
- Enter n, the number of items to choose from.
- Enter r, the number chosen.
- Choose whether repetition is allowed.
- Run it and use permutations if order matters, combinations if it does not.
How the calculation works
Without repetition: nPr = n! ÷ (n − r)! and nCr = n! ÷ (r! (n − r)!). With repetition: permutations = n^r and combinations = (n + r − 1)! ÷ (r! (n − 1)!). All values are computed with exact integers.
nPr = n! ÷ (n − r)!; nCr = n! ÷ (r! (n − r)!)Worked example
A 6/49 lottery picks 6 numbers from 49 without repetition and order does not matter: there are 13,983,816 combinations, so one ticket has about a 1 in 14 million chance. If order mattered there would be 10,068,347,520 permutations. A 4-digit PIN (digits can repeat) has 10,000 permutations.
Sample input and result
Total items (n): 10 Items chosen (r): 3 Repetition allowed: No → Permutations (order matters): 720 → Combinations (order does not matter): 120
Limitations
- n and r up to 1,000.
- No restrictions such as "at least one of each type".
- Results are counts, not lists of arrangements.
Last updated:
Frequently asked questions
When does order matter?
For rankings, seats, passwords and race results, order matters (permutations). For teams, hands of cards and lottery tickets, it does not (combinations).
What if r is larger than n?
Without repetition there are no ways to choose, so the result is 0; with repetition it is allowed.
Why are some results so large?
Factorials grow very fast; the calculator keeps every digit.
Troubleshooting
The answer is 0.
r is greater than n without repetition.
My probability looks wrong.
Probability of one outcome = 1 ÷ the number of equally likely outcomes; check you used combinations vs permutations correctly.
A textbook gets a different count for repetition.
Check whether the problem allows repetition and whether order matters.
Privacy & Free to use
Are my inputs stored?
Your inputs stay in this tab. We do not receive your files, pasted text or calculation values.
Is this tool free?
Yes. No signup or payment is required.
See also
Useful next steps
Scientific calculator
Evaluate arithmetic, powers and trigonometric functions in radians without eval.
Maths & educationFraction calculator
Add, subtract, multiply or divide rational numbers exactly.
Maths & educationEquation solver
Solve real linear and quadratic equations ax² + bx + c = 0.
Maths & education