Bits & Odds

Programming Video Poker Strategies: How Every Hand Is Solved Exactly

Updated 2026-10-21

Every number in the video poker section of this site comes from one calculation: for every hand you can be dealt, the exact expected value of every way to play it. Nothing is simulated or sampled, and nothing is copied from a strategy chart. This page explains how that calculation works, and how you can check it.

The size of the problem

A 52-card deck deals 2,598,960 different five-card hands, and each can be played 32 ways: hold any subset of the five cards, from all of them to none. Pricing one hold means looking at every draw that could follow it. Keep two cards and three come from the 47 left, which is 16,215 draws; throw all five away and it is 1,533,939. Added up over all 32 holds, one dealt hand takes exactly 2,598,960 hand evaluations, so pricing every hold of every deal naively takes 2,598,960 squared, almost seven trillion.

Two reductions make it practical. First, suits are interchangeable: a four-card heart flush plays exactly like a four-card spade flush. Relabelling suits in a fixed order collapses the 2,598,960 deals into 134,459 distinct hands. Second, the draws for different holds overlap heavily, and inclusion–exclusion over the discarded cards lets all 32 holds of a hand share one count of how many final hands of each type contain the cards you kept. Together they bring a full solve of one paytable down to seconds.

Exact answers, not decimals

Every count is an integer, so every expected value is an exact fraction. That matters in two places. The overall return of 9/6 Jacks or Better is 1,653,526,326,983 / 1,661,102,543,100, or 99.5439%. Full-pay Deuces Wild is 32,187,682,693 / 31,944,279,675, or 100.7620%. And deciding which hold is best sometimes means comparing two plays whose values differ by less than a billionth. Floating-point arithmetic cannot tell those apart reliably. Exact integers can, and they also show which plays are genuine ties: 876 Jacks or Better deals have two equally good holds, most of them four of a kind with a kicker.

How to check us

  • Against the book. Stewart N. Ethier's The Doctrine of Chances (Springer, 2010), chapter 17, derives both games exactly. Our returns, our 9/6 payout distribution (royal flushes 41,126,022 out of 1,661,102,543,100, for example) and our variances (19.514676 for 9/6, 25.834618 for full-pay Deuces Wild) match his to the last digit.
  • Against the Wizard of Odds. Michael Shackleford's analyzers publish the same returns to six decimal places, and his hand analyzer ranks all 32 holds as ours does.
  • Hand by hand. The hand analyzer ranks all 32 plays of any hand, computing each one by enumerating every draw behind it, separately from the stored solution that names the best hold. If you find a hand where we disagree with a solver you trust, that is a bug.

Credits

The mathematics is Ethier's, whose chapter on video poker is the most rigorous treatment in print. Shackleford's Wizard of Odds made exact video poker analysis public long before this site existed. Tom J. McClure's account of writing his own analyzer at dagblastit.com is still the clearest description of the practical problems.

Read on: the optimal drawing strategy for 9/6, what a simplified strategy card costs, and variance and bankroll.