Stamina IV translates to the actual HP value the Pokemon will have. In your case, a Magikarp with 13 stam will have 9 more hit points when maxed out than yours. This doesn't change upon evolution either. You'd ultimately be looking at a Gyarados with 12 less HP than a perfect, but still hits as hard and still takes the same amount of damage from each hit.
Interestingly enough, due to the game's rounding sometimes it's possible to have "fake perfects" where a Pokemon with 15/15/14 will have the same HP as one with 15/15/15, even though the CP will be slightly lower. They will perform exactly the same.