Formula to calculate damage of an explosion in Minecraft

I want to have a formula I can use to figure out how much damage a direct explosion with a certain explosion radius will do to an unarmored player/mob.

Continue to help post