For all the formulae and mathematics that go into calculating damage (just like many other things in the Pokemon games), there's still the element of randomness to it as well. For example, even if all the other conditions remain the same, one attack could do 51 HP of damage the first turn, and then 48 HP the second. Bulbapedia probably has the best explanation of how damage is dealt
here, though there's quite a bit to read through.
Anyway, since this topic is geared towards game mechanics rather than the franchise as a whole, I'm going to move this over to Pokemon Gaming Central for you.
MOVED.