DPS Calculator: Damage per Second for Game Balance
Enter a build's damage, attack speed and crit stats, pick how your game's armor works, and get DPS before and after defense, time to kill and hits to kill. Add a second build to compare them, see both on a DPS-vs-armor chart, and copy the damage formula as a GDScript function.
How to use it
- Enter build A's damage per hit, attacks per second, crit chance and crit multiplier, then press Next.
- Pick Flat armor, Percent reduction or Armor / (armor + K), set the defense value and the target HP, then press Next.
- Leave Compare with a second build (B) ticked and enter build B, or untick it to look at one build.
- Press Calculate DPS to see the comparison table and the DPS-vs-armor chart.
- Press Copy GDScript to take the damage function into your Godot project.
The damage per second formula
DPS before defense is damage x attacks per second x (1 + crit chance x (crit multiplier - 1)). A 20 damage attack at 1.5 attacks per second with a 10% chance to crit for double damage averages 20 x 1.5 x 1.1 = 33 DPS.
Defense has to be applied per hit, not to the DPS total, because normal and crit hits lose different amounts to flat armor. The calculator works out the normal hit and the crit hit after defense, averages them by crit chance, and multiplies by attack speed to get effective DPS. Time to kill is target HP divided by effective DPS, and hits to kill is target HP divided by the hit size, rounded up.
Flat armor, percent reduction and armor / (armor + K)
Flat armor subtracts the same number from every hit. With the default builds, build A (20 damage, 1.5 per second) and build B (45 damage, 0.7 per second) are close before defense at 33 and 35.4 DPS. Against 10 flat armor, A falls to 18 effective DPS and B to 28.4, so B kills a 1,000 HP target in 35 seconds instead of 56. Flat armor rewards big hits, and any hit at or below the armor value deals nothing, so consider a minimum damage per hit.
Percent reduction removes the same share of every hit, so it never changes which build is better. It is easy to explain to players, but if armor can stack toward 100% the target becomes immune, so cap it or use diminishing returns.
The ratio formula multiplies damage by K / (armor + K), so it blocks armor / (armor + K) of each hit. With K = 100, 50 armor blocks a third, 100 armor blocks half, and 300 armor blocks three quarters. Each point of armor is worth a little less than the last, the target never becomes immune, and you choose K so that a typical armor value for that stage of the game blocks the share you want.
Using the result to balance a game
Pick a target time to kill for each enemy type first, for example 2 seconds for a basic enemy and 60 seconds for a boss, then set HP to effective DPS x that time. Retest whenever armor or attack speed changes, because effective DPS is what the player feels, not the number on the weapon.
Use the chart to spot builds that fall off a cliff. A flat line means a build ignores the defense model; a steep drop means it is only good against soft targets. If one build stays on top across the whole armor range, nothing pushes players to switch.
Frequently asked questions
How do you calculate DPS in a game?
How do crits affect DPS?
What is the armor / (armor + K) formula?
Is flat armor or percent reduction better?
How do I calculate time to kill?
More free game dev tools
- XP Curve Calculator: Turn an XP formula into a level table with kills and playtime per level.
- Loot Table Calculator: See each item's real drop chance and how many kills it takes, with optional pity.
- Frame Time Calculator: Turn a target FPS into a millisecond budget per system, with Godot settings to match.