Permutations & Combinations Calculator
Free nPr and nCr calculator — exact permutation and combination counts with formulas, for probability and counting problems.
Free nPr and nCr calculator — exact permutation and combination counts with formulas, for probability and counting problems.
Each box is one selection. The rows inside it are the 6 orderings that a selection treats as the same — which is exactly what “order does not matter” means.
Showing 12 of 56 selections — each one complete. 336 arrangements ÷ 6 orderings = 56 selections.
336 arrangements, but only 56 selections
nPr = 8!/(8−3)! counts arrangements — ABC and CBA are different. nCr divides that by 3!, because every selection of 3 items can be put in 6 different orders and a selection does not distinguish them.
The only question is whether order matters
A podium is an arrangement — gold, silver and bronze are different positions. A lottery draw is a selection — the balls come out in some order and nobody cares what it was. That single question tells you which formula to use, and nothing else does.
nPr = nCr × 3! — the 6 orderings are the whole difference
Take any one selection and there are 6 ways to order it. Permutations count all of them; combinations count the selection once. The grid below shows exactly that: each box is one selection, and the struck-through rows are the orderings it does not distinguish.
Picking one at random: 1 in 56
That is 1.786% for any particular selection. Small enough to enumerate, which is why the grid below can show you every one.
Why the formulas never divide factorials here
200C2 is only 19,900, but 200! is larger than a double can hold. Computing it as 200!/(2!·198!) gives Infinity ÷ Infinity, which is not a number at all — a correct formula producing no answer on a perfectly ordinary input. This calculator multiplies term by term with the division folded in, so the running value stays near the size of the answer.
Worked out in your browser — nothing is sent anywhere.
Save this result, change your inputs, and recalculate to compare scenarios side by side.
Compute 49C6 yourself and see exactly why the jackpot is so hard to hit.
How many 4-digit PINs without repeats? Arrangement counting made exact.
Exact nPr and nCr values with big-integer precision — no scientific-notation rounding errors.
How many distinct groups of 4 from a class of 20? One input away.
Five toppings you can take or leave give 32 possible pizzas, because each is independently on or off. That is why 'over a thousand combinations' claims are easier to hit than they sound.
Drawing cards, picking a jury or dealing a hand changes the odds at every step. Settling whether order matters and whether items go back is the part that decides which formula applies.
Permutations count arrangements where order matters; combinations count selections where it doesn't. Picking a president and vice-president from 10 people: 10P2 = 90 (order matters). Picking 2 committee members: 10C2 = 45 (order doesn't). Every combination corresponds to r! permutations, which is why nPr = nCr × r!.
nPr = n!/(n−r)! — multiply n × (n−1) × … for r factors. nCr = n!/(r!(n−r)!) — the same, divided by r! to cancel the orderings. Example: 10P3 = 10×9×8 = 720; 10C3 = 720/6 = 120. This calculator computes both exactly using big-integer arithmetic, so even large results are precise.
Use combinations for lottery-style problems ("chance of matching 6 of 49 numbers" → 49C6), card hands, and group selection. Use permutations when positions are distinct — race finishing orders, PINs without repeated digits, seating arrangements. The classic test: if swapping two chosen items creates a "different" outcome, order matters — use permutations.
By definition 0! = 1, which makes the formulas consistent: nC0 = 1 (one way to choose nothing) and nCn = 1 (one way to choose everything). Similarly nP0 = 1. These edge cases aren't arbitrary — they're required for the binomial theorem and recursive identities to hold.
Then the plain factorial overcounts, because swapping two identical letters produces an arrangement you cannot tell apart from the original. Divide by the factorial of each repeat count to correct it. The word MISSISSIPPI has eleven letters with four S, four I, two P and one M, so the number of distinguishable arrangements is 11! divided by (4! times 4! times 2!), which comes to 34,650 rather than the 39,916,800 that 11! alone would suggest. The same correction applies to arranging coloured beads, scheduling identical shifts, or counting routes on a grid where the moves in each direction are interchangeable.
Fix one position and arrange the rest, giving (n-1)! rather than n!. The reason is that a circular seating plan has no first chair — rotating everybody one place to the left produces the same arrangement of neighbours, so all n rotations of a layout are really one layout. Eight people around a table therefore have 7! = 5,040 distinct arrangements, not 40,320. If the arrangement can also be flipped over and still count as the same, as with a bead necklace or a bracelet, divide again by two to get (n-1)!/2. Deciding which of the three counts applies is usually harder than the arithmetic.