Permutation and Combination Calculator
Work out how many ways you can arrange or choose r items from a set of n. Enter n and r to see permutations (nPr) and combinations (nCr) side by side, with the formulas and factorials behind each answer.
How to calculate permutations and combinations
- Enter n, the total number of items in your set.
- Enter r, how many of them you arrange or choose (0 to n).
- Read nPr for ordered arrangements and nCr for unordered selections.
Examples
Choosing 2 from 5
n = 5, r = 2
Permutations 20, Combinations 10
Choosing 3 from 10
n = 10, r = 3
Permutations 720, Combinations 120
Frequently asked questions
What is the difference between a permutation and a combination?
A permutation counts arrangements where order matters, so ABC and CBA are different. A combination counts selections where order does not matter, so ABC and CBA are the same group. For the same n and r, there are always at least as many permutations as combinations.
When does order matter?
Order matters when the positions are distinct, such as first, second and third place in a race, a ranked podium, or a sequence like a PIN. Use combinations when you only care which items are picked, such as the players on a team or the numbers on a lottery ticket.
What are the formulas for nPr and nCr?
Permutations use nPr = n! / (n - r)!. Combinations use nCr = n! / (r! (n - r)!), which is the permutation count divided by r! to remove the duplicate orderings. The exclamation mark means factorial, the product of all whole numbers up to that value.
Can you give a real lottery and team example?
In a 6-from-49 lottery, order does not matter, so the number of possible tickets is the combination 49C6, which is 13,983,816. Picking a 5-player starting team from a squad of 12 is also a combination, 12C5 = 792. Choosing a captain, then a vice-captain from 12 is a permutation, 12P2 = 132, because the two roles are different.
What happens at the edges, like r = 0 or r = n?
Choosing zero items gives exactly one outcome (the empty selection), so nP0 and nC0 are both 1. Choosing all n items gives nCn = 1 because there is only one full set, while nPn = n! because every ordering of the full set is distinct.
Why might the factorial show as too large?
Factorials grow extremely fast and quickly exceed the largest number a browser can store exactly, so n! is shown as too large to display once it overflows. The permutation and combination results are still computed step by step and stay accurate for moderate values of n even when n! itself cannot be shown.
Related tools
Standard Deviation Calculator
Calculate standard deviation and variance online. Paste a list of numbers to get the mean, count, and both sample and population results instantly.
Quadratic Equation Solver
Solve any quadratic equation ax^2 + bx + c = 0. Enter the coefficients to get the real or complex roots, the discriminant and the vertex.
Area Calculator
Find the area of a circle, square, rectangle, triangle, trapezoid, parallelogram, ellipse, sector or rhombus. Free and runs in your browser.
Arithmetic Sequence Calculator
Find the nth term, the sum of n terms and the full term list for any arithmetic or geometric sequence. Enter the first term, step or ratio, and n.
Average Calculator
Find the mean, median, mode, range, sum, count, min and max of a list of numbers. Paste values separated by commas, spaces or new lines.
Big Number Calculator
Add, subtract, multiply, divide, power, modulo, factorial, GCD and LCM on integers of any length. Exact results with no rounding, computed in your browser.