Combinations & Permutations Calculator
Work out nCr and nPr for any n and r, with the working shown.
Last updated
How to calculate combinations and permutations
- Enter n, the total number of items.
- Enter r, how many you choose.
- Read nCr and nPr, with the working shown.
Combinations vs. permutations
Combinations (nCr) count how many ways to choose r items from n when order doesn't matter — picking {A, B} is the same as picking {B, A}. The formula is n! / (r! × (n − r)!). Permutations (nPr) count the same choice but treat different orderings as distinct — {A, B} and {B, A} count separately. The formula is n! / (n − r)!, which is always ≥ the combination count for the same n and r since it doesn't collapse the reorderings.
Factorials grow extremely fast, so very large n (roughly above 170) will overflow standard floating-point precision — results beyond that point may show as Infinity rather than a precise number. Nothing entered here is sent to a server; the calculation runs as JavaScript in your browser tab.
Questions about combinations and permutations
What is the difference between combinations and permutations?
In combinations the order doesn’t matter (a lottery draw); in permutations it does (a race’s first, second and third).
How many ways can I choose 6 numbers from 59?
59C6 = 45,057,474, the number of possible UK Lotto tickets.
What is the formula for nCr?
n! ÷ (r! × (n − r)!). For 5C2: 120 ÷ (2 × 6) = 10.
Why do very large numbers show as Infinity?
Factorials above about 170! are too big for standard number precision in the browser.