How does the game determine how much damage you take? Is there a formula out there that determines how many hearts of damage you take per blocks fallen?
Fall damage is calculated by calculating the distance fallen (in blocks).
Specifically, Falling Damage =(number of blocks fallen x ½) – 1½.
This means that you can safely drop 3 blocks at once without taking damage. Jumping gives 1½ blocks worth of upward momentum, so if you jump off another block, you can only fall one and a half blocks safely.
Ladders, water, and other blocks can mitigate this. Ladders can by cancelling your momentum (and resetting your fall distance) and water because it’s water, and generally stops falling damage in any video game that fails to model surface tension!
More information available here.