Probability / Combination Calculator

Enter the total count (n) and the number to choose (r) to get permutations, combinations, and factorial instantly.

Enter n and r.

About permutations and combinations

Permutations and combinations are two fundamental ways of counting how many ways you can select or arrange items from a set — permutations count arrangements where order matters (like ranking 1st, 2nd, 3rd place), while combinations count selections where order doesn't matter (like picking a group of people for a team). This tool calculates nPr (permutations), nCr (combinations), and n! (factorial) for numbers you choose.

How each value is calculated

Factorial (n!) multiplies every whole number from n down to 1 (for example 5! = 5×4×3×2×1 = 120). Permutations (nPr) count ordered arrangements of r items chosen from n, calculated as n! ÷ (n−r)!. Combinations (nCr) count unordered selections of r items from n, calculated as n! ÷ (r! × (n−r)!) — always smaller than or equal to nPr for the same n and r, since it doesn't count different orderings of the same group separately. All calculations use BigInt arithmetic for exact results even with very large numbers.

Frequently asked questions

Why is n limited to 170?
Factorial values grow extremely fast — 171! already exceeds the largest number a standard double-precision float can represent, so the calculator caps n at 170 to keep every result exact using BigInt arithmetic rather than switching to an approximation.
What's a simple way to remember the difference between nPr and nCr?
Think of it this way: if you're assigning people to distinct roles (1st place, 2nd place, team captain vs. vice-captain), use permutations, since who gets which role matters. If you're just picking a group with no distinct roles (choosing 3 people for a committee), use combinations.
Why does the calculator show an error when r is greater than n?
You can't choose more items than exist in the set — for example, you can't arrange or select 5 items from a group of only 3, so both nPr and nCr are undefined (and shown as an error) whenever r > n.