Minecraft wiki entry for Experience, associated text: To get from level 0 to level 30 requires 1395 experience.
To get from level 27 to level 30 requires 306 experience.
Killing one large slime and all the slimes that split from it yield from 12 to 28 experience, with an average of 20.
The maximum level required for enchanting is level 30, while the anvil accepts jobs up to level 39 (in creative mode the anvil limit is removed).
Level 16 is a quarter of the way to level 30, while level 22 is about halfway there. Level 30 in turn, is halfway to level 39.
Killing the ender dragon the first time gives approximately 68 XP levels. The ender dragon actually drops 10 waves of orbs worth a total of 1,000 experience points per wave, and another worth a total of 2,000. Taken separately, the smaller waves could take a player from zero to level 26, while the big wave would take a player from zero to level 34. The largest orb dropped has a value of 1237 experience points, and can take a player from zero to level 28 all by itself.
The maximum level of XP that players can get legitimately is 238,609,312, and at this level the experience bar disappears, because reaching the next level would require more XP than the 32-bit integer limit (2,147,483,647, which is 231 - 1). However, it is possible to reach level 2,147,483,647 using commands. In this case, the experience bar may disappear and reappear.[3]