Torch & Anvil

Chapter IV
Enchanting, brewing and beacons

Minecraft Enchantment Order Optimizer

Editions: Java (Bedrock differs — see FAQ) · Verified: Java 26.3 / Bedrock 26.50 · 2026-09-16 · Updated 2026-09-16

List the books you want on one item and get the cheapest combine order under Java anvil rules — exact step costs, prior work penalties included, and the 39-level survival cap respected. The search tries every distinct combine tree, so the plan it prints is the true optimum, not a rule of thumb.

The worked example

A fresh sword and five books — Sharpness V, Looting III, Unbreaking III, Mending, Fire Aspect II. Combined one book at a time, the penalties snowball (0, 1, 3, 7, 15) and the job costs 46 levels with a worst step of 19. The optimal plan costs 31: put Looting III on the sword first (6), merge Unbreaking III onto the Sharpness V book (3), merge Mending onto the Fire Aspect II book (2), then apply the two doubled-up books (10 and 10). Same enchantments, 15 levels cheaper, and no step above 10. Pairing the books evenly the obvious way — Looting onto the Sharpness book, Mending onto the Unbreaking book, Fire Aspect straight onto the sword, then the two pairs — costs 34. Even pairing is not the mistake, though: merge Sharpness onto the Looting book rather than the other way round and that same pairing costs 33, and six of the fifteen ways to pair these five books reach 31 outright. What sets the bill is which enchantments ride the sacrifice side, not whether the tree looks balanced. All three totals are asserted in our test suite, and the optimum is double-checked by a second, independent brute-force implementation.

How a single combine is priced (Java)

ComponentRule
Prior work, both sides2uses − 1 levels each
Each enchantment on the sacrificefinal level × multiplier
Book vs item multiplierbook is roughly half (Soul Speed 8 vs 4)
Equal levels below the maxmerge to level + 1
Survival refusalany step of 40+ levels

Model verified against the Minecraft Wiki's anvil mechanics documentation and two independent calculator references; the wiki's own worked figure — Soul Speed III by book, 12 levels — is one of our test anchors. Full mechanics in the anvil guide. Repair and renaming are out of scope here; renaming adds a flat level, repair adds more.

Questions enchanters actually ask

Why does combine order change the cost?

Two compounding reasons. Prior work penalties double with every anvil use (0, 1, 3, 7, 15, 31 levels), so a plan that keeps use counts low keeps penalties low. And every combine re-charges each enchantment on the sacrifice at its final level times its multiplier, so what rides the sacrifice side — and how often — matters. The classic five-book sword runs 46 levels combined one book at a time and 31 in the optimal order.

What does Too Expensive mean?

A survival anvil refuses any single operation costing 40 or more levels; 39 is the last workable price. The optimizer prefers plans where every step clears that bar, and when no such order exists it shows the cheapest plan anyway with the oversized steps marked.

Is the math the same on Bedrock?

No. Bedrock charges the difference between the final and initial level times the multiplier, so an enchantment that does not change costs nothing there. This tool models Java only and says so rather than averaging the two systems.

Why are books cheaper than combining two tools?

Most enchantments carry two multipliers, and the book multiplier is roughly half the item multiplier — Soul Speed costs 8 per level from an item but 4 from a book. Books also arrive with no prior work penalty, while a second enchanted tool usually brings one of its own.