How to Calculate Your Equity vs Every Other Hole Card Combination

This is post #15 in an ongoing series of articles about my work as a poker bot developer.

One of the most useful command line tools I developed in the course of building the poker bot was a small program called eqall.

Eqall, short for Equity All, calculates your equity against every other hole card combination given the current board.

As a simple example, imagine you have Ks Qs and the board is Ad As Th 3h. Pretend your opponent has Js 9s. You’re in good shape vs this opponent–any jack will give you a straight and anything other than one of the three remaining nines gives you the win.

Your equity in this simple situation is 1 – the number of cards that will give your opponent the win over the number of cards left in the deck or 1 – 3/(52 – 4 – 2 – 2) or 1 – 3/44 or 0.931818.

What eqall does is it calculates your equity vs every possible hand your opponent can have. So it calculates your equity vs Js 9s, like in our example, plus Js Ts, Js 8s, Js 7s, and so on until it has calculated all of them.

You can download here (7KB).


>> eqall Ks Qs - Ad As Th 3h

Ks Qs - Js Ts = 0.204545
Ks Qs - Js 9s = 0.931818
Ks Qs - Js 8s = 0.931818
Ks Qs - Js 7s = 0.931818
Ks Qs - Js 6s = 0.931818
Ks Qs - Js 5s = 0.931818
Ks Qs - Js 4s = 0.931818
Ks Qs - Js 3s = 0.272727
Ks Qs - Js 2s = 0.931818
Ks Qs - Js Ac = 0.000000
Ks Qs - Js Kc = 0.921053
Ks Qs - Js Qc = 0.931818

The output is relatively simple: Ks Qs are your hole cards, the second column are the hole cards your opponent could have, and the last column is your equity, or your chance to win, against those hole cards.

One thought on “How to Calculate Your Equity vs Every Other Hole Card Combination

  1. Excellent tool!

    I must say that your series of articles about the HUSNG bot here is very intriguing. I’m a poker player and a software engineer, of course I’ve been thinking about writing my own bot forever. But luckily I never did more than think about it, and got started in writing forex trading systems instead in my spare time.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s