Guide

THE TOOLBOX / SCHOOL & PROBABILITY MATH

Combination Calculator —
Exact nCr, nPr & Repetition Solver.

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.

Presets:
Does order matter?
No = Combination (nCr) · Yes = Permutation (nPr)
Is repetition allowed?
Can the same item be picked more than once?
Combination C(52, 5)
2,598,960
Formula: 52! / (5! × (52 − 5)!)
Combination C(n, r)
2,598,960
Permutation P(n, r)
311,875,200
Comb. w/ Repetition
3,819,816
Perm. w/ Repetition (nʳ)
380,204,032

COMBINATORICS DECISION MATRIX

Choosing the right counting formula in probability and statistics.

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.

2. Permutations (Order DOES Matter)

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).

The 4 Counting Formulas Reference Table

Order Matters?Repetition Allowed?FormulaExample
No (Combination)Non! / (r!(n − r)!)5-card poker hand: C(52, 5)
Yes (Permutation)Non! / (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)Yesnʳ4-digit PIN from 0–9: 10⁴ = 10,000

Frequently Asked Questions

What is the difference between a combination (nCr) and a permutation (nPr)?

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).

What is the formula for nCr (combinations without repetition)?

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.

How does this calculator stay exact for large numbers like 100C50?

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.

What is the formula for combinations with repetition?

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)!).