numvana

Permutations & Combinations Calculator (nPr, nCr)

Calculate the number of ordered arrangements (nPr) and unordered selections (nCr) of r items chosen from a set of n.

Permutations (nPr) — order matters
720
Combinations (nCr) — order doesn't matter
120

How it works

Permutations count ordered arrangements: nPr = n! ÷ (n−r)!, the number of ways to arrange r of the n items where order matters (e.g. 1st/2nd/3rd place). Combinations count unordered selections: nCr = n! ÷ (r! × (n−r)!), the number of ways to choose r items where order doesn't matter — it's nPr divided by r! to collapse every group of r that's just a reordering of the same items into one.

Rather than computing full factorials (which overflow past 170! in ordinary floating-point math), this calculates nPr as the running product n × (n−1) × ... × (n−r+1) using exact integer arithmetic, so results stay exact even for n in the hundreds as long as r is modest — the way most real permutation/combination questions are shaped.

FAQ

What's a real example of the difference between nPr and nCr?

Choosing 3 winners (1st, 2nd, 3rd place) from 10 entrants is a permutation problem — order matters, so it's nPr(10,3) = 720. Choosing any 3 entrants to receive an identical prize is a combination problem — order doesn't matter, so it's nCr(10,3) = 120, six times smaller since each group of 3 can be ordered 3! = 6 ways.

Why is there a limit on how large n can be?

The results are computed with exact (arbitrary-precision) integer arithmetic, so there's no mathematical reason n couldn't be larger — the cap exists purely so the calculation stays instant and the result doesn't turn into an unreadably long string of digits, which happens quickly once n and r are both in the hundreds.

Related calculators