Use the mana value of the spell as it exists on the stack (or last existed on the stack, if it's been removed) to determine how much life is lost. If there is an {X} in that spell's cost, include the value chosen for X to determine its mana value.