Gin Rummy

Gin Rummy is a two-player card game played with one 52-card deck. You are each dealt ten cards and take turns drawing one and throwing one away, building sets of the same rank and runs in the same suit. When the cards left outside your melds count ten points or less, you knock and the hand is scored. With none left at all you go gin. First past 100 points wins.

Hand 1 · 0–0
Score: you 0, computer 0, first to 100. Hand 1.
Deadwood71You0Computer0Stock31Match#20260918

Draw from the stock or take the discard, then tap a card once to select it and again to throw it — two taps, so a mis-tap never costs you a card. Your hand is arranged into the melds that count for least, and the number beside it is your deadwood. Knock lights up as soon as the ten cards left would count ten or less; with none at all it says Gin.

Your statistics

Played
0
Won
0
Win rate
0%
Streak
0
Best streak
0
Best time
—

A game counts as a win when you are first past 100 points, which usually takes about ten hands. Best score is your highest final total, game bonus and boxes included. Kept in this browser only.

Keyboard

← →
Move along your hand
Enter
Select a card, then discard it
D
Draw from the stock
T
Take the discard
P
Pass on the opening upcard
K
Knock with the selected card
H
Hint
N
New game
F
Full screen
Deck
One deck, 52 cards
Players
2 — you against the computer
Deal
10 cards each, 31 in the stock
Game
First past 100 points

How do you play Gin Rummy?

Ten cards each from one shuffled deck. One more card is turned face up to start the discard pile, and the 31 cards left over become the stock. On your turn you take exactly one card — the top of the stock, which nobody has seen, or the top of the discard pile, which everybody has — and then you throw one card away. That is the whole turn, and it repeats until somebody ends the hand.

You are trying to arrange your ten cards into melds: three or four of the same rank, or three or more in sequence in one suit. Whatever will not fit into a meld is your deadwood, and it is counted against you. The moment your deadwood is down to ten points or less you may knock — lay your hand out, announce the count, and have the hand scored on the spot.

An average hand of ten cards is dealt holding 65 points of cards and 57 points of deadwood, so there is a long way to travel — the deck holds 340 points in all, 120 of them in the twelve court cards. About two hands in five arrive with a meld already in them, and roughly one hand in fourteen hundred is dealt light enough to knock before a single card has been drawn. Being dealt gin has not happened once in sixty thousand hands measured on this shuffler.

What counts as a meld, and what does each card cost?

  • A set is three or four cards of the same rank — three sevens, or all four of them.
  • A run is three or more cards in sequence in a single suit: four, five and six of hearts. Longer runs are better, not two separate melds.
  • The ace is low only. Ace-two-three is a run; queen-king-ace is not a run at all — it is a queen, a king and an ace sitting in your hand for 21 points of deadwood, which is the single most expensive shape a beginner keeps hold of.
What a card is worth against you as deadwood
CardPoints
Ace1
Two to tenFace value
Jack, queen or king10

That puts 340 points in the deck, 120 of them in the twelve court cards alone. It is why an unattached king is the first card most players throw and an unattached ace is the last: the king costs ten times as much to be caught with, and the ace can sit in the hand almost for free while you wait to see whether it finds a partner.

Why can't one card be in two melds at once?

Because a card is one card. Hold the five, six and seven of hearts together with the seven of spades and the seven of diamonds and you are looking at two melds that both want the same card, and you may only have one of them. That single restriction is what makes counting your own hand harder than it looks, and it is where hand-rolled implementations quietly go wrong.

Three hearts, two more sevens and a king — the same six cards, two answers
ArrangementMeldedDeadwood leftCounts
Three sevens as a setSeven of hearts, spades, diamondsFive and six of hearts, king21
Five-six-seven of hearts as a runFive, six, seven of heartsSeven of spades, seven of diamonds, king24

The set wins that one. Move the identical shape down to the two, three and four of hearts with the two of spades and the two of diamonds and the answer flips: melding the deuces leaves a three and a four behind for seventeen, while running the hearts leaves two deuces for fourteen. No rule of thumb about sets before runs gets both cases right, so this board does not use one — it searches every legal arrangement of your ten cards and shows you the cheapest, every time your hand changes.

When should you knock in Gin Rummy?

Knocking is not free. The moment you lay your melds down, your opponent gets to lay off their own loose cards onto them — the fourth seven onto your three sevens, the eight of hearts onto your five-six-seven — and if what they have left is equal to or less than your count, they take the hand off you and collect a 25-point bonus on top. That is an undercut, and it is the single most expensive thing that can happen to a careless knock.

So the size of the knock matters enormously. Knocking on two or three points is nearly safe, because the defender needs a hand of two or three to catch you. Knocking on the full ten is an invitation. In self-play on this board, about one hand in ten ends in an undercut and about one in ten ends in gin; the remaining four-fifths are ordinary knocks, and they are usually worth far less than the 25 a single undercut swings.

The computer plays that trade explicitly. It takes gin whenever gin is available, because gin cannot be undercut and carries its own 25-point bonus. It knocks at once on four points or less. Above that it keeps drawing while there is stock left to improve the hand, and stops waiting once the stock is down to twelve cards, because a hand that runs out of stock scores nobody anything at all.

How does Gin Rummy scoring work?

Every way a hand can be scored
ResultWho scoresHow much
KnockThe knocker, if aheadThe defender's deadwood minus their own
Gin — no deadwood at allThe knockerThe defender's whole deadwood, plus 25
Undercut — defender equal or lowerThe defenderThe difference, plus 25
Stock down to two cardsNobodyNothing, and nobody takes the box

Hands are played until one player is past 100 points. That player then adds a 100-point game bonus, and both players add 20 points for every hand they won — the box, or line, bonus. A match on this board runs about ten hands, so roughly 200 points of boxes are handed out between the two players — twice the game bonus itself, which is why winning several small hands is worth far more than it looks during play.

Worked through: you knock with 10 and your opponent, having laid one card off, is left with 30. You take the difference, 20. Now suppose they had been left with 11 — you would take 1. Left with 10 instead, one point lower, they undercut you and take 25. That single point is worth 26 points, and it is the whole argument against knocking on a full ten.

What happens to the very first upcard?

This is the rule most implementations skip, and skipping it quietly changes who is on lead. The card turned up after the deal is offered first to the non-dealer. If they want it, they take it and discard, and the hand begins with them a card ahead. If they pass, the dealer gets the same choice. Only when both have refused it does the non-dealer draw — and it must be from the stock, because the upcard has now been turned down twice and is closed to them.

It is a real decision, and it is public. Taking that first card tells your opponent a rank and a suit you are working on before a single other card has moved, which is exactly the information a good player uses against you for the rest of the hand. The computer here refuses the upcard unless it measurably improves the hand, for that reason and no other.

One more rule follows from the same principle: you may never discard the card you have just taken from the pile. Picking a card up and putting it straight back down would be a free look at the pile at no cost, and the board will not let you do it — that card is dimmed and disabled until your next turn.

What happens when the stock runs out?

It does not quite run out. Once a discard leaves only two cards in the stock and nobody has knocked, the hand is dead: it is thrown in, nobody scores, nobody takes a box, and the same dealer deals again. Some households play on to the last card instead; the two-card floor is the standard rule and it is what this board enforces.

In practice it almost never happens — fewer than one hand in a hundred ends this way in self-play, because a player sitting on a knockable hand with the stock running down will knock rather than let the hand die. That is the practical lesson: a knock worth five points beats a dead hand worth nothing, and once the stock is short the cost of waiting for a better hand is the whole hand.

How do you get better at gin rummy?

  • Throw your big unattached cards firstA king costs ten points if you are caught with it and an ace costs one, so the same loose card is ten times more expensive at the top of the deck. With two throws that leave your hand equally well placed, the expensive one goes, and it goes early while the opponent still has too little shape for it to help them.
  • Count your fragments against the discard pile, not in the abstractThe nine and ten of spades look like two-thirds of a run until you notice the eight and the jack are both lying face up on the pile. At that point they are nineteen points of deadwood pretending to be a plan. Every card that could complete a pair or a broken run is either in the pile, in your hand, or still live, and only the third case is worth waiting for.
  • Watch what your opponent lifts off the pileA card taken from the discard pile is the only certain information you get all hand: it tells you a rank and a suit neighbourhood they are building in. Never feed the same area again unless you have to. The computer scores exactly this: a card matching a rank it watched you take carries the heaviest penalty in its discard choice, a card in the same suit two ranks either side carries a smaller one, and a card matching a rank you have already thrown away is treated as safer than an untouched one.
  • Knock small, or do not knockA knock on ten can be undercut by any defender left with ten or less, and the undercut is worth 25 plus the difference. Put numbers on it: knock on ten against a defender who lays off down to fifteen and you take five, but if they reach ten instead they take 25 — a thirty-point swing on the same knock, and more the further under you they land. Knocking on two or three is a different proposition entirely, because the defender has to be nearly gin to catch you.
  • Stop waiting when the stock gets shortOnce a discard leaves two cards in the stock the hand is dead and scores nobody anything, so a knockable hand held back for a better one can end up worth zero. With twelve or fewer cards left, take the points that are on the table — that is the rule the computer follows, and it beats holding out for gin.
  • Keep the card that can go two waysHold the five and six of hearts beside the six of spades, and the six of hearts is doing two jobs at once. Four different cards finish something for you: the four or the seven of hearts makes a run, and either of the two sixes you do not hold makes a set. A bare pair or a bare two-card run is waiting on two cards at best. So when you are forced to break something, break the shape with one way home and keep the one waiting on four.

Gin Rummy questions people ask

How many cards do you deal in Gin Rummy?
Ten each, from a single 52-card deck. One more card is turned face up to start the discard pile, which leaves 31 cards in the stock — and that stock is the clock the whole hand runs on.
Can you knock with 11 points of deadwood?
No. Ten is the limit and eleven is not a knock; the board simply refuses it. If you are sitting on eleven, your only choices are to draw again or to throw a bigger card and come back down under the line.
Is the ace high or low in Gin Rummy?
Low, always. Ace-two-three of a suit is a legal run, and queen-king-ace is not — it is two court cards and an ace, 21 points of deadwood dressed up as a meld. The ace itself is the cheapest card in the deck to be caught holding, at one point, which is why it is the last loose card most players throw.
Can you lay off cards when your opponent goes gin?
No. Gin ends the hand outright and the defender's deadwood counts in full, melds and all. That is a large part of what the 25-point gin bonus is really worth: against a knock the defender might have shed ten or fifteen points onto the melds on the table.
What happens if both players have the same deadwood?
The defender wins it. A knock has to be beaten outright, so equal counts are an undercut: the defender scores the 25-point bonus and the difference, which in that case is nothing. Matching the knocker is enough to take the hand off them.
What is a box worth in Gin Rummy?
Twenty points, awarded at the end of the game for every hand you won. Both players collect their boxes, so a long match where the loser took several hands can end much closer than the running score suggested.
Does the computer look at your cards?
No. It sees its own hand, the whole discard pile, and which cards you lifted off that pile in the open — all of it public at a real table. It never sees your hand or the stock. Measured over 2,000 seeded matches it wins about 61% of them against a bot that knocks the moment it legally can.

The rules in six lines

  1. 1Deal ten cards eachOne 52-card deck, ten cards to each player, one card turned face up to start the discard pile, and the remaining 31 cards left face down as the stock.
  2. 2Offer the upcard to the non-dealer firstThe non-dealer may take the turned-up card, and discard. If they pass, the dealer may take it. If both refuse, the non-dealer draws from the stock and the upcard is closed to them.
  3. 3Draw one card, then throw one awayOn every turn take the top of the stock or the top of the discard pile, then discard a card. You may never discard the card you have just taken from the pile.
  4. 4Build sets and runsThree or four of a rank, or three or more in sequence in one suit. The ace is low. A card can belong to one meld only, never to two at the same time.
  5. 5Knock at ten deadwood or lessCount the cards outside your melds: ace one, pips face value, court cards ten. At ten or under you may knock as you discard, laying your hand out face up.
  6. 6Let the defender lay offAfter a knock — but never after gin — the defender melds their own hand and adds any loose cards that fit onto the knocker's melds, reducing their own count before it is compared.
  7. 7Score the handThe knocker takes the difference in deadwood. Gin takes the defender's whole count plus 25. If the defender is equal or lower it is an undercut, and they take the difference plus 25.
  8. 8Play to 100, then add the bonusesHands continue until someone passes 100. That player adds 100 for the game, and both players add 20 for each hand they won. A hand left with two cards in the stock is dead and scores nothing.

The long version, with worked examples and the questions beginners actually ask, is on how to play gin rummy.

Put Gin Rummy on your own site

The board runs in an iframe with no tracking, no cookies and no sign-up. Paste this wherever you want it. See all the embeddable games for the rest.

<iframe src="https://www.cardgamenook.com/embed/gin-rummy" width="100%" height="620" style="border:0;border-radius:10px;max-width:900px" title="Gin Rummy — free online" loading="lazy"></iframe>
<p style="font:14px system-ui;margin:6px 0 0"><a href="https://www.cardgamenook.com/gin-rummy">Play Gin Rummy</a> at Card Game Nook</p>