Tools logoTools/
Math & Science/Permutation & Combination Calculator

Permutation & Combination Calculator

Permutations (nPr), combinations (nCr), and factorial of any n.

Runs locally·Free, no signup·Updated May 6, 2026
Loading tool…
How it works

A walkthrough, end to end.

  1. 1

    Enter n (total items) and r (chosen).

  2. 2

    The calculator returns nPr (permutations: ordered arrangements) and nCr (combinations: unordered selections).

  3. 3

    Both n! and r! are shown as bonus.

Reference

Permutations vs Combinations

Permutations: order matters — nPr = n! / (n−r)!. Combinations: order doesn't matter — nCr = n! / (r!(n−r)!). Lottery picks are typically combinations; race finishing positions are permutations.

Use cases

What you can do with this.

Lottery odds

Pick 6 from 49 → C(49, 6) = 13,983,816 combinations. Probability of winning = 1 in 14M. The calculator gives the count directly.

Password strength

Permutations of 10 characters from 26-letter alphabet: P(26, 10) = 1.92 × 10¹¹. Adding case + digits explodes the count further. Foundation of password-strength estimation.

Tournament brackets / standings

Order positions matter — use permutations. 8 teams with 3 podium positions: P(8, 3) = 336 possible podium orders.

Committee selection

Pick 5 from 12 (any order, no repeats) = C(12, 5) = 792 combinations. Useful for committee, jury, team selection.

Pizza topping combinations

Choose 3 toppings from 8: C(8, 3) = 56 unique combinations. Pizza shops use this math implicitly when sizing topping options.

Card games / poker hands

5-card hand from 52 cards: C(52, 5) = 2,598,960 distinct hands. Foundation of poker probability calculations.

Birthday paradox

Probability that 23 people share a birthday > 50%. Computed via complement of 'all 23 different birthdays' which uses permutations. The calculator supports the underlying math.

Factorial size

10! = 3.6M; 20! ≈ 2.4 × 10¹⁸; 50! ≈ 3 × 10⁶⁴. JavaScript loses precision around n = 18; calculator handles up to n=170 (Infinity above).

P&C calculator 2026 — what's current

Foundational combinatorics. AI tools handle reliably. Calculator wins for speed and verification.

FAQ

Frequently asked.

  • If order matters (race positions, password characters, arrangement) → permutation. If order doesn't matter (lottery, committees, hand of cards) → combination.

  • Factorials overflow ~170! → Infinity in JavaScript Number. The calculator returns Infinity above this. For larger numbers, use BigInt or specialized libraries.

  • nC0 = 1 (one way to choose nothing). Same for nCn (one way to choose everything). Edge cases the formula handles correctly.

  • No. Calculations run entirely in your browser.