Pokemon damage formula
The damage formula sets the base damage for a move before modifiers like STAB, critical hits, and type matchups are applied.
What the formula uses
The core inputs are the attacker's level, the move's base power, and the relevant Attack and Defense stats (Physical or Special depending on the move category). The formula changes slightly between generations but the core concepts are the same. You can view all formulas on Bulbapedia.
Common modifiers
After the base calculation, the game applies multipliers such as STAB, type effectiveness, critical hits, weather, items, abilities, and random damage variance.
FAQ
Is the damage formula the same in every game?
It is mostly consistent across generations, but some numbers and modifiers have changed. Always check the specific generation if you need exact values.
Where do EVs and IVs fit in?
EVs and IVs affect your Pokemon's final stats, which then feed into the Attack and Defense values used in the formula.