Tried Googling it a bit, yet never found an answer. Fire does damage at a rate of 1/2 heart per second, but how long do you stay on fire? How much total damage does fire do while not standing in it?
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.
Fire is quite a dangerous and effective weapon in Minecraft, lava being more dangerous and deadly. When an entity with health is set on fire, it takes an initial 1 heart damage for touching the fire and burning, plus 3.5 hearts if they left the fire straight away. This is 4.5 hearts damage with fire minimum, the equation of working out how much damage taken ( not considering armor or health regeneration ) of seconds in fire being x:
Damage = X + 3.5
Lava is much more dangerous, as it takes longer to leave the lava, and the lava contact damage is much higher (5 hearts a second.) Players who escape lava in 1 second are dealing with at least 8.5 hearts damage, but players who stray longer than that without armour are doomed. The equation for damage is:
Damage = (X times 2.5) + 3.5
I would recommend that everyone should carry a fire resistance potion around (splash) in case of being pushed into lava.