It appears the amount of experience lost upon dying is approximately the same as the amount of orbs that gets dropped.
Upon the player's death, a number of Experience Orbs are dropped at the location of death. … The number of orbs that are reclaimed is about the same number as the amount lost. - MC Wiki
Upon testing it myself, it seems the experience dropped isn't equal to the experience you had before you died. After running three tests, I usually got about 1/2 of the experience I had before I died.
This image contains three tests: the experience meter before is on top and the experience bar after is below. Also, in the third test, I had an entire bar of experience plus what is shown.
