# TDO: How to calculate a pokemon's ability

TDO: How to calculate a pokemon's ability

While battle simulations are more accurate for specific situations, TDO, which stands for "total damage output", can be a very useful way to rank pokemon and their attacks. TDO is equal to the amount of damage a pokemon can dish out before dying. The advantages of TDO include:

• It incorporates a Pokemon's offensive and defensive ability in one useful number
• It is just a formula, so it can be plugged into excel
• You don't need to specify the defender's moves or stats
• If two pokemon battle, the one with higher TDO will do better every time

Actual TDO requires battle simulations to calculate. But TDO is easy to approximate with just a formula. This approximation is what is seen on pokemon spreadsheets*. Not everyone uses the same approximations, and some formulas are better than others. We have spent some time to come up with a formula that incorporates energy gains from taking damage and other edge-effects.

The approximate formulas for TDO and tankiness itself are simple.

$$TDO_{prop} = DPS1 * HP * DEF$$ $$Tankiness_{prop} = HP * DEF$$

DPS1 is your DPS against a target with 1 defense, and HP, DEF are the hit points, defense of your pokemon. But even though these formulas are short, the formula for DPS itself is a bit more complex. This is to take into account corrections for energy gains from damage and wasted energy gains from dying early. It is given in its full form at the very bottom of this page!

*Actually what is used is not TDO, but a formula which is proportional to TDO, meaning the TDO of each pokemon is off by some constant factor. This is good enough, because all that we need is each Pokemon's relative ranking to make moveset or counter decisions.

List of best pokemon TDO & DPS

The spreadsheet has every pokemon so it is too big for this page. It lists all combinations of moves, including legacy moves.

Survival time was based on t5 raid bosses.
What doesn't TDO account for?
• It only considers the attacker, not the matchup. Some pokemon are useful because of their typing, and while it accounts for STAB (same type attack bonus) it doesn't account for type advantages. It can be made to account for a matchup by adding type multipliers to the damage formula.
• Discontinuities: TDO calculates as if there were a steady stream of damage & energy going between attacker and defender. This is accurate for long battles & still pretty good for shorter battles but not as accurate as simulation results. Some edge effects (leftover energy)
are accounted for but everything is at least somewhat approximate.
• nTotalCMovesSimple is approximate and may vary a lot from battle to battle. Choosing a specific number for it introduces a bias.
• It doesn't account for lag. This could be done pretty easily by adding a little time to move durations. But since fmoves are buffered anyway, it should be a decent approximation.

Tankiness has some flaws too. Doing lots of damage actually should decrease your survival time because the enemy gains more energy. This is not accounted for in just DEF * HP, but for gym defenders it won't make a big difference.

In a world of simulations, what is the use of TDO anymore? A few things. Simulations are good at looking at very specific matchups, but it is very hard to average simulations in an accurate way that gets an overall metric of a pokemon as each battle introduces different biases. This makes approximate TDO and DPS an attractive, yet approximate, overall metric.

To add, there are some details of battle mechanics which still need to be worked out, like:

• Does the defender choose their next move at the beginning of the 2 second pause between attacks? If so, it can't use the 2s of energy it gained. This significantly reduces the number of charge moves that go off.
• Does the defender only use up cmove energy after the move finishes? If so,
it probably has a lot of overkill energy loss during the move itself, especially for full-bar cmoves.

Another advantage of TDO is ease of use. You just plug and chug... no programming. Use it on excel sheets etc to get quick results without investing a lot of time and effort on tons of simulations.

Derivation of the TDO Formula
The base formula is simple: TDO is approximately proportional to $$TDO_{prop} = DPS1 * HP * DEF$$ Before deriving the DPS formula, I will show why a pokemon with higher TDO always wins. The pokemon that wins is the one that does a higher percent of the enemy's HP per second. In other words, pokemon A will win against pokemon B if: $$\frac{DPS_A,avg}{HP_B} > \frac{DPS_B,avg}{HP_A}$$

Then multiply by HP_A * HP_B on both sides of the equation to get the equivalent condition:

$$DPS_A * HP_A > DPS_B * HP_B$$

Therefore DPS * HP is what determines which pokemon wins. But DPS_A depends on DEF_B and vice-versa... It would be nice to have only properties of pokemon A on the left side, and only pokemon B on the right side. So let's define a new variable, DPS1, which is DPS but with the DEF factored out. It is the DPS you would do against a target with 1 defense:

$$DPS_A = \frac{DPS1_A}{DEF_B}$$

Plug it into the inequality:

$$\frac{DPS1_A}{DEF_B} * HP_A > \frac{DPS1_B}{DEF_A} * HP_B$$

And multiply by DEF_A * DEF_B on both sides:

$$DPS1_A * HP_A * DEF_A > DPS1_B * HP_B * DEF_B$$

So equivalently, the pokemon who wins is the one with the highest DPS1 * HP * DEF. Often TDO is seen written as ATK * DEF * HP... you can see that these are similar because DPS is proportional to ATK. But DPS1 * HP * DEF is more accurate so it is the one we will use.

At this point, the problem is just to find DPS (we can get DPS1 just by multiplying that by defense). Define a cycle by a series of Fmoves, and then one Cmove. Then the formula we will use is

$$weaveDPS_{simple} =$$ $$\frac{CDamage + nFmovesPerCycle * FDamage}{CycleTime}$$

...but first we need to find expressions for nFMovesPerCycle and CycleTime. Note that any variable starting with F or C stands for fast move or charge move, respectively. So for example CDuration is the duration of a charge move (how long after you start it until you can move again). Any variable beginning with "n" stands for number.

CycleTime depends on how many of each move is in a cycle:

$$CycleTime =$$ $$CDuration + nFmovesPerCycle * FDuration$$ So now we just need nFmovesPerCycle to plug into the DPS equation. This will be a bit harder to find.

How many Fmoves can you do in one cycle? In one cycle, you gain energy equal to ~CmoveEnergyCost. The percent of that energy which comes from Fmoves depends on the energy/second gained by taking damage vs the energy/second from spamming your Fmoves:

$$PercentEnergyFromFmoves = \frac{EPS_{Fmoves}}{EPS_{Fmoves} + EPS_{dmg}}$$ $$EPS_{Fmoves}=\frac{FmoveEnergyGain}{FmoveDuration}$$ $$EPS_{dmg}=EnemyDPS/2$$

The last thing we need is EnemyDPS. It would be complicated to deal with exactly, but simulation results provide a good experimental relationship between EnemyDPS and Defense for a t4 or t5 raid boss. This already includes STAB but should be scaled if there are type advantages involved.

$$EnemyDPS = 1930/DEF$$ Now we are ready to calculate weaveDPS, which is the average damage per second you get throughout a cycle. $$weaveDPS_{simple} =$$ $$\frac{CDamage + nFmovesPerCycle * FDamage}{CycleTime}$$ Why did I add the "simple" subscript to weaveDPS? Often, the battle ends and you still have wasted energy left. So for the last half-cycle or so, your DPS will just be FMove DPS. We can account for this by taking a weighted average of weaveDPS with FmoveDPS: $$weaveDPS_{actual} =$$ $$\frac{nCMoves * weaveDPS_{simple} + 0.5 * FmoveDPS}{nCMoves + 0.5}$$ where $$FmoveDPS = FmoveDamage/FmoveDuration$$

For this you will need nCmoves:

$$nCmoves = floor(SurvivalTime/CycleTime)$$ $$=floor(0.0005*STA*DEF/CycleTime)$$

The equation for SurvivalTime is an approximation based on real-world tests.

At this point, there is a chain of variables to plug in, everything is expressed in terms of numbers which can be found in the game_master file or on pokemon go websites, like base stats of a pokemon. Below is a summary.

Summary of the formulas
The formula for DPS and TDO are below. DPS (which was called weaveDPS_actual in the derivation) is the more complicated formula. It is: $$DPS =$$ $$\frac{nCmoves * DPS_{simple} + 0.5 * \frac{FDamage}{FDuration}}{nCmoves + 0.5}$$ To use that, you will need the formula for nCmoves and DPS_simple: $$nCmoves = \frac{0.0005*STA*DEF}{CDuration+nFmovesPerCycle*FDuration}$$ $$DPS_{simple}=$$ $$\frac{CDamage+nFmovesPerCycle*FDamage}{CDuration+nFmovesPerCycle*FDuration}$$ And to use those, you will need the formula for nFmovesPerCycle: $$nFmovesPerCycle =$$ $$\frac{CEnergyCost*FEnergyGain*Def}{FEnergyGain*Def+1930*FDuration}$$

For FDamage, CDamage, use the damage formula: $$damage = ceil(0.5*ATK*Power/EnemyDefense)$$ As for TDO (total damage output), the formula is $$TDO = DPS1 * HP * DEF$$

...but be careful, DPS1 is different from DPS. In particular, DPS1 is the same as the DPS formula but at the end when you use the damage formula, you have to plug in EnemyDefense=1.

Normally when plugging in for Attack, Defense and HP, you'd use

$$ATK = (BaseATK+ATK IV)*CPM$$

...where CPM is the CP Multiplier. But for this, CPM makes no difference, so you can leave it out (set it equal to 1). IVs can make a minor difference, so I recommend using something like 14/14/14.

Lastly, as mentioned before, the formula for survival time (tankiness) is

$$SurvivalTime = DEF * HP * 0.0005$$

How did the 0.0005 slip in there? It is just a constant multiplier that makes the survival times approximately in seconds. It is based off of an in-game battle test.

In the spreadsheets on this post, values were all scaled by the same constant so that dragonite's dragonbreath/dragonpulse TDO and DPS match results from gamepress' in-house battle simulator. The proportion of all results stayed the same.

~doublefelix921

Raids

Raid Boss List

Raid Boss Counters
Tools

Pokemon List

IV Calculator

Moves List

Appraisals

Egg Chart

Type Chart

Power Up Costs

Buddy Distances

CP Calculator
Rankings

Gym Attackers

Gym Defenders

DPS per type