How to Calculate Minecraft Anvil Costs: The Complete Enchantment Combining Order Guide

How to Calculate Minecraft Anvil Costs - 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.

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:

Prior Work Penalty Cost Formula
Penalty Cost (levels) = 2c โˆ’ 1
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 levelsNo extra cost at all
1+1 levelBarely noticeable
2+3 levelsStill manageable
3+7 levelsStarting to add up
4+15 levelsSignificant 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.

Total Anvil Operation Cost
Total Cost = Enchantment Cost
              + 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):

ComponentCalculationCost
Sharpness V enchantment (book multiplier: 1)5 ร— 15 levels
Left item penalty (sword, used once)2ยน โˆ’ 11 level
Right item penalty (fresh book)2โฐ โˆ’ 10 levels
Total6 levels
Resulting sword penalty1 + 12

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
SharpnessV11
ProtectionIV11
EfficiencyV11
PowerV11
PiercingIV11
LoyaltyIII11
DensityV21
SmiteV21
Bane of ArthropodsV21
KnockbackII21
Fire ProtectionIV21
Feather FallingIV21
UnbreakingIII21
Quick ChargeIII21
RespirationIII42
Depth StriderIII42
Aqua AffinityI42
Fire AspectII42
LootingIII42
FortuneIII42
PunchII42
FlameI42
MendingI42
Frost WalkerII42
Luck of the SeaIII42
LureIII42
Wind BurstIII42
BreachIV42
Sweeping EdgeIII42
ThornsIII84
Silk TouchI84
InfinityI84
Soul SpeedIII84
Swift SneakIII84
ChannelingI84
Curse of BindingI84
Curse of VanishingI84

๐Ÿ’ก 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

  1. 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.
  2. 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.
  3. 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.
  4. 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โ€“31โ€“21โ€“2โœ… Easy
4โ€“52โ€“32โ€“3โœ… Straightforward
6โ€“733โœ… Requires planning
8โ€“93โ€“43โ€“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:

Round 1 โ€” Combine Books in Pairs

Step 1: Sharpness V book + Looting III book

Cost: 5 + 6 = 11 levels | Result penalty: 1
Round 1 โ€” Combine Books in Pairs

Step 2: Unbreaking III book + Mending book

Cost: 3 + 2 = 5 levels | Result penalty: 1
Round 1 โ€” Combine Books in Pairs

Step 3: Fire Aspect II book + Sweeping Edge III book

Cost: 4 + 6 = 10 levels | Result penalty: 1
Round 2 โ€” Apply to Sword

Step 4: Netherite Sword (penalty 0) + [Sharpness V + Looting III] book (penalty 1)

Cost: 11 + 0 + 1 = 12 levels | Sword penalty: 1
Round 2 โ€” Apply to Sword

Step 5: Sword (penalty 1) + [Unbreaking III + Mending] book (penalty 1)

Cost: 5 + 1 + 1 = 7 levels | Sword penalty: 2
Round 2 โ€” Apply to Sword

Step 6: Sword (penalty 2) + [Fire Aspect II + Sweeping Edge III] book (penalty 1)

Cost: 10 + 3 + 1 = 14 levels | Sword penalty: 3

Total 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):

Step 1

Efficiency V book + Fortune III book

Cost: 5 + 6 = 11 levels | Result penalty: 1
Step 2

Unbreaking III book + Mending book

Cost: 3 + 2 = 5 levels | Result penalty: 1
Step 3

Diamond Pickaxe (penalty 0) + [Efficiency V + Fortune III] book (penalty 1)

Cost: 11 + 0 + 1 = 12 levels | Pickaxe penalty: 1
Step 4

Pickaxe (penalty 1) + [Unbreaking III + Mending] book (penalty 1)

Cost: 5 + 1 + 1 = 7 levels | Pickaxe penalty: 2

Total: 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:

Round 1 โ€” Book Pairs

Step 1: Thorns III + Mending โ†’ Combined book (penalty 1, cost 14)

14 levels
Round 1 โ€” Book Pairs

Step 2: Depth Strider III + Feather Falling IV โ†’ Combined book (penalty 1, cost 10)

10 levels
Round 1 โ€” Book Pairs

Step 3: Protection IV + Unbreaking III โ†’ Combined book (penalty 1, cost 7)

7 levels
Round 2 โ€” Apply to Boots

Step 4: Boots (penalty 0) + Soul Speed III book (penalty 0)

12 levels | Boots penalty: 1
Round 2 โ€” Apply to Boots

Step 5: Boots (penalty 1) + [Thorns III + Mending] book (penalty 1)

14 + 1 + 1 = 16 levels | Boots penalty: 2
Round 2 โ€” Apply to Boots

Step 6: Boots (penalty 2) + [Depth Strider III + Feather Falling IV] book (penalty 1)

10 + 3 + 1 = 14 levels | Boots penalty: 3
Round 2 โ€” Apply to Boots

Step 7: Boots (penalty 3) + [Protection IV + Unbreaking III] book (penalty 1)

7 + 7 + 1 = 15 levels | Boots penalty: 4

Total: 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

  1. 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.
  2. 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.
  3. How Minecraft Anvil Works โ€” Our detailed breakdown of the anvil mechanics system, including visual examples of the work penalty growth.
  4. Minecraft Enchantment Calculator โ€” Use our free tool to calculate the optimal combining order for any item and enchantment combination automatically.
  5. ATM10 Apotheosis Anvil Prior Work Penalty โ€” Modpack-focused explanation of levels vs XP cost and paxel troubleshooting.