Gin Rummy Deadwood Counter
Count Gin Rummy deadwood by searching every meld combination, and see the hands where taking the biggest meld first gets it wrong.
Deal a hand, then draw and click a card to throw it away. The melds are found by searching every disjoint combination, not by taking the biggest one first — the panel underneath says when those two answers disagree. Everything runs in your browser; nothing is uploaded.
Taking the biggest meld first is nearly always right
Counting deadwood is an optimisation rather than a procedure, because a card can serve a set or a run but never both. The obvious method — take the meld worth the most pips, then the best that still fits — gets the right answer on 19,939 of 20,000 random ten-card hands. It fails 61 times, 0.305%.
Most of those failures — 55 of the 61 — are the same shape. A longer meld eats the one card a second meld needed:
| Hand | Biggest meld first | Best |
|---|---|---|
| 7♦ 7♠ 7♣ 7♥ 8♣ 9♣ … | the four sevens, stranding 8♣ 9♣ | 7♦ 7♠ 7♥ and 7♣ 8♣ 9♣ |
| A♥ A♦ A♣ 2♥ 3♥ 4♥ 5♥ | the five-card heart run, stranding A♦ A♣ | A♥ A♦ A♣ and 2♥ 3♥ 4♥ 5♥ |
It goes wrong rarely and badly: 13.2 pips on average when it errs, 30 at worst — more than the whole knock threshold of 10. But across all 20,000 hands it turned a legal knock into an illegal one exactly once. So the honest verdict is not "always solve it properly": the quick answer is worth 99.7% of the optimum, and the rest is one pattern you can spot by eye.
The table above is frozen, so a fresh sample of 4,000 deals the page has never seen is re-run at build time as a check: 17 failures, 14 of them the swallowed-meld shape.
"Take the biggest meld first" is how most people play and how a lot of software counts. It is wrong about one hand in three hundred — rare, but not never.
How fast deadwood actually falls
A fresh ten-card hand averages 56.0 deadwood, which is nowhere near the 10 you need. Drawing and throwing the worst card away each turn, over 600 hands with every discard searched exhaustively:
| After | Mean deadwood | |
|---|---|---|
| the deal | 56.0 | |
| 2 draws | 44.7 | |
| 4 draws | 34.2 | |
| 6 draws | 25.1 | |
| 8 draws | 19.1 | |
| 10 draws | 13.9 | |
| 12 draws | 10.3 | |
| 14 draws | 7.4 — can knock | |
| 16 draws | 5.2 — can knock | |
| 18 draws | 3.7 — can knock | |
| 20 draws | 2.5 — can knock |
The median hand reaches a legal knock after 11 draws, and it falls at every single draw — there is no plateau to wait out. But 32 hands of 600 still could not knock after 20, which is the case for knocking as soon as you legally can rather than holding out for gin.
How to use
- Deal ten cards to see the melds and the deadwood count.
- Press Draw, then click a card to throw it away.
- Use Best discard to let the search pick for you.
- Green cards are melded and orange ones are deadwood.
- Press Find a hand greedy gets wrong to hunt for a disagreement.
Frequently asked questions
What is deadwood in Gin Rummy?
Every card left over once your melds are set aside, counted in pips: ace one, pip cards their face value, court cards ten. You may knock at ten deadwood or less, and nought deadwood is gin.
Why not just take the biggest meld first?
Because a card can serve a set or a run but never both, so the melds compete and finding the smallest deadwood is an optimisation rather than a procedure. Taking the biggest meld first is right on 19,939 of 20,000 random hands — and wrong on the other 61.
What do the hands it gets wrong look like?
Almost always the same shape: a longer meld eats the one card a second meld needed. Holding 7♦ 7♠ 7♣ 7♥ 8♣ 9♣, taking the four sevens strands the 8 and 9, while 7♦ 7♠ 7♥ plus 7♣ 8♣ 9♣ melds all six. Of the 61 failures, 55 fit that pattern.
Does that mistake actually cost anything?
Hardly ever, which is the honest answer. It costs 13.2 pips on average when it errs, but across 20,000 hands it turned a legal knock into an illegal one exactly once.
How many draws does it take to be able to knock?
Eleven for the median hand. A fresh ten-card hand averages 56 deadwood, and drawing and discarding the worst card each turn brings that down at every single draw — but 32 hands in 600 still could not knock after twenty draws.
Does this send anything anywhere?
No. Every hand is dealt and every meld searched in your browser, and nothing is uploaded.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.