Damage is the amount of HP done to opponents during a battle using different moves.

The approximate formula for damage is:

$ Dmg={A*f_a \over 2D*f_d}*P+2 $

A: Attack/ Sp. Attack of attacker
D: Defense/ Sp. Defense of defender
P: Base power of move

Note A and D are the stats under effective level. To calculate, see Stats for more details.

The tweaking factor used to modify damage output is: (crude experimental data, may subject to +-1 error)

Influences fa fd
STAB* 1.5 ---
4x 2.5 ---
2x 2.05 ---
0.5x 0.22 ---
0.25x 0.05 ---
N Buffs (1+0.5N)
N Debuffs 1/(1+N)

* Same Type Attribute Bonus: for pokemons using moves of same type as itself.

Stat changes from abilities (e.g. Rivalry, Defeatist, Justified) causes buffs/debuffs automatically. Calculation can be done as normal. Here is a list of abilities that would cause stat changes in (Special) Attack, (Special) Defense:

Ability Buff in Debuff in Condition
Anger Point Attack --- Attacked critically.
Competitive Sp. Attack --- Have debuff(s).
Defeatist --- Attack,
Sp. Attack
Under 50% max HP.
Defiant Attack --- Have debuff(s).
Guts Attack --- In status problems.
Hustle Attack Accuracy (Automatic)
Intimidate --- --- (Automatic)
Justified Attack --- Attacked by Dark moves.
Marvel Scale Defense --- In status problems.
Minus Sp. Attack --- Ally is Plus/ Minus.
Moody (Random) (Random) (Automatic)
Moxie Attack --- Killing an enemy pokemon.
Plus Sp. Attack --- Ally is Plus/ Minus.
Sap Sipper Attack --- Attacked by Grass moves.
Solar Power Sp. Attack HP Under sunshine.
Weak Armor Speed Defense Attacked by any damaging moves.