The general who wins a battle makes many calculations in his temple ere the battle is fought. The general who loses a battle makes but few calculations beforehand. Thus do many calculations lead to victory, and few calculations to defeat: how much more no calculation at all! It is by attention to this point that I can foresee who is likely to win or lose.
-Sun Tzu, the Art of War

Warhammer has been described by others as Mathhammer. Those who are the best at mathhammer are likely to be good at warhammer. (Although you don't have to be good at math, you can get experience playing too).

The reason for this is that it's a game based on numbers and statistics. And while any game involving dice will have a randomness factor to it, if you roll enough dice, the statistics will even out.

That said, there are three main types of things you roll to do. You roll to kill troops. You roll to kill vehicles. You roll various leadership tests.

Each of these things can be described with the use of probability math. Doing so allows us to determine the chance of success for each action. An action with a very low chance of success might not be the best choice you can make (but we'll get to that after the raw math), so it is useful to know these things when it comes time to make the decisions.

Also, no one is expected to compute the odds while playing (although I am sure some people do). But, you can make estimates while playing, rather quickly, once you get the hang of it.

Killing infantry

The odds that any attack will kill a troop is equal to the chance that it will hit, times the chance that it will cause a wound, times the chance that the opponent will fail their save. Expressed as a formula, (% to hit) * (% to wound) * (% to fail save).

Example: A space marine has a ballistic skill of 4, a bolter of strength 4, and a toughness of 4, with a 3+ save.

A weapon skill of 4 means that he hits his target on a roll of 3 or better. When you roll a die, there are six possible outcomes. Two of these are below 3, and four of them are 3 or better. So, the chance of the marine hitting his target is 4 chances in 6, or 4/6.

The marine's bolter has a strength 4. To wound another marine with toughness 4, he would need to roll a 4 or better. There are three possible die rolls that are 4 or better, so this is expressed as 3/6.

The marine who has been hit has an armour save of 3+. So that means that he will fail his save on two possible rolls, while he will pass it on four possible rolls. The odds that he fails his save is 2/6.

Taken together, the odds that one marine can shoot another successfully is therefore (4/6) * (3/6) * (2/6). We can simplify these fractions, and express this as (2/3)*(1/2)*(1/3), and so the final result is 1/9. One marine will kill another one ninth of the time.

If you have multiple shots, the combined odds are simply the sum of the individual odds. So, nine marines firing at other marines have nine 1/9th chances. 9 * 1/9 = 1, so it takes nine marines shooting to expect to kill one marine. That doesn't mean that they will always kill one marine, sometimes they will all fail their odds, and sometimes they will all succeed. But the expectation is that when nine marines fire, one enemy marine will fall.

Since multiplying fractions always results in a smaller fraction, anything that can remove one part of the equation is a good thing. You can remove the to-hit roll by using a template weapon. Since that always hits, the equation is then simply (chance to wound)*(chance that save is failed). Likewise, using armour-piercing weaponry, or power weapons will remove the opponent's save, resulting in (chance to-hit)*(chance to-wound).

Attacking vehicles

Attacking a vehicle is slightly different. Vehicles have armour instead of Toughness and Saves. So, when you fire at a vehicle, you want to figure out the odds that you will hit it hard enough to make something happen. To do this, first, you still have to hit the vehicle. Then, you need to roll high enough on your armour piercing die to equal or exceed the vehicle's armour. This can be expressed as (chance to-hit)*(chance that d6 is >= (vehicle armour - weapon strength).

By way of example, two marines (one with a bolter (str 4) and one with a rocket launcher (str 8)) will fire at the front of an enemy marine's rhino. The Rhino has front armour of 11.

The odds that the rocket launcher will get some result: The rocket still has to hit it's target. All marines shoot with BS4, so they hit 4/6 times. The armour (11) minus the rocket's strength (8) is 3. So, to affect the vehicle, you have to roll 3 or higher on your armour penetration die. 3 or higher has a 4/6 chance of happening, so the odds that the rocket launcher marine affects the rhino is 4/6 * 4/6. Simplifying this, it's 2/3*2/3, or 4/9. So, four out of every nine rocket's shot at the rhino will do something to it.

Now, the marine with the bolter has the same chance to hit (4/6), but the rhino's armour of 11, minus the bolter's strength of 4, means that he's going to have to roll a 7 on a d6 to do anything to the rhino. Since there isn't a 7 on a d6, the chance of affecting the rhino is 0/6, and so the total chance of doing anything is 4/6 * 0/6 = 0/36, or 0. This is why it's a waste for most infantry to fire at tanks, because even if they hit, they have no hope of affecting the tank.

A note on twin-linking, and other re-roll effects. Some things in the game allow you to reroll failed rolls (whether they be saves, to-hit, or to-wound rolls). The effect this has on the outcome is as follows. First, you have the odds to succeed on the first roll. If you pass the first roll, the second roll doesn't matter. If you fail, though, you get to try again. So, the odds can be described as, the chance that you succeed, plus the chance that, if you fail, you succeed on the second attempt. Mathematically, this looks like (chance to succeed) + (1-chance to succeed)*(chance to succeed). If you want to use algebra, you can also write this as 2*(chance to succeed) - (chance to succeed)squared. So, if our marine has a twin-linked bolter, his chance to succeed is 4/6 + (1-(4/6))*(4/6). That's 8/9, when you work it all out.

Leadership Tests

This is the last of the things you commonly roll for in the game. Rolling 2d6 there are a total of 36 possible outcomes. (1&1, 1&2, 1&3, 1&4, 1&5, 1&6, 2&1, 2&2...) So, what you want to know is how many of those possible outcomes are in your favor. There are six chances to roll a total of 7, five chances each to roll an 8 or a 6, four chances each to roll a 9 or a 5, and so on. Using this, the chance of rolling 7 or less is 6 + 5 + 4 + 3 + 2 + 1, or 21 successful rolls, out of 36, so 21/36. The chance of rolling an 8 or less is 26/36, a nine, 30/36, and so on. This is mostly important knowledge for target selection and/or psychic tests, as knowing how likely you are to be able to shoot what you want can play a big role in deciding what order to shoot your other guns in.