where B = base dmg of the attack or spell
AP = attack power or spell power
DR% = dmg reduction after armor/ward/focus has been subtracted by armor/spell penetration or temptation
ER% = elemental resistance
RNG = some variable that makes it so not every outcome is the same
If i remember correctly, critical hits add a base +50 atk/spell power bonus.
That +50 AP bonus increases with crit effectiveness.
Crit effectiveness can be improved with higher Cunning.
The [Golden Carrot] bracelet can also boost crit effectiveness when HP is greater than 75%