Warhammer 40k Dice Calculator
Want to know if that unit will actually do the job before you commit it? This free Warhammer 40k dice calculator (often called "Mathhammer") works out the average hits, wounds, unsaved wounds, damage and models destroyed for any attack, using the hit, wound, save and damage sequence from the current edition.
Warhammer 40,000® is a registered trade mark of Games Workshop Limited. This is an independent, free fan tool. It is not affiliated with, endorsed or sponsored by Games Workshop, and it reproduces no rules text.
The short answer: enter the attacks, hit roll, Strength, Toughness, AP, save and damage, then press Calculate. The tool rolls the attack 20,000 times and shows the averages plus the chance of destroying each number of models.
Wound roll chart (Strength vs Toughness)
| Strength compared with Toughness | Wound on |
|---|---|
| Strength is double Toughness or more | 2+ |
| Strength is higher than Toughness | 3+ |
| Strength equals Toughness | 4+ |
| Strength is lower than Toughness | 5+ |
| Strength is half Toughness or less | 6+ |
What is Mathhammer?
Mathhammer is the hobby nickname for working out the expected result of an attack with probability instead of guesswork. It tells you what a unit does on average, so you can compare weapons, pick targets and build lists with fewer nasty surprises.
How do you calculate damage in Warhammer 40k?
Multiply through each step: attacks × chance to hit × chance to wound × chance the save fails × damage per wound. This calculator does that by simulating the whole sequence thousands of times, which also handles re-rolls, critical hits and damage that is wasted on models with fewer wounds left.
How does AP change the save?
AP worsens the target's armour save by its value, so a 3+ save against AP -2 becomes 5+. Invulnerable saves ignore AP, and the defender always uses whichever save is better after modifiers.
How do Lethal Hits, Sustained Hits and Devastating Wounds work here?
A critical hit with Lethal Hits wounds automatically. Sustained Hits adds the chosen number of extra hits on a critical hit. With Devastating Wounds, a critical wound skips all saves. Always check your own codex and the latest rules updates, as these abilities change between editions.
Does cover work against every attack?
Cover improves the armour save by 1, but in the current edition a model with a 3+ save or better gets no benefit against AP 0. The calculator applies that exception automatically. Cover never improves an invulnerable save.
How accurate is the calculator?
Each result is the average of 20,000 simulated attacks, so figures are typically within a few hundredths of the exact value. Real games swing far more than averages suggest, which is why the chart shows the full spread of outcomes.
Warhammer 40,000® is a registered trade mark of Games Workshop Limited. This is an independent, free hobby tool. It is not affiliated with, endorsed or sponsored by Games Workshop. Rule names are used only to describe what the calculator models; check the official rules for your games.