How to Calculate Minecraft Anvil Costs: The Complete Enchantment Combining Order Guide
I still remember the exact moment it happened. I had spent three evenings trading with librarian villagers, carefully collecting Sharpness V, Looting III, Mending, Unbreaking III, Fire Aspect II, and Sweeping Edge III. Six perfect books, laid out on my crafting table like little trophies. Then I walked up to the anvil, started adding them one by one to my netherite sword โ and on the fifth book, the screen flashed: "Too Expensive!"
That was the day I learned that in Minecraft, how you combine enchantments matters just as much as which enchantments you choose. The anvil has a hidden cost system that punishes you for working on the same item too many times โ and if you don't understand it, you'll waste dozens of XP levels and potentially lock yourself out of adding more enchantments forever.
This guide breaks down the exact formula behind Minecraft anvil costs, explains the prior work penalty in plain language, and shows you the optimal enchantment combining order for swords, pickaxes, and armor โ with real numbers, step-by-step examples, and a comparison between Java Edition and Bedrock Edition.
๐ Table of Contents
1. What Is the Prior Work Penalty?
Every item and enchanted book in Minecraft carries a hidden counter called the prior work penalty (stored internally as repair_cost in Java Edition). It starts at zero for any fresh item or book you pick up. Each time that item is used in the left slot of an anvil โ whether you're adding an enchantment, repairing it, or combining it with another item โ its penalty counter increases by one.
The penalty itself doesn't cost you anything directly. What it does is inflate the XP cost of every future anvil operation involving that item. And the inflation is exponential, not linear. The formula is:
where c = number of times the item has been used in an anvil
Here's what that looks like in practice:
| Anvil Uses (c) | Penalty Cost Added | What This Means |
|---|---|---|
| 0 (fresh item) | +0 levels | No extra cost at all |
| 1 | +1 level | Barely noticeable |
| 2 | +3 levels | Still manageable |
| 3 | +7 levels | Starting to add up |
| 4 | +15 levels | Significant overhead |
| 5 | +31 levels | โ ๏ธ Almost certainly "Too Expensive!" on its own |
โ ๏ธ The 39-level cap: Any single anvil operation that costs more than 39 levels is blocked with "Too Expensive!" โ even if you have 100 levels in your XP bar. Once an item's penalty reaches 5, adding almost anything to it will fail.
There's one more important rule: when you combine two items, the resulting item inherits the higher of the two penalties, plus one. So if you combine a sword with penalty 2 and a book with penalty 1, the resulting sword has penalty 3. This is why combining books together first โ before touching your main item โ is so powerful.
2. The Complete Anvil Cost Formula
Every anvil operation has a total cost made up of several components. Understanding each one helps you predict costs and plan your combining order.
+ Penalty of Left Item (2left_penalty โ 1)
+ Penalty of Right Item (2right_penalty โ 1)
+ Rename Cost (1 level, if renaming)
+ Incompatible Enchantment Penalty (Java only)
Let's walk through each component:
Enchantment Cost
Each enchantment has a base cost that depends on its rarity and the final level being applied. When using a book as the sacrifice (right slot), the multiplier is lower than when combining two items directly โ this is one reason why enchanted books from villager trading are so efficient. The full multiplier table is in the next section.
In Java Edition, you pay for the final level of the enchantment on the resulting item, multiplied by the enchantment's multiplier. In Bedrock Edition, you only pay for the increase in level โ which makes Bedrock significantly cheaper for many operations.
Penalty Costs
Both the left item (target) and the right item (sacrifice) contribute their penalty costs to the total. This is why a book with penalty 0 from a villager is so much cheaper to use than a book you've already combined once (penalty 1 = +1 level extra, penalty 2 = +3 levels extra, and so on).
A Worked Example
Let's say you're adding a Sharpness V book (penalty 0) to a netherite sword that you've already enchanted once (penalty 1):
| Component | Calculation | Cost |
|---|---|---|
| Sharpness V enchantment (book multiplier: 1) | 5 ร 1 | 5 levels |
| Left item penalty (sword, used once) | 2ยน โ 1 | 1 level |
| Right item penalty (fresh book) | 2โฐ โ 1 | 0 levels |
| Total | 6 levels | |
| Resulting sword penalty | 1 + 1 | 2 |
3. Enchantment Cost Multipliers Table
Each enchantment has two multipliers: one for when you combine two items directly, and a lower one for when you use an enchanted book. This is why getting max-level books from villagers and applying them directly is almost always more efficient than combining two enchanted items.
| Enchantment | Max Level | Item โ Item Multiplier | Book โ Item Multiplier |
|---|---|---|---|
| Sharpness | V | 1 | 1 |
| Protection | IV | 1 | 1 |
| Efficiency | V | 1 | 1 |
| Power | V | 1 | 1 |
| Piercing | IV | 1 | 1 |
| Loyalty | III | 1 | 1 |
| Density | V | 2 | 1 |
| Smite | V | 2 | 1 |
| Bane of Arthropods | V | 2 | 1 |
| Knockback | II | 2 | 1 |
| Fire Protection | IV | 2 | 1 |
| Feather Falling | IV | 2 | 1 |
| Unbreaking | III | 2 | 1 |
| Quick Charge | III | 2 | 1 |
| Respiration | III | 4 | 2 |
| Depth Strider | III | 4 | 2 |
| Aqua Affinity | I | 4 | 2 |
| Fire Aspect | II | 4 | 2 |
| Looting | III | 4 | 2 |
| Fortune | III | 4 | 2 |
| Punch | II | 4 | 2 |
| Flame | I | 4 | 2 |
| Mending | I | 4 | 2 |
| Frost Walker | II | 4 | 2 |
| Luck of the Sea | III | 4 | 2 |
| Lure | III | 4 | 2 |
| Wind Burst | III | 4 | 2 |
| Breach | IV | 4 | 2 |
| Sweeping Edge | III | 4 | 2 |
| Thorns | III | 8 | 4 |
| Silk Touch | I | 8 | 4 |
| Infinity | I | 8 | 4 |
| Soul Speed | III | 8 | 4 |
| Swift Sneak | III | 8 | 4 |
| Channeling | I | 8 | 4 |
| Curse of Binding | I | 8 | 4 |
| Curse of Vanishing | I | 8 | 4 |
๐ก Key insight: Highlighted rows (multiplier 8/4) are the most expensive enchantments. Thorns, Soul Speed, Silk Touch, and Infinity should always be placed in the sacrifice slot (right side) as few times as possible. When using books, their cost is halved compared to item-to-item combining.
4. Why Combining Order Matters So Much
Here's the core problem: every time you put your main item in the left slot of an anvil, its penalty goes up by one. If you add six enchantment books one at a time directly to your sword, the sword's penalty climbs from 0 to 6. By the time you're adding the sixth book, you're paying 2โต โ 1 = 31 extra levels just in penalty overhead โ before even counting the enchantment's own cost.
Compare that to a strategy where you combine books together first, then apply the combined books to your sword. The sword only goes into the anvil three or four times instead of six, keeping its penalty low throughout.
โ Wrong: Adding Books One by One
- Sword + Book 1 โ Sword penalty: 1
- Sword + Book 2 โ Sword penalty: 2 (+3 overhead)
- Sword + Book 3 โ Sword penalty: 3 (+7 overhead)
- Sword + Book 4 โ Sword penalty: 4 (+15 overhead)
- Sword + Book 5 โ Sword penalty: 5 (+31 overhead)
- Sword + Book 6 โ Too Expensive!
Total overhead from penalties alone: 0+1+3+7+15 = 26 extra levels
โ Right: Combine Books First (Pyramid)
- Book 1 + Book 2 โ Combined Book A (penalty 1)
- Book 3 + Book 4 โ Combined Book B (penalty 1)
- Book 5 + Book 6 โ Combined Book C (penalty 1)
- Sword + Book A โ Sword penalty: 1
- Sword + Book B โ Sword penalty: 2 (+3 overhead)
- Sword + Book C โ Sword penalty: 3 (+7 overhead)
Total overhead from penalties: 0+1+3 = 4 extra levels (on the sword)
The difference is dramatic. The wrong method accumulates 26 levels of penalty overhead on the sword alone. The pyramid method keeps it to just 4 levels on the sword. That's 22 levels saved โ enough to push you from "Too Expensive!" to a successful operation.
๐ก The golden rule: Your main item should touch the anvil as few times as possible. Combine all your books into groups first, then apply those groups to the item in a balanced sequence. Think of it like a tournament bracket โ pair up items with similar penalties, and work your way up.
5. The Pyramid Method: Optimal Combining Strategy
The pyramid method (also called the "balanced tree" approach) is the standard strategy for minimizing anvil costs when applying multiple enchantments. The idea is simple: instead of a linear chain where one item accumulates all the penalty, you build a branching structure where penalties stay balanced across all items.
The General Rules
- Combine books in pairs first. Two fresh books (penalty 0) combined produce a book with penalty 1. That's much cheaper to apply to your item than two separate operations.
- Balance the tree. Try to combine items that have similar penalty values. Combining two penalty-1 books gives a penalty-2 book. Combining two penalty-2 books gives a penalty-3 book. Keep the levels even.
- Put expensive enchantments in the sacrifice slot fewer times. Enchantments with high multipliers (Thorns, Soul Speed, Silk Touch) cost more every time they appear in the right slot. Arrange your combining order so these appear as the sacrifice as rarely as possible.
- Apply combined books to your item last. Your main item should only enter the anvil during the final stages, when it's receiving large combined books rather than individual ones.
How Many Books Can You Realistically Combine?
| Number of Enchantments | Combining Rounds Needed | Max Penalty on Final Item | Feasibility |
|---|---|---|---|
| 1โ3 | 1โ2 | 1โ2 | โ Easy |
| 4โ5 | 2โ3 | 2โ3 | โ Straightforward |
| 6โ7 | 3 | 3 | โ Requires planning |
| 8โ9 | 3โ4 | 3โ4 | โ ๏ธ Needs careful ordering |
| 10+ | 4+ | 4+ | โ ๏ธ Use the calculator |
For 8+ enchantments, manually calculating the optimal order gets complex fast. Our free enchantment calculator handles all the math instantly โ just pick your item and enchantments, and it gives you the exact step-by-step order.
Try the Enchantment Calculator โ6. Step-by-Step Examples
Example 1: Netherite Sword (6 Enchantments)
Target enchantments: Sharpness V, Looting III, Unbreaking III, Mending, Fire Aspect II, Sweeping Edge III
All books are fresh from villager trading (penalty 0). Here's the optimal combining order, optimized for least total XP:
Step 1: Sharpness V book + Looting III book
Cost: 5 + 6 = 11 levels | Result penalty: 1Step 2: Unbreaking III book + Mending book
Cost: 3 + 2 = 5 levels | Result penalty: 1Step 3: Fire Aspect II book + Sweeping Edge III book
Cost: 4 + 6 = 10 levels | Result penalty: 1Step 4: Netherite Sword (penalty 0) + [Sharpness V + Looting III] book (penalty 1)
Cost: 11 + 0 + 1 = 12 levels | Sword penalty: 1Step 5: Sword (penalty 1) + [Unbreaking III + Mending] book (penalty 1)
Cost: 5 + 1 + 1 = 7 levels | Sword penalty: 2Step 6: Sword (penalty 2) + [Fire Aspect II + Sweeping Edge III] book (penalty 1)
Cost: 10 + 3 + 1 = 14 levels | Sword penalty: 3Total cost: 11 + 5 + 10 + 12 + 7 + 14 = 59 levels. Adding books one by one would cost approximately 80+ levels and likely fail on the last step.
Example 2: Diamond Pickaxe (5 Enchantments)
Target enchantments: Efficiency V, Fortune III, Unbreaking III, Mending, Silk Touch
Wait โ Fortune and Silk Touch are mutually exclusive. You can't have both on the same pickaxe. This is one of the most common mistakes new players make. Choose one: Fortune III for resource farming, or Silk Touch for collecting blocks intact. See our enchantment compatibility guide for a full list of conflicts.
Let's go with Efficiency V, Fortune III, Unbreaking III, Mending (4 enchantments):
Efficiency V book + Fortune III book
Cost: 5 + 6 = 11 levels | Result penalty: 1Unbreaking III book + Mending book
Cost: 3 + 2 = 5 levels | Result penalty: 1Diamond Pickaxe (penalty 0) + [Efficiency V + Fortune III] book (penalty 1)
Cost: 11 + 0 + 1 = 12 levels | Pickaxe penalty: 1Pickaxe (penalty 1) + [Unbreaking III + Mending] book (penalty 1)
Cost: 5 + 1 + 1 = 7 levels | Pickaxe penalty: 2Total: 35 levels. Clean, efficient, and well under the 39-level cap at every step.
Example 3: Diamond Boots (7 Enchantments)
This is where it gets interesting. Target: Soul Speed III, Thorns III, Mending, Depth Strider III, Feather Falling IV, Protection IV, Unbreaking III
With 7 enchantments, the order becomes critical. The key insight from the Minecraft Wiki's best enchantments guide is that high-cost enchantments like Soul Speed III (cost 12) and Thorns III (cost 12) should be applied to the boots early, before the penalty builds up. Here's the optimal sequence:
Step 1: Thorns III + Mending โ Combined book (penalty 1, cost 14)
14 levelsStep 2: Depth Strider III + Feather Falling IV โ Combined book (penalty 1, cost 10)
10 levelsStep 3: Protection IV + Unbreaking III โ Combined book (penalty 1, cost 7)
7 levelsStep 4: Boots (penalty 0) + Soul Speed III book (penalty 0)
12 levels | Boots penalty: 1Step 5: Boots (penalty 1) + [Thorns III + Mending] book (penalty 1)
14 + 1 + 1 = 16 levels | Boots penalty: 2Step 6: Boots (penalty 2) + [Depth Strider III + Feather Falling IV] book (penalty 1)
10 + 3 + 1 = 14 levels | Boots penalty: 3Step 7: Boots (penalty 3) + [Protection IV + Unbreaking III] book (penalty 1)
7 + 7 + 1 = 15 levels | Boots penalty: 4Total: 88 levels across all operations. Every single step stays under the 39-level cap. Without planning, this combination would almost certainly hit "Too Expensive!" before all 7 enchantments are applied.
Want to see the optimal order for your specific combination? Check out our best builds page for pre-calculated setups, or use the calculator to generate a custom order.
7. Java Edition vs. Bedrock Edition: Key Differences
The anvil cost system works similarly in both editions, but there are meaningful differences that affect how you plan your enchanting โ especially if you're switching between platforms or playing on a server that mixes editions.
| Feature | Java Edition | Bedrock Edition |
|---|---|---|
| Enchantment cost calculation | Pays for the full final level of the enchantment | Pays only for the level increase โ significantly cheaper |
| Incompatible enchantment penalty | +1 level per incompatible enchantment on target | No penalty for incompatible enchantments |
| Sweeping Edge | Available on swords | Not available |
| Impaling multiplier | 4 (item) / 2 (book) | 2 (item) / 1 (book) |
| Rename cost cap | Capped at 39 levels for rename-only operations | Rename blocked in Creative mode too |
| Prior work penalty tracking | Stored as repair_cost NBT tag |
Tracked internally, not directly visible |
| Overall cost | Generally higher | Generally lower for same operations |
What This Means in Practice
If you're playing Bedrock Edition, you'll find that many operations that would be borderline "Too Expensive!" in Java Edition are comfortably under the cap. The Bedrock cost model only charges you for the improvement โ so if you're upgrading Looting II to Looting III, you only pay for one level of Looting, not three.
In Java Edition, you pay for the full final level every time, which is why the combining order matters even more. A Looting III book applied to a sword always costs 6 levels (3 ร multiplier 2) in Java, regardless of whether the sword already has Looting I or Looting II.
The pyramid method works for both editions โ it's just that Bedrock players have a bit more margin for error. Our enchantment calculator supports both editions and accounts for these differences automatically.
๐ก Bedrock tip: Because Bedrock only charges for level increases, it's sometimes worth applying a lower-level enchantment first and then upgrading it, rather than going straight to max level. This is the opposite of the Java Edition strategy.
8. Frequently Asked Questions
Why does my anvil say "Too Expensive!" even though I have enough levels?
The 39-level cap is a hard limit on the cost of the operation, not on your current XP. Even if you have 100 levels, an operation that costs 40 levels will be blocked. This usually happens because your item has been used in the anvil too many times, accumulating a high prior work penalty. The only fix is to start over with a fresh item and plan your combining order from the beginning.
Can I reset the prior work penalty?
Not without losing your enchantments. Repairing an item on a crafting table removes all enchantments, custom names, and prior work penalties โ but that defeats the purpose. A grindstone removes enchantments and penalties but keeps the custom name. There's no way to reset the penalty while keeping your enchantments in vanilla Minecraft.
Should I combine books before applying them to my item?
Almost always yes. Combining books first keeps your main item's penalty low, which is the single most effective way to reduce total costs and avoid "Too Expensive!" errors. The only exception is when you only have 1โ2 enchantments to apply โ in that case, applying directly is fine.
Does the order of books in the anvil slots matter?
Yes, significantly. The item in the left slot (target) keeps its penalty and gains one. The item in the right slot (sacrifice) is consumed. In Java Edition, you also pay the full enchantment cost based on the sacrifice's enchantments. Putting a high-cost book in the right slot repeatedly is expensive โ try to arrange your order so costly enchantments appear in the sacrifice slot as few times as possible.
What's the maximum number of enchantments I can put on one item?
It depends on the item. Swords can hold up to 7 enchantments (Java) or 6 (Bedrock, no Sweeping Edge). Boots can hold 7โ8. Helmets can hold up to 6. The limiting factor isn't usually the number of enchantments โ it's the total cost of applying them all. With the pyramid method and fresh books, most items can reach their maximum enchantment count. See our best builds page for the full breakdown by item type.
Is there a difference between enchanting a diamond item vs. a netherite item?
No โ the anvil cost calculation is identical regardless of the item's material. Netherite items have higher durability and are blast-resistant, but the enchanting process and costs are the same as diamond. The enchantments available also don't change between diamond and netherite versions of the same item type.
How does the anvil cost formula work for Bedrock Edition specifically?
In Bedrock, the enchantment cost is calculated as: (final level โ current level on target) ร book multiplier. So if your sword already has Sharpness III and you're adding a Sharpness V book, you only pay for 2 levels (V โ III = 2) ร 1 = 2 levels, not 5. This makes upgrading existing enchantments much cheaper in Bedrock than in Java. The prior work penalty formula is the same in both editions.
Playing a modpack instead of vanilla? ATM10 and Apotheosis-style enchanting can make anvil costs feel different because pack configuration and XP charging may change the final number. See our ATM10 Apotheosis anvil prior work penalty guide for the modded version of this problem.
Sources & Further Reading
- Anvil mechanics โ Minecraft Wiki (nofollow) โ Official documentation for anvil cost formulas, prior work penalty table, and enchantment multipliers. All numerical data in this article is verified against this source.
- Best enchantments guide โ Minecraft Wiki Tutorials โ Community-maintained guide covering optimal enchantment combinations for all item types, including the 7-enchantment boots example referenced in this article.
- How Minecraft Anvil Works โ Our detailed breakdown of the anvil mechanics system, including visual examples of the work penalty growth.
- Minecraft Enchantment Calculator โ Use our free tool to calculate the optimal combining order for any item and enchantment combination automatically.
- ATM10 Apotheosis Anvil Prior Work Penalty โ Modpack-focused explanation of levels vs XP cost and paxel troubleshooting.