Minecraft enchantment order optimizer
Applying books one at a time is the most expensive way to enchant anything, and it's why you hit "Too Expensive!" halfway through. Pick what you want below and this searches every possible combining order for the cheapest one.
Why order matters so much
Every anvil use stamps an item with a prior work penalty that doubles each time: 0, then 1, 3, 7, 15, 31, 63 levels. That penalty is charged again on every subsequent combine, so applying six books one after another to the same pickaxe pays escalating rent on the same item until the anvil refuses. Below 40 levels an operation works; at 40 it shows Too Expensive and there is no way around it in survival.
The fix is to stop treating the tool as the workbench. Combine books with books first — book pairs into book pairs — and only merge the finished composite book onto your item at the end. Every item in that tree gets anviled about log₂(n) times instead of n times, so no single step ever accumulates a large penalty. That's the structure the optimizer above finds, and it's often the difference between a possible and an impossible set.
Two more rules the calculator applies for you. Enchantments from books cost half what the same enchantment costs from an enchanted item, so books are always the cheaper path. And the cost of each enchantment scales with its rarity — Mending, Silk Touch and Thorns are the expensive ones to move around, so where they land in the order matters more than where Sharpness does.
One thing to plan ahead for: a tool you've already repaired or renamed carries a penalty before you start. If a set looks impossible, an unenchanted replacement tool often costs less than fighting the anvil.
Questions
Why does my anvil say Too Expensive?
Any single operation costing 40 levels or more is refused in survival, regardless of your XP. It's the prior work penalty doing it — combine books together first and apply the result once, which keeps every step well under the cap.
Does renaming my item make it more expensive?
In Java Edition, renaming alone doesn't increase the prior work penalty — it costs one level at the time but doesn't compound. Repairing does add to the penalty, so rename freely and repair thoughtfully.
Should I use books or enchanted items?
Books, always, when you have the choice. The same enchantment costs half as many levels applied from a book as from an enchanted item, and books let you build a cheap combining tree instead of hammering one tool.
Can I fix an item that's already too expensive?
Not really — the penalty is stored on the item and only grows. Grindstoning it strips the enchantments without clearing the penalty. Starting from a fresh tool is usually cheaper than any workaround.
Does this work for Bedrock Edition?
The combining order logic still helps, but Bedrock differs in several places — including how renaming and the level cap behave. These numbers follow Java Edition mechanics.