Calculate all four types of counting: permutations/combinations with/without repetition. Decision guide, side-by-side comparison, visual size chart, and common examples.
How many outcomes, arrangements, or selections are possible? The answer depends on two questions: does order matter, and is repetition allowed? Those two choices define the four standard counting formulas in introductory combinatorics.
This calculator brings the four cases together in one place: permutations without repetition, permutations with repetition, combinations without repetition, and combinations with repetition. Enter n (pool size) and r (selection size), then compare the formulas side by side if you are unsure which model fits your problem.
That makes the page useful for lottery odds, password spaces, seating orders, team selection, and quick classroom checks when the main challenge is identifying the right formula before doing the arithmetic.
The hardest part of many counting problems is not the calculation itself but recognizing which assumptions apply. Showing all four formulas together makes it easier to spot whether your scenario is really a combination, a permutation, or a with-repetition case before you carry the result into a probability or odds calculation.
Four fundamental counting formulas: Order matters, no repetition: P(n,r) = n!/(n−r)! Order matters, with repetition: n^r Order doesn't matter, no repetition: C(n,r) = n!/(r!(n−r)!) Order doesn't matter, with repetition: C(n+r−1, r) = (n+r−1)!/(r!(n−1)!)
Result: C(52, 5) = 2,598,960
The number of possible 5-card poker hands from a 52-card deck is C(52,5) = 2,598,960. Order doesn't matter (receiving cards in different order is the same hand) and there's no repetition (each card is unique). For comparison, P(52,5) = 311,875,200 ordered deals and 52^5 = 380,204,032 with replacement.
Every counting problem in elementary combinatorics falls into one of four categories based on two binary choices: ordered vs unordered, and with vs without repetition. Understanding which paradigm applies is the crucial first step. The decision matrix in this calculator encodes this logic visually.
Probability = favorable outcomes / total outcomes. Each counting formula directly yields the denominator. If you want the probability of a specific event (drawing a royal flush in poker), count favorable outcomes (4) and divide by total outcomes (C(52,5) = 2,598,960), giving P ≈ 1.54 × 10⁻⁶.
Beyond the four basic formulas, advanced counting uses: inclusion-exclusion (for overlapping constraints), the pigeonhole principle (existence proofs), generating functions (for complex recurrences), Burnside's lemma (for symmetry), and bijective proofs (mapping to known counts). These build on the four fundamentals covered here.
Last updated:
Ask two questions: (1) Does order matter? If choosing items A, B and B, A are different, order matters → permutation. (2) Can items be reused? If yes → with repetition. This gives you exactly one of the four formulas.
n^r (ordered, repeated) ≥ P(n,r) (ordered, no repeat) ≥ C(n,r) (unordered, no repeat). Adding repetition increases counts; adding order increases counts. C(n+r−1,r) (unordered, repeated) is between C(n,r) and n^r.
P(n,n) = n! (all permutations of n items). C(n,n) = 1 (only one way to choose all items). n^n (permutations with repetition). C(2n−1,n) for combinations with repetition.
For constrained counting (at least one digit, no consecutive letters, etc.), use inclusion-exclusion: count unconstrained outcomes, then subtract forbidden ones. Or break into cases and sum.
If stage 1 has n₁ outcomes and stage 2 has n₂ outcomes, the total is n₁ × n₂. This generalizes to any number of stages and underlies all four counting formulas. It's the most fundamental rule in combinatorics.
The formulas work for any n and r, but the results can be astronomically large. C(100,50) ≈ 10²⁹. For practical purposes, logarithmic representations or scientific notation are used when results exceed standard number ranges.