*Note, I didn't see the real cause of the question until the end. Skip my jabbering unless you really don't get the whole thing
Yeah, I didn't really like the way they presented it on Serebii. It's right, but really messy. Just take note of the order of operations and you can split that mess apart like this:
L = Defender's Level
A = Attacker's attack stat
P = Attacking move's base power
D = Defender's defense stat
M = Multiplier--> STAB, Effectiveness, Item Boost, Critical Hit, Weather, etc.
R = Random number between 217 - 255
And for simplicity, we'll make X = the result obtained from the previous step.
First, multiply the defenders level by two, and divide the product by 5:
(2 x L)/5
Add 2 to the Quotient:
X + 2
Multiply the sum by BOTH the Attacker's stat and the attack's base power:
X x A x P
So far, this gives us:
(2 x L/5 + 2) x A x P
Moving on, Divide the product by the Defender's defense stat:
X / D
Divide that Quotient by 50, then add 2:
X/50 +2
*Btw, if you've ever wondered why even those pidgeys can do 2 damage to your level 100 Mewtwo, it's because of that two you just added.
Now we take into account all of those battle factors i.e. STAB, super-effective, choice band...:
X x M
So now, the equation should look like (spaced out for clarity):
( ( (2 x L/5 + 2) x A x P)/D )/50 + 2) x M
Now comes the really random part of the damage calculation. Take a random number between 217 and 255 and divide that by 255. This becomes R. Multiply the above equation by it. *Note: the random number is sometimes simplified to the range of 85 - 100, and then divided by 100. This technically works, but I'm pretty sure the actual equation uses the former numbers.
And so, your final equation comes out to be:
( ( (2 x L/5 + 2) x A x P)/D )/50 + 2) x M x R
Now for the example Serebii gave:
L = 100
A = 219
P = 60
D = 289 (seems kinda high for an Espeon o.O)
M = 1.5 x 2 = 3 (STAB and Super-effective)
R = 255/255 aka 1
So plug and chug:
( ( (2 x 100/5 + 2) x 219 x 60)/289)/50 + 2) x 3 x 1
The actual answer is 120.5 ....
Weird, I think the people at Serebii did their math wrong on that last line:
(((1909.6)/50)+2)*1.5*2*100/100 is correct work, but it doesn't equal 45...
That stupid algebra error on their part is the whole problem....omfg, I got owned.