Minecraft XP Calculator

Convert between experience levels and raw XP points. Same formula in Java and Bedrock.

Quick answer: Level 30 needs 1,395 XP total. Enchanting spends only 3 levels, but going from 27 to 30 costs 306 XP while 0 to 3 costs just 32 XP - so enchant as soon as you hit 30.

Levels to XP

XP to levels

Level-up cost

How Minecraft XP works

Every level costs more XP than the last. The game tracks your progress in raw experience points, and the level is derived from them:

Total XP to reach a level L from zero: L² + 6L (up to 16), 2.5L² - 40.5L + 360 (17-31), and 4.5L² - 162.5L + 2220 (32+). The formula is identical in Java and Bedrock Edition.

Why you should enchant at exactly level 30

An enchanting table spend is 3 levels, not a fixed amount of XP. Going from level 0 to 3 costs 32 XP, but going from 27 to 30 costs 306 XP - almost ten times more for the same enchant. So always enchant the moment you reach level 30: each subsequent enchant costs far fewer total points. The same logic applies to anvil work: do expensive jobs at lower levels when the level cost is small.

Best XP sources