Combinations Calculator

Next

C(n, k), read “n choose k”, counts the number of ways to pick k items from n when order doesn’t matter. Pick 3 toppings from 10 → C(10, 3) = 120. Deal 5-card hands from 52 → C(52, 5) = 2,598,960. The calculator accepts n up to 170, returns the exact integer result using arbitrary-precision arithmetic (no scientific-notation rounding), and also shows the matching permutation count P(n, k).

How combinations are calculated

  1. 1

    Enter n and k

    Both non-negative integers with k ≤ n. n is the pool size; k is the selection size. Values above 170 are capped.

  2. 2

    Formula applied

    C(n, k) = n! / (k! × (n−k)!). The tool also computes P(n, k), the number of ordered selections.

  3. 3

    Exact integer output

    The calculation uses exact integer arithmetic, so results never lose digits, even for values as large as C(170, 85).

  4. 4

    Both results shown

    Combinations C(n, k) and permutations P(n, k) are displayed together; P(n, k) = C(n, k) × k!.

The formula

C(n, k) = n! / (k! × (n − k)!)

Equivalent: C(n, k) = (n × (n−1) × … × (n−k+1)) / k!

Worked examples

  • C(10, 3) = 120: ways to pick 3 toppings from 10.
  • C(52, 5) = 2,598,960: 5-card poker hands from a standard deck.
  • C(49, 6) = 13,983,816: UK National Lottery main draw combinations.
  • C(70, 5) × 25 = 302,575,350: Mega Millions jackpot combinations (5 main balls from 70 + 1 Mega Ball from 25).
  • C(100, 50) ≈ 1.01 × 10²⁹: subsets of half a 100-item set.

Combinations vs permutations

  • Combination C(n, k): order doesn’t matter. Picking {A, B, C} is the same as {C, B, A}.
  • Permutation P(n, k): order matters. {A, B, C} differs from {C, B, A}.
  • Relationship: P(n, k) = C(n, k) × k!

Lottery draws are combinations (order of balls doesn’t matter). Race finish positions are permutations (first, second, third matter).

Pascal’s triangle

C(n, k) forms Pascal’s triangle when arranged:

            1
           1 1
          1 2 1
         1 3 3 1
        1 4 6 4 1
       1 5 10 10 5 1
      1 6 15 20 15 6 1

Each entry C(n, k) is the sum of the two entries above it: C(n-1, k-1) + C(n-1, k). Symmetric: C(n, k) = C(n, n-k).

Properties

  • C(n, 0) = C(n, n) = 1: only one way to pick nothing or everything.
  • C(n, 1) = n: n ways to pick one item.
  • Sum of row n: Σ C(n, k) from k=0 to n = 2ⁿ. Total subsets of an n-item set.
  • Hockey-stick: Σ C(i, k) from i=k to n = C(n+1, k+1).

Real-world applications

  • Lottery odds: 1 / C(n, k) for exact numbers drawn.
  • Sampling design: picking test groups from a population.
  • Genetics: counting possible offspring genotypes.
  • Scheduling: round-robin tournaments need C(teams, 2) games.
  • Binomial distribution: P(X = k) = C(n, k) × p^k × (1-p)^(n-k).
  • Committee selection: ways to form a committee of 5 from 20 members = C(20, 5) = 15,504.

Large numbers: still exact

Results grow quickly: C(100, 50) already has 30 digits. The calculator caps n at 170, which covers every practical use such as lotteries, committees and sampling, and keeps every answer exact because the calculation uses arbitrary-precision integer arithmetic rather than floating point.

Frequently Asked Questions

Picking k items to include is mathematically equivalent to picking n-k items to exclude. Same number of arrangements. C(10, 3) = C(10, 7) = 120.

C(n, k) = 0 by convention when k > n, you can’t pick more items than you have. The calculator flags this and returns 0.

The calculator accepts n up to 170 and always returns the exact integer. For standard lottery and probability problems, n is almost always under 100.

No. “Combinations with repetition” (also called multisets) use a different formula, C(n+k−1, k), which this tool does not compute. Treat that case as a separate problem.

Related Tools