1. Combinations (Order Does NOT Matter)
Use C(n, r) = n! / (r!(n−r)!) for card hands, lottery draws, and committees. Example: C(52, 5) = 2,598,960 distinct 5-card hands.
THE TOOLBOX / SCHOOL & PROBABILITY MATH
Calculate exact BigInt combinations (nCr), permutations (nPr), and repetition variants with zero rounding error. Toggle order and repetition rules, explore poker and lottery presets, and inspect Pascal’s Triangle rows.
COMBINATORICS DECISION MATRIX
Use C(n, r) = n! / (r!(n−r)!) for card hands, lottery draws, and committees. Example: C(52, 5) = 2,598,960 distinct 5-card hands.
Use P(n, r) = n! / (n−r)! for race podiums or rankings without repeats, and nʳ when digits or letters can repeat (like a 4-digit PIN).
Continue with Standard Deviation Calculator, Scientific Calculator, or Sig Fig Calculator.
| Order Matters? | Repetition Allowed? | Formula | Example |
|---|---|---|---|
| No (Combination) | No | n! / (r!(n − r)!) | 5-card poker hand: C(52, 5) |
| Yes (Permutation) | No | n! / (n − r)! | Gold/Silver/Bronze from 10 runners: P(10, 3) |
| No (Multiset) | Yes | (n + r − 1)! / (r!(n − 1)!) | 3 scoops from 5 ice-cream flavors |
| Yes (Tuples) | Yes | nʳ | 4-digit PIN from 0–9: 10⁴ = 10,000 |
In a combination, order does not matter (selecting players {A, B, C} is the same as {C, B, A}). In a permutation, order matters (finishing 1st, 2nd, 3rd or entering a PIN code).
C(n, r) = n! / (r! × (n − r)!). For example, the number of 5-card poker hands from a 52-card deck is C(52, 5) = 2,598,960.
Standard floating-point math loses precision past 15 digits. This calculator uses exact JavaScript BigInt integer arithmetic locally so results remain 100% exact up to n = 500.
Using the "stars and bars" theorem, choosing r items from n types with repetition allowed equals C(n + r − 1, r) = (n + r − 1)! / (r! × (n − 1)!).