Probability in Hearthstone
Author - madmaxx On: Twitter | Youtube | TwitchTV | GitHub
Hello, my name is madmaxx. If you heard of me before, its probably because you watched me teach how to build an 8 bit CPU from scratch on youtube. If you have not, well, the only thing that matters for this article is that I understand math. Here, I want to explain the basics of probability that matter for Hearthstone in an easy to understand manner.
All numbers have been acquired either through python programs or hand drawn probability trees to reduce the chance of me messing up. All python scripts available on github.
If you are not interested in learning the finer points, here are probably the most important numbers:
Chance of random projectiles hitting a specific creature at least n times with c other creatures on the board (if the effect has friendly fire, aka Mad Bomber, dont forget to add your hero and your minions to c):
| Projectiles | 3 | 4 | 5 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| n c | 2 | 3 | 4 | 5 | 2 | 3 | 4 | 5 | 2 | 3 | 4 | 5 |
| 1 hit | 87.5 | 70.2 | 57.9 | 48.5 | 93.7 | 80.1 | 68.5 | 59.0 | 96.8 | 86.8 | 76.4 | 67.4 |
| 2 hits | 50.1 | 25.9 | 15.7 | 10.3 | 68.6 | 40.6 | 26.2 | 18.1 | 81.0 | 53.8 | 37.1 | 26.4 |
| 3 hits | 12.6 | 3.7 | 1.5 | 0.8 | 30.9 | 11.0 | 5.1 | 2.7 | 50.2 | 21.1 | 10.4 | 5.8 |
| 4 hits | - | - | - | - | 6.2 | 1.2 | 0.4 | 0.2 | 18.7 | 4.5 | 1.6 | 0.7 |
| 5 hits | - | - | - | - | - | - | - | - | 3.2 | 0.5 | 0.1 | 0.0 |
| 6 hits | - | - | - | - | - | - | - | - | - | - | - | - |
| 8 hits | - | - | - | - | - | - | - | - | - | - | - | - |
| 9 hits | - | - | - | - | - | - | - | - | - | - | - | - |
689
| Projectiles | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| n c | 2 | 3 | 4 | 5 | 2 | 3 | 4 | 5 | 2 | 3 | 4 | 5 |
| 1 hit | 98.4 | 91.2 | 82.2 | 73.9 | 99.6 | 96.2 | 90.0 | 83.2 | 99.8 | 97.4 | 92.5 | 86.6 |
| 2 hits | 89.3 | 64.9 | 46.4 | 34.6 | 96.5 | 80.5 | 63.3 | 49.6 | 98.0 | 85.8 | 69.9 | 56.4 |
| 3 hits | 65.6 | 31.8 | 16.9 | 9.9 | 85.6 | 53.3 | 32.1 | 20.2 | 90.9 | 62.3 | 40.2 | 26.2 |
| 4 hits | 34.5 | 10.1 | 3.7 | 1.7 | 63.6 | 25.7 | 11.5 | 5.6 | 74.8 | 35.0 | 16.7 | 8.5 |
| 5 hits | 10.9 | 1.8 | 0.5 | 0.2 | 36.2 | 8.8 | 2.8 | 1.0 | 50.0 | 14.6 | 4.9 | 2.0 |
| 6 hits | 1.6 | 0.1 | 0.0 | 0.0 | 14.4 | 2.0 | 0.4 | 0.1 | 25.3 | 4.2 | 1.0 | 0.3 |
| 8 hits | - | - | - | - | 0.4 | 0.0 | 0.0 | 0.0 | 1.9 | 0.1 | 0.0 | 0.0 |
| 9 hits | - | - | - | - | - | - | - | - | 0.2 | 0.0 | 0.0 | 0.0 |
Total chance of drawing one of n cards in a specific number of card draws beginning with 30 cards. So first card draw is out of 30, second is out of 29, etc. If you have for example one Flamestrike in your deck n=1, if you have five Flamestrike in your deck n=5
| Card draws |
|---|
12345678910
n 13.36.710.013.316.720.023.326.730.033.326.713.119.325.331.036.641.846.951.756.3310.019.328.036.043.350.156.462.167.271.9413.325.336.045.453.861.267.773.378.282.3516.731.043.353.862.770.276.481.585.789.1620.036.650.161.270.277.383.087.490.993.5723.341.856.467.776.483.088.091.694.396.2826.746.962.173.381.587.491.694.596.597.8930.051.767.278.285.790.994.396.597.998.81033.356.371.982.389.193.596.297.898.899.4
Chance of Nat Pagle drawing at least c cards, if he stays alive for t turns:
| Turns | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 card | 50.0 | 75.2 | 87.5 | 93.6 | 96.8 | 98.5 | 99.2 | 99.6 | 99.8 | 99.9 |
| 2 cards | - | 25.1 | 50.0 | 68.6 | 81.4 | 89.2 | 93.8 | 96.5 | 98.1 | 98.9 |
| 3 cards | - | - | 12.5 | 31.0 | 50.1 | 65.6 | 77.3 | 85.5 | 91.0 | 94.5 |
| 4 cards | - | - | - | 6.3 | 18.8 | 34.3 | 50.1 | 63.5 | 74.5 | 83.0 |
| 5 cards | - | - | - | - | 3.1 | 10.8 | 22.9 | 36.1 | 49.9 | 62.4 |
| 6 cards | - | - | - | - | - | 1.5 | 6.2 | 14.4 | 25.3 | 37.5 |
| 7 cards | - | - | - | - | - | - | 0.8 | 3.5 | 8.9 | 17.2 |
| 8 cards | - | - | - | - | - | - | - | 0.4 | 1.9 | 5.4 |
| 9 cards | - | - | - | - | - | - | - | - | 0.2 | 1.0 |
| 10 cards | - | - | - | - | - | - | - | - | - | 0.1 |
While there certainly is a lot of skill involved in Hearthstone, random chance plays a role as well. Even if you do not take any cards that have random elements in it, you still have card draw to deal with. And because its random, there is no point in wasting any thought on it, its just luck after all, right? Wrong.

A quick example: Blackjack is a game of chance. Yet, in the early days of casinos, some people won consistently at blackjack. The casinos thought they cheated somehow, but they really didn’t. What they did is that they applied mathematics to blackjack to increase their win percentage so significantly that they won instead of the casino. This process is known as card-counting and the field of mathematics that made is possible is called game theory. Card counting is such a huge threat that casinos are making HUGE efforts to counter it. This includes facial recognition systems to identify known counters or computer systems that scan for counting behavior.
What this means is that just because something is random, it does not come down to luck. Randomness can be quantized, analysed, and manipulated to your advantage.
While I don’t have a counting system for Hearthstone yet, what I can teach you is probability. Understanding probability gives you a better understanding of the game situation in general, because it gives you additional information. Your play will likely be different when you know that your chance of drawing Flamestrike next turn is 20% instead of 5%.








Unless it’s been changed in a recent patch, Mad Bomber (and Arcane Missiles) sample each hit individually. I’ve tested this extensively. The twenty permutations in your mad bomber table do not happen with equal probability.
Your conclusion on page 2 that random damage spells have a higher chance of hitting a high health creature is false. A Mad Bomber kills a lone Blood Imp just over 70% of the time. An Arcane Missiles kills a lone Blood Imp 87.5% of the time, and kills a Faerie Dragon 50% of the time.
Your right if the hits are sampled individually all the permutations do not happen with same probability: for example:
P(HHH) = (1/3)^3 and P(IHH) = (1/3)*(1/2)^2
The easiest way to calculate the probability of killing an imp with 3 random shots is :
P(“Killing imp”) = 1 - P(“Not Killing imp”) = 1 - (2/3)^3 = 19/27 wich is just above 70%
Unless it’s been changed in a recent patch, Mad Bomber (and Arcane Missiles) sample each hit individually. I’ve tested this extensively. The twenty permutations in your mad bomber table do not happen with equal probability.
Your conclusion on page 2 that random damage spells have a higher chance of hitting a high health creature is false. A Mad Bomber kills a lone Blood Imp just over 70% of the time. An Arcane Missiles kills a lone Blood Imp 87.5% of the time, and kills a Faerie Dragon 50% of the time.
Hey man!
Great article. I’m glad to see others trying to work out the math behind the game. The code was a nice addition!
In your article, you gave … well let me just quote it:
Now what’s that? I read the article over and over to try and deduce how card cost relates to draw probability, and I don’t think it does, man. They are what’s known as independent variables.
I’m pretty sure the forumula you’re looking for is still just a regular old hyper geometric distribution. External
Here’s a great calculator for it: External
For turn 1 drop in population size 26 as there are 26 cards left to draw and you can assume you’re looking for *a* specific one. Mulligan would be 23 because you’re discarding 3 before you draw three. The sample size is always 1. The number of successes in sample is 1 as well, because “duh”. And the number of successes in the population is either 2 or 1, unless you’re running arena.
Your math doesn’t run up with what I’ve been doing. Why do you include the card cost in calculating draw odds at all? It literally doesn’t matter, right?
@Rafajafar he mentions that it’s “to show the chance you get a specific card before or at the time you need it.”
That said, I’m sad my two math-related articles weren’t linked to/mentioned in this article =(
Yes, but that makes no sense, my man. The cost has zero impact on drawing whatsoever.
Let’s say you need a 4 drop and it’s turn 3. Lo! You draw a card and it is a 4 drop! Oh but it’s not the one you needed… see what I mean?
Here’s another one. You need a 4 drop and you get it! What are the odds that that happens rather than you do not get the card you needed? The same, right?
So what is the probability that you draw a 4 drop before turn 4? Is that the question? Well, that wasn’t clear. He said a “specific card.” and the odds of that happening follow the hypergeometric distribution.
Card cost plays no role.
I agree, the article isn’t calculating this correctly. The probability of the first shot from the mad bomber hitting imp should be 1/3.
This is probably pretty obvious, but I would calculate it as follows:
(chance hit imp) + (chance miss imp) times (chance hit imp) + (chance miss imp twice) times (chance hit imp):
mad bomber:
(1/3) + (2/3)*(1/3) + (2/3)*(2/3)*(1/3) ~= 70%
arcane missile:
(1/2) + (1/2)^2 + (1/2)^3 = 87.5%
(Of course its possible the game calculates it the way the article says, but based on the comments it dosn’t sound like it, nor does it seem like a hugely intuitive way to code it)
@Rafajafar
I thought he was using the cost to determine the turn you needed the card.
Really, C represents the number of draws you get to use before you need the card, not the cost. “What is the odds that you will get this specific card by turn C, or after C draws”. If you have no extra draws (roughly including mulligan but thats not exact since those cards go back into your deck), then we might assume that you usually want to play a card, one you really NEED, the first turn you can. This sets C = cost of the card for this specific but not uncommon situation.
@Turamarth: Handy tip: probabilities often become easier to calculate if you look at the chance of something not happening and then negate it:-
What’s the chance to miss the imp three times? (2/3)^3 ~= 29%. So what’s the chance to kill the imp? 100-~29 ~= 71%.
@Rafajafar: If you’re asking the question “What are the chances that I have this card that costs X by turn X” then an appropriate expansion of the hypergeometric function will certainly include X as a term.
You’re right, though. The formula posted in the article is wrong. Even before you account for the mulligan, the probability that you’ll have one of your two Leper Gnomes on turn 1 after your draw going first is just over 25%, not 6.7% as quoted in the table. Similarly, the probability that you’ll have one of your two Faerie Dragons on turn 2 after your draw going first is just over 31%, not 13.1%. If you have six two-drops and you mulligan for them going second, the probability you’ll have at least one is over 70%, not 41.5%.
There’s also some really weird rounding in the Nat Pagle table on page 1. 75.2% chance of at least 1 card after two turns? 25.1% chance of two cards after two turns? It doesn’t really make much difference, but I’m really curious about what method was used that would result in any error at all… O.o
Hey, as the author of this article, I might be ablte to shed light on some questions.
First, thanks for discussing this, I included all formulas, code, etc. for exactly the reason of review. So good on you for trying to shoot holes in this.
1. You are right that there is a mistake in the article, this was also extensively discussed in the reddit thread. The chance to hit an imp is equal to the chance to hit any other creature.
2. Card draw: cost doesnt factor in to card draw, but I use C to determine when you need the card. Flamestrike for example has a cost 7 so you have 7+starting hand draws to get flamestrike.
3. Weird rounding: I use random samples from a binomial distribution, bascially I didnt want to code binomial distribution myself, because I didnt want to mess it up. The numpy library has a random number generator based on the binomial distribution. So I just draw 100000 samples from that. That means its an approximation, but a really good one. As you said, the second decimal really doesnt matter.
Welcome to ihearthu!
#2 clears that up. Don’t think that was evident in the article, but that may be my poor reading.
“12 of which hit the one-health. 12/20 = 6/10 = 3/5 = 60%.
For a three health minion however, there are 27 potential outcomes, 19 of which are favourable. 19/27 = 70% chance Mad Bomber hits at least once.”
This logic is wrong. The first scenario only has 20 outcomes, but each outcome is not equally likely. After the bomber hits the 1 health minion, there are only 2 possible outcomes for future shots, each with a 50% chance.
That’s why the math should be as someone else said
1/3 to hit on first shot +
2/3 miss first * 1/3 hit second +
2/3 miss first * 2/3 miss second * 1/3 hit third
It’s 70% to hit one time, no matter how much health the minion has.
[…] original author- madmaxx for ihearthu.com […]
GREAT article! I’d peer-review it if I had the time. Basic-counting-probability and Hearthstone forever, Brother!