Discord

Minecraft XP calculator: work out the XP between levels

Find out exactly how many experience points you need to get from any level to your target level. The calculator shows the XP formula and how many bottles o' enchanting, mob kills, mined ores and ore smelts it takes, plus an estimate of how long collecting the XP will take.

Enter your levels
→
Level 0Level 30
0%
XP needed
1,395
Bottles o' Enchanting
200
avg. 7 XP/bottle
Mob kills (zombie/skeleton)
279
5 XP/mob
Ores smelted (iron/gold)
1,642
~0.85 XP/ore
Diamond ore
279
3-7 XP/ore
Estimated time (mob farm)
28 min
~10 mobs/min
Minecraft XP formula

Minecraft uses three different formulas to work out the XP needed for each level. The higher your level, the more XP each new level costs. That is why reaching level 30 takes far more XP than reaching level 15.

Levels 0-15 (cheapest)
XP to level up from level L = 2L + 7
Total XP to reach level L = L² + 6L
Example: at level 15 the next level costs 2×15+7 = 37 XP, and reaching level 16 takes 352 XP in total from 0
Levels 16-30 (medium)
XP to level up from level L = 5L - 38
Total XP to reach level L = 2.5L² - 40.5L + 360
Example: at level 30 the next level costs 5×30-38 = 112 XP, and reaching level 30 takes 1,395 XP in total from 0
Levels 31+ (most expensive)
XP to level up from level L = 9L - 158
Total XP to reach level L = 4.5L² - 162.5L + 2220
Example: at level 50 the next level costs 9×50-158 = 292 XP, and reaching level 50 takes 5,345 XP in total from 0
XP source comparison

To gain 1,395 XP (from level 0 to 30), you need:

XP sourceXP eachAmount neededEstimated time
Bottles o' Enchanting3-11200~30 min
Zombie5279~28 min
Skeleton5279~28 min
Creeper5279~28 min
Enderman5279~28 min
Blaze10140~14 min
Ender Dragon (first kill)120001~1 min
Wither5028~5 min
Smelting ore (gold/iron)0.7-11,642~4.1 hr
Mining diamond ore3-7279~1.2 hr
Mining coal ore0-21,395~5.8 hr
Mining lapis lazuli ore2-5399~1.7 hr
Mining nether quartz ore2-5399~1.7 hr
Breeding animals1-7349~53 min
Fishing1-6399~1.0 hr
XP per level (from 1 to 30)
LevelFormula rangeXP for this levelTotal XP from 0
10-1577
20-15916
30-151127
40-151340
50-151555
60-151772
70-151991
80-1521112
90-1523135
100-1525160
110-1527187
120-1529216
130-1531247
140-1533280
150-1535315
160-1537352
1716-3042394
1816-3047441
1916-3052493
2016-3057550
2116-3062612
2216-3067679
2316-3072751
2416-3077828
2516-3082910
2616-3087997
2716-30921,089
2816-30971,186
2916-301021,288
3016-301071,395
Tip: the fastest ways to farm XP

The most efficient ways to collect XP are mob farms (especially an Enderman farm in the End: about 30 levels in 3-5 minutes), smelting with an automatic cactus farm (the furnace collects XP while you are AFK) and villager trading (a renewable XP source if you farm paper or carrots). Avoid killing mobs by hand for XP, it is the slowest method.

Fun fact: why level 30?

Level 30 is the most common target because an enchanting table needs exactly 30 levels to offer its best enchantments. Getting there costs 1,395 XP in total (from 0). The catch: the enchantment itself only takes 1-3 experience levels, not 30. You need 30 levels as an entry requirement, but the real cost is lower.

How the Minecraft XP system works

Experience (XP, experience points) is a point system you build up by doing things in the game: killing mobs, mining ores, fishing, breeding animals and trading with villagers. XP points add up to experience levels, which work as currency for enchanting items at an enchanting table, repairing them at an anvil and renaming them.

The key mechanic: the XP cost of the next level keeps growing the higher you go. Going from level 0 to 1 takes just 7 XP. Collecting XP far past level 30-40 gets very expensive and is usually not worth it.

When you die, you lose all your XP. A small part of it drops as orbs where you died (a maximum of 100 points, whatever level you had). That is why experienced players enchant their items regularly once they reach level 30, instead of hoarding XP for higher levels.

The three XP formulas: why does the cost keep rising?

Minecraft splits the XP system into three level ranges, each with its own formula. That keeps the low levels quick to reach, while the higher ones take more and more effort. Here is each range in detail:

Levels 0-15: the cheap phase

Formula: XP to the next level = 2L + 7 (L is your current level). Total XP from 0 to level L: L² + 6L. In this range the cost climbs slowly, starting at just 7 XP for the first level. You need 352 XP in total to reach level 16, which is less than half of what level 30 costs. Most basic enchantments (Sharpness I-III, Protection I-II) are within reach in this range.

Levels 16-30: the acceleration phase

Formula: XP to the next level = 5L - 38. Total XP from 0 to level L: 2.5L² - 40.5L + 360. The cost climbs much faster here: at level 17 the next level costs 47 XP. Level 30 takes 1,395 XP in total from zero. That is the most important target for most players, because an enchanting table needs exactly 30 levels to offer its best enchantments. Remember: the enchantment itself only uses 1-3 levels, not 30.

Levels 31+: the expensive phase

Formula: XP to the next level = 9L - 158. Total XP from 0 to level L: 4.5L² - 162.5L + 2220. The cost climbs dramatically: at level 32 the next level costs 130 XP, and at the highest levels a single level takes over 1,000 XP. Level 50 takes 5,345 XP in total. In practice there is no point collecting XP past level 30-40, unless you play on a modded server that needs higher levels.

XP sources in Minecraft

Killing mobs

Most hostile mobs give 5 XP per kill (zombies, skeletons, creepers, endermen, spiders). The exceptions are the blaze (10 XP), the Ender Dragon (12,000 XP the first time, 500 after that), the Wither (50 XP) and the baby zombie (12 XP, more than an adult!). Passive mobs (cows, pigs, chickens) give 1-3 XP. Important: mob XP only counts if the player lands the final blow or the mob dies within 5 seconds of taking damage from the player.

Mining ores

Mining ores (without Silk Touch) gives XP right away. Diamond ore (3-7 XP), emerald ore (3-7 XP), lapis lazuli ore (2-5 XP), nether quartz ore (2-5 XP), coal ore (0-2 XP) and redstone ore (1-5 XP). Tip: mining quartz in the Nether is one of the fastest ways to get XP early in the game.

Smelting in a furnace

Every smelt gives XP, but only once you take the item out of the furnace. The XP piles up. Smelting iron or gold ore gives about 0.7-1.0 XP per item, so 100 ores taken out at once give roughly 70-100 XP in one go. Cooking meat gives 0.35 XP. Smelting sand into glass gives 0.1 XP. AFK furnace farms are a popular way to bank XP: build an automatic cactus farm, connect it to a furnace, and the XP collects while you are away.

Fishing

Every catch gives 1-6 XP (about 3.5 on average). Fishing is one of the better XP sources early on, because all you need is a fishing rod made from sticks and string (from spiders). With Lure III and Luck of the Sea III you catch fish faster and find treasure more often. Automatic AFK fishing farms have been weakened in newer versions, but fishing by hand is still worth it.

Breeding animals

Breeding animals gives 1-7 XP for every successful breeding. That is not much for a single feeding, but with a big herd you can collect XP quickly, every ~5 minutes (the breeding cooldown). Killing the surplus animals also gives 1-3 XP each, plus meat and leather.

Trading with villagers

Trading with villagers is one of the best renewable XP sources, because villagers restock their trades twice a day. With a well-developed village (10-20 villagers with different professions) you can earn hundreds of XP a day while also getting useful items. The most profitable professions are farmer (wheat/carrots for emeralds), librarian (paper for emeralds) and mason (stone for emeralds).

Bottles o' Enchanting

A Bottle o' Enchanting gives 3-11 XP at random (7 on average). You can buy them from a cleric for emeralds (once you unlock the right trade level) or find them in chests, for example in ancient cities. On servers they often work as an XP currency.

The best XP farms, ranked by efficiency

Here are the most efficient XP farms in Minecraft, from fastest to slowest:

  1. Enderman farm in the End: about 30 levels in 3-5 minutes. The fastest farm in the game, but you need to defeat the Ender Dragon first and build the platform.
  2. Guardian farm (ocean monument): about 30 levels in 5-10 minutes. Requires draining an ocean monument. Very fast, but extremely labor-intensive to build (10-20 hours of work).
  3. Blaze farm (Nether fortress): 10 XP per mob and a fast respawn. About 30 levels in 10-15 minutes. Easier to build than an Enderman farm. Bonus: blaze rods for brewing potions.
  4. Furnace farm (AFK): slow, but fully automatic. Cactus goes into a furnace and the XP piles up for hours. Ideal overnight or while you do other things. Needs an automatic resource farm.
  5. Zombie/skeleton farm (spawner): the classic, easy to build. About 30 levels in 15-25 minutes. Find a spawner in a dungeon and build a water channel into a kill chamber. Available very early in the game.
  6. Villager trading: a renewable source that needs no farm. Combines XP with getting useful items.

XP and enchanting: what does it really cost?

An enchanting table needs level 30 to offer its best enchantments, but it does not use up 30 levels. The top enchantment option costs exactly 3 experience levels plus 3 lapis lazuli. The middle option costs 2 levels and the lowest costs 1 level. That is the key difference many players miss.

The anvil works differently: the level cost depends on the operation. Renaming costs 1 level. Combining enchantments costs anywhere from a few to a few dozen levels. The anvil limit in Java Edition is 39 levels: if an operation would cost more, the anvil shows "Too Expensive!" and refuses to do it. That is why the order in which you combine enchantments on an anvil matters so much (use our enchantment calculator).

The grindstone is the alternative: it removes enchantments from an item and gives you some XP back. The amount is random and typically lower than the original cost. Still, a grindstone is handy for recycling unwanted enchantments from loot and finds.

XP management tips

  • Enchant at level 30, not higher. Hoarding XP past 30 is not worth it, because the costs climb steeply and you risk losing it all when you die.
  • Use Mending. It repairs your item with XP orbs instead of adding them to your experience bar. Items with Mending do not wear out as long as you keep collecting XP.
  • Build an XP farm early. Even a simple zombie/skeleton spawner farm saves hours of grinding. Look for spawners in dungeons underground.
  • Run an AFK furnace farm overnight. Connect an automatic cactus farm to a furnace. The XP builds up while you sleep, and in the morning you take out the products and collect hundreds of XP.
  • Let the smelting pile up before you take it out. Furnace XP is only added when you take out the product. If a furnace smelted 1,000 items, you get all of that XP at once.
  • Mine quartz in the Nether. Quartz ore gives 2-5 XP and is very common. On a single trip to the Nether you can collect 5-10 levels from mining alone.
  • Do not ignore fishing. Besides XP, it gives you a chance at enchanted bows, fishing rods, enchanted books and other treasure. Luck of the Sea raises the treasure chance.

Differences between Java and Bedrock Edition

The XP system is nearly identical in both editions. The formulas for the XP per level are the same. The main differences concern XP farms: some farm mechanics (for example moving mobs with water, or tick speed) work slightly differently in Bedrock. An Enderman farm in the End works in both editions, but the platform height needs adjusting. AFK furnace farms work the same way. Villager trading gives the same amounts of XP in both editions.

Frequently asked questions

How much XP do you need for level 30 in Minecraft?

You need 1,395 XP to reach level 30 from zero. It is the key target because an enchanting table needs level 30 to offer its best enchantments. The enchanting itself only uses 1-3 levels, not 30.

What is the XP formula in Minecraft?

Minecraft uses three XP formulas depending on your level. The XP to reach the next level is 2L + 7 up to level 15, 5L - 38 for levels 16-30 and 9L - 158 from level 31 up, where L is your current level. The total XP from zero to a level L is L² + 6L (up to level 16), 2.5L² - 40.5L + 360 (levels 17-31) and 4.5L² - 162.5L + 2220 (level 32 and up). The higher your level, the more XP the next level costs.

What is the fastest way to get XP in Minecraft?

An Enderman farm in the End: about 30 levels in 3-5 minutes. Earlier in the game, a blaze farm in the Nether or a zombie/skeleton spawner farm in a dungeon works well. Other good options are an AFK furnace farm (it collects XP while you are away), villager trading (renewable XP) and a guardian farm at an ocean monument. Right at the start, fishing and mining coal or quartz are the easiest options.

Do you lose XP when you die in Minecraft?

Yes, you lose all your levels when you die. A part of your XP drops as orbs where you died (a maximum of 100 points, whatever your level). If you die at level 30 or higher, you lose the vast majority of your XP. That is why it pays to enchant items regularly instead of hoarding XP.

How much XP does the Ender Dragon give?

The first Ender Dragon kill gives 12,000 XP, enough for more than 68 levels from zero. Every later kill (after respawning the dragon) gives only 500 XP. It is the biggest single XP reward in the game.

How many bottles o' enchanting do I need for level 30?

A Bottle o' Enchanting gives 3-11 XP at random (7 on average). To reach level 30 from zero (1,395 XP) you need about 200 bottles. You can buy them from a cleric villager for emeralds or find them in chests.