Gaming calculators

Minecraft Anvil Calculator

Updated Jul 18, 2026 By Jehan Wadia
Rate Formulas
Global Configuration
Version drives which enchantments and rules apply.
Game Edition
Java uses the 39-level "Too Expensive" cap.
Item Configuration
Penalty = 2ⁿ − 1 previous work cost.
Enchantment Selection
0 of 0 enchantments selected

Optimization Mode
Least Total Levels: spend the fewest levels right now.
Results Summary
Total XP Levels Required
0
Most Expensive Step: 0 / 39 cap
Optimal Combine Order

Step-by-Step List

    Step-by-Step Solution
    Cost per Anvil Operation
    Per-Step Cost Breakdown
    Each anvil operation in optimal sequence.
    StepInput A (target)Input B (sacrifice)OutputLevel Cost
    Enchantment Reference
    Anvil cost multipliers and conflicts by enchantment.
    EnchantmentMaxItem ×Book ×Conflicts

    Introduction

    The Minecraft Anvil Calculator helps you find the cheapest way to combine enchantments on any item. Every time you use an anvil, it costs XP levels. If you add enchantments in the wrong order, the cost goes up fast. In Java Edition, the anvil even locks you out when a single step costs more than 39 levels. This tool solves that problem.

    Pick your item, choose your enchantments, and the calculator figures out the best order to combine everything so you spend the fewest levels possible. It works for swords, pickaxes, armor, bows, maces, and every other enchantable item in the game. You can set the Minecraft version, switch between Java and Bedrock Edition, and adjust prior anvil uses for each piece.

    The results show a step-by-step combine order, a visual merge tree, a cost breakdown table, and the full math behind each anvil operation. You will see right away if any step goes over the "Too Expensive" cap so you can fix it before wasting resources in-game.

    How to Use Our Minecraft Anvil Calculator

    Enter your item, enchantments, and game settings below. The calculator will show you the cheapest order to combine everything on an anvil, the total XP levels needed, and a step-by-step guide for each anvil operation.

    Minecraft Version: Pick the version of Minecraft you are playing. This controls which enchantments are available. Click "Show Snapshots" if you play on a snapshot version.

    Game Edition: Choose Java Edition or Bedrock Edition. Java has a 39-level "Too Expensive" cap on each anvil use. Bedrock does not have this cap.

    Base Item: Select the item you want to enchant, such as a Sword, Pickaxe, or Helmet. This filters the enchantment list to only show ones that work on your item. If you need to figure out how many items you need to gather for a project, our Minecraft Stack Calculator can help you convert between individual items and stacks.

    Prior Anvil Uses — Base Item: Choose how many times your base item has already been used in an anvil. Each past use raises the penalty cost. Set this to 0 if your item is brand new.

    Rename: Check this box if you also want to rename your item during the process. This adds 1 extra level to the final anvil step.

    Enchantment Selection: Click the enchantment chips to pick which enchantments you want on your item. Conflicting enchantments will gray out automatically. For each selected enchantment, set its level, whether the source is a book or an item, and how many prior anvil uses the source has. To learn more about which enchantments are compatible and their maximum levels, check out our Minecraft Enchantment Calculator.

    Optimization Mode: Pick "Least Total Levels" to spend the fewest XP levels right now. Pick "Least Prior-Work Penalty" to keep future anvil costs low, which is better if you plan to add more enchantments later.

    Calculate: Press the Calculate button to see your results. The calculator will display the total XP cost, a combine-order tree, a step-by-step list with full math, a cost chart, and a warning if any step goes over the 39-level cap.

    How the Minecraft Anvil Works

    In Minecraft, the anvil is a block that lets you combine items, add enchantments, and rename gear. Every time you use an anvil, it costs XP levels. The more work you do on a single item, the more expensive each new step becomes. This rising cost is called the prior work penalty, and it doubles after every anvil use. If you want to know exactly how many experience points you need to reach a certain level, use our Minecraft XP Calculator to plan your grinding sessions.

    What Is the "Too Expensive" Limit?

    In Java Edition, if any single anvil step costs more than 39 levels, the game blocks it and shows "Too Expensive!" on the anvil screen. You cannot finish that step in Survival mode. Bedrock Edition does not have this cap, so you can always complete the operation as long as you have enough levels.

    Why Does Combine Order Matter?

    Each enchantment has a cost multiplier. Cheap enchantments like Sharpness have a low multiplier. Expensive ones like Silk Touch have a high multiplier. The anvil charges you based on the enchantments on the second item (the sacrifice). It also adds the prior work penalty of both items together.

    Because the penalty grows fast, the order you combine items in makes a big difference. If you combine things in a bad order, the final steps can hit the 39-level wall. A good order keeps each step cheap by spreading out the penalty evenly. That is exactly what this calculator figures out for you.

    How the Cost Formula Works

    Every anvil operation adds up three parts:

    • Prior work penalty of the target item: equal to 2n − 1, where n is the number of times that item has been through an anvil.
    • Prior work penalty of the sacrifice item: calculated the same way.
    • Enchantment cost: each enchantment on the sacrifice is multiplied by its cost multiplier. Books use a lower multiplier than items.

    If you rename the item, the game adds 1 extra level on top of everything else.

    Books vs. Items as Sacrifices

    Using an enchanted book as the sacrifice is almost always cheaper than using another tool or piece of armor. Books have lower cost multipliers for every enchantment. The only reason to use an item as a sacrifice is if you already have one with the enchantments you need and no books available.

    Tips to Stay Under the Cap

    • Always use fresh items and books with zero prior anvil uses when possible.
    • Combine the most expensive enchantments first while the penalty is still low.
    • Pair books together before applying them to your item to keep the item's penalty from growing too fast.
    • Avoid putting an item through the anvil more than 5 or 6 times total — the penalty gets extreme after that.
    • If you are building a Nether hub to farm XP more efficiently, our Nether Portal Calculator can help you align your portal coordinates.
    • Running a multiplayer server where everyone needs to enchant gear? Use the Minecraft Server RAM Calculator to make sure your server can handle the load.
    • Understanding Minecraft tick timing can also help you optimize XP farms that feed into your enchanting setup.

    Formulas used

    Prior Work Penalty
    P(w) = 2^{w} - 1
    Enchantment Transfer Cost (sacrifice)
    E = \sum_{i=1}^{n} l_i \cdot m_i
    Anvil Step Cost
    C = (2^{w_t} - 1) + (2^{w_s} - 1) + \sum_{i=1}^{n} l_i \cdot m_i + r
    Output Work Value (after combining)
    w_{\text{out}} = \max(w_t,\, w_s) + 1
    Total XP Levels
    T = \sum_{k=1}^{s} C_k
    Merged Enchantment Level
    l_{\text{out}} = \begin{cases} l + 1 & \text{if } l_t = l_s \text{ and } l_t < l_{\max} \\ \max(l_t,\, l_s) & \text{otherwise} \end{cases}

    Frequently asked questions

    What does this Minecraft Anvil Calculator do?

    This tool finds the cheapest order to combine enchantments on any Minecraft item using an anvil. You pick your item and enchantments, and it tells you exactly which pieces to combine first so you spend the fewest XP levels and stay under the "Too Expensive" cap.

    Why does my anvil say Too Expensive?

    In Java Edition, any single anvil step that costs more than 39 levels gets blocked. The game shows "Too Expensive!" and won't let you finish. This usually happens when your item has been through the anvil too many times, raising the prior work penalty too high. Use this calculator to find an order that keeps every step under 39.

    Does the Too Expensive cap apply in Bedrock Edition?

    No. Bedrock Edition does not have the 39-level cap. You can complete any anvil step as long as you have enough XP levels. Switch the calculator to Bedrock mode to see costs without the cap warning.

    What is prior work penalty?

    Every time an item goes through an anvil, it gains a hidden counter. The penalty equals 2n − 1, where n is how many times that item has been anviled before. A fresh item has 0 penalty. After one use it's 1, after two it's 3, after three it's 7, and so on. It doubles each time, which is why order matters so much.

    What should I set the prior anvil uses to?

    Set it to 0 if your item or book has never been used in an anvil before. If you already repaired or enchanted it on an anvil, count how many times you did that and pick that number. Higher prior uses mean higher costs for every future anvil step.

    Should I use books or items as the sacrifice?

    Use enchanted books whenever you can. Books have lower cost multipliers than tools or armor for every enchantment. This makes each step cheaper. Only use an item as a sacrifice if you already have one with the right enchantments and no book available.

    What is the difference between Least Total Levels and Least Prior-Work Penalty?

    Least Total Levels finds the order that costs the fewest XP levels right now. Least Prior-Work Penalty keeps the item's anvil counter as low as possible so future anvil uses stay cheap. Pick the second option if you plan to add more enchantments or repairs later.

    Why are some enchantment chips grayed out?

    Grayed-out enchantments conflict with one you already selected. For example, if you pick Sharpness, then Smite and Bane of Arthropods gray out because Minecraft does not allow them on the same item. Remove the conflicting enchantment to unlock the others.

    How do I read the merge tree diagram?

    The tree shows which items to combine at each step. Items at the bottom are your starting pieces. Each pair merges upward into a new piece, with the level cost shown in an orange badge. The final item sits at the top. Follow the tree from bottom to top to do each anvil step in the right order.

    Can I rename my item and enchant it at the same time?

    Yes. Check the Rename box in the Item Configuration section. The calculator adds 1 extra level to the final anvil step for the rename. This matches how the game handles it.

    What does the cost chart show?

    The bar chart shows the XP level cost of each anvil step in order. In Java Edition, a red dashed line marks the 39-level cap. If any bar goes above that line, that step will be blocked in Survival mode.

    Does changing the Minecraft version affect results?

    Yes. Different versions have different enchantments available. For example, Mace enchantments like Density and Breach only exist in 1.21 and later. The calculator filters enchantments based on your chosen version so you only see ones that actually work in your game.

    How many enchantments can I add to one item?

    There is no hard limit on the number of enchantments, but each one raises the cost. In Java Edition, adding too many can push a step over the 39-level cap. The calculator warns you if this happens and helps you find the best order to fit as many as possible.

    Why should I combine books together before adding them to my item?

    Combining books together first keeps your main item's prior work counter low. If you put every book directly on the item one at a time, the item's penalty grows with each step. Merging books into one book first means the item goes through the anvil fewer times, keeping costs down.

    What is the maximum number of anvil uses before an item becomes too expensive?

    In Java Edition, an item with 6 prior anvil uses has a penalty of 63 levels just from the penalty alone. That means almost any enchantment added on top will exceed the 39-level cap. In practice, most items hit "Too Expensive" after 5 to 6 total anvil operations.

    Does repairing an item on an anvil count as a prior use?

    Yes. Every anvil operation raises the prior work counter by one, including repairs, combining enchantments, and renaming. That is why it is best to add all enchantments before you start repairing, or use Mending instead of anvil repairs.

    What do the Item multiplier and Book multiplier mean in the reference table?

    These are the cost multipliers the anvil uses when calculating enchantment cost. Each enchantment level on the sacrifice is multiplied by this number. The Book multiplier is always equal to or lower than the Item multiplier, which is why books are cheaper to use.

    Can I use this calculator for Creative mode?

    In Creative mode, anvil operations are free and the Too Expensive cap does not apply. You don't need a calculator for Creative. This tool is built for Survival and Adventure mode players who need to manage their XP spending.