Combinations & Permutations Calculator

Work out nCr and nPr for any n and r, with the working shown.

Copied

Last updated

Combinations (nCr) — order doesn't matter
Permutations (nPr) — order matters
Enter n and r above.

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.