Card game presets

Presets fill N and n only. Set K and k yourself.

P(X ≥ 1) = 0.399500 (39.95%)

X is the number of successes in 7 draws without replacement from 60 items, 4 of them successes. The highlighted bars and rows show at least 1 (X ≥ 1).

X = 0: 0.600500X = 1: 0.336280X = 2: 0.059344X = 3: 0.003804X = 4: 0.00007200.30.60101234Number of successes X (highlighted: X ≥ 1)P(X = x)
P(X = 1)0.33628033.63%
P(X < 1)0.60050060.05%
P(X ≤ 1)0.93678193.68%
P(X > 1)0.0632196.32%
P(X ≥ 1)0.39950039.95%
Mean nK/N0.4667
Variance0.3913
Standard deviation0.6255

Full distribution

Distribution of X for N = 60, K = 4, n = 7
XP(X = x)P(X ≤ x)P(X ≥ x)
00.6005000.6005001.000000
10.3362800.9367810.399500
20.0593440.9961240.063219
30.0038040.9999280.003876
40.00007210.000072

Two or three card groups at once

Need a combo, such as one key card and at least two lands? Enter the deck size, the cards drawn and up to three groups that do not overlap. The result is the chance that every group reaches its minimum in the same draw, summed exactly over every way to split the draw.

Group A

Group B

Group C (optional)

P = 0.321872 (32.19%)

Drawing 7 cards from 60: at least 1 of group A (4 in the deck), at least 2 of group B (24 in the deck). The other 32 cards fill the remaining draws.

Summed exactly over every way to split the draw between the groups (24 combinations counted), then divided by C(60, 7).

Every value is calculated in your browser from the standard normal distribution (Marsaglia’s series for Φ) and rounded to four decimals; the tables were checked cell by cell against an independent calculation. These tables give the area to the left of z. Some textbooks, including the NIST handbook, print the area from 0 to z instead, which is the left area minus 0.5 for positive z.

The hypergeometric formula

Draw n items without replacement from a population of N that holds K successes. The chance of exactly k successes is P(X = k) = C(K, k) × C(N − K, n − k) ÷ C(N, n), where C(a, b) counts the ways to choose b items from a. The numerator counts the hands with k successes and n − k failures; the denominator counts every possible hand. The mean is nK ÷ N and the variance is n × (K ÷ N) × (1 − K ÷ N) × (N − n) ÷ (N − 1).

  • P(X ≥ k) adds P(X = x) for x from k to n; P(X < k) adds the terms below k.
  • k can only range from max(0, n − (N − K)) to min(n, K); outside that, the chance is 0.
  • This page sums logarithms of factorials, so decks and batches of up to 100,000 stay accurate.

Hypergeometric or binomial?

Use the hypergeometric distribution when each draw removes an item, as with cards, raffle tickets or parts pulled from a lot. Use the binomial distribution when every trial has the same chance, as with coin flips or items put back after each draw. When the sample is a small share of the population, the two give close answers, and the factor (N − n) ÷ (N − 1) in the variance is the finite population correction that separates them.

  • Without replacement: hypergeometric, with N, K and n.
  • With replacement or a huge population: binomial with p = K ÷ N.

Worked card example

A 60-card deck holds 4 copies of a card and you draw a 7-card opening hand. Chance of no copy: C(56, 7) ÷ C(60, 7) = 0.6005. So the chance of at least one copy is 1 − 0.6005 = 0.3995, or 39.95%; exactly one copy is 0.3363. The binomial shortcut, 1 − (56 ÷ 60)^7, gives 0.3830, noticeably too low because it ignores that the cards are not replaced. Two more draws (n = 9, which is turn 3 on the play in a game where the first player skips the first draw) raise the chance to 0.4875.

  • The calculator opens with this example: N = 60, K = 4, n = 7, k = 1, highlighting X ≥ 1.
  • With 24 lands in 60 cards, the chance of at least 2 lands in 7 cards is 0.8573.

Card game presets and what they assume

The presets use the deck and hand sizes from each game’s published rules: 60 cards and a 7-card hand for Magic: The Gathering constructed and the Pokémon TCG, 40 cards and 5 for Yu-Gi-Oh!, and 100-card Commander decks with 7 cards. Commander decks have 99 shuffled cards plus a commander that starts outside the deck. The by-turn setting adds one draw per turn, skipping the first draw only where the rules say the player going first does not draw.

The result is a pure shuffled-deck probability. It does not count mulligans, searching, extra draws, prize cards you cannot reach or any card effects. This is an independent tool, not affiliated with or endorsed by Wizards of the Coast, The Pokémon Company or Konami; game names are used only to describe the rules.

How the card group calculation works

For groups A and B in n cards, the chance of at least a1 of A and at least a2 of B adds, over every x1 ≥ a1 and x2 ≥ a2, C(K1, x1) × C(K2, x2) × C(N − K1 − K2, n − x1 − x2) ÷ C(N, n). With a third group the same sum runs over x3. For the default example (4 key cards, at least 1; 24 lands, at least 2; 7 cards from 60) the answer is 0.3219: only about one hand in three has both.

Common questions

What is a hypergeometric distribution?

It describes the number of successes when you draw a fixed number of items without replacement from a finite population that contains a known number of successes.

How do I find the chance of drawing a card in my opening hand?

Enter the deck size as N, the copies as K, the hand size as n and k = 1, then read P(X ≥ 1). For 4 copies in a 60-card deck and 7 cards it is 39.95%.

Why not use the binomial distribution for a deck?

A binomial assumes every draw has the same chance. In a deck each card drawn changes the odds of the next, so the binomial is only an approximation and it understates the chance of seeing at least one copy.

Does this include mulligans or card draw effects?

No. It treats the draw as one random sample from a shuffled deck. Add extra cards you expect to see to n, or use the by-turn setting for ordinary turn draws.

Can I use it outside card games?

Yes. It fits quality control (defects in a sample from a lot), raffles, lottery matches and any draw without replacement. The 6 of 49 lottery matching 3 numbers is N = 49, K = 6, n = 6, k = 3, which gives 1.77%.

The studio notebook

A useful place to begin.

Clear steps, considered details, and ideas you can put to use.