How much damage does fire do in total before it burns out?
Once you are set on fire by a flame and you step out of it, if you are not wearing armor you take 3.5
hearts of damage at a rate of .5
per second and then you stop burning. If you are instead set on fire by lava, you take 7
hearts of damage. I tested this by setting myself on fire at every difficulty level.
When you are set on fire, you take 0.5
hearts per second of pre-armor damage.
If you are standing in fire, you take another 0.5
hearts per second (pre-armor).
If you are (swimming) in lava, you take 2.0
hearts per second.
This totals to 0.5 / sec
for on fire, 1.0 / sec
for in fire, and 2.5 / sec
for in lava.
Fire Protection armor will both give a chance to stop each damage point, and reduce the amount of time that you are on fire once you step out.