AnvilCalc
Minimum Prior Work: How Few Anvil Uses Can Your Enchanted Item Have?

Guides / Enchanting Strategy / Minimum Prior Work: How Few Anvil Uses Can Your Enchanted Item Have?

Minimum Prior Work: How Few Anvil Uses Can Your Enchanted Item Have?

Every anvil operation adds one to an item's prior work, and every later operation on that item pays for it. So the best finished item is not only the cheapest one today, it is also the one with the least prior work on it. This guide answers one question: how low can the prior work of the finished item go, given how many enchantments have to come from books? The answer is a short formula, and one kind of book that beats it.

What prior work is, in one minute

Each time an item or book goes through an anvil, its anvil use count (its prior work) goes up. The result of a combine gets max(left, right) + 1: the higher of the two inputs' counts, plus one for this operation. The penalty added to the next operation grows as 2^c − 1 levels, which is 0, 1, 3, 7, 15, 31 for a count of 0, 1, 2, 3, 4, 5 (see the anvil mechanics on the Minecraft Wiki). A single operation that would cost 40 levels or more is refused ("Too Expensive!"). The full background is in Enchanting Strategy and Why Does My Anvil Say Too Expensive.

Because the result takes the higher count plus one, not the sum, the order of combines matters: combining two fresh books with each other costs only a small penalty and gives a count of 1, while adding them to the same item one after another stacks the count on the item itself.

The minimum: ceil(log2(n + 1))

Start with a fresh item (prior work 0) and put each of the n enchantments on its own fresh single-enchantment book (prior work 0). You now have n + 1 things to merge into one: the item and its n books. Draw the merges as a tree: the item and the books are the leaves, every anvil operation joins two branches, and the prior work of the result is the depth of the tree (the longest chain of operations on the way to the finished item). A balanced tree is as shallow as a tree with that many leaves can be, so the lowest possible prior work is:

minimum prior work = ceil(log2(n + 1))

Enchantments from single-enchantment books (n)Minimum prior work of the finished item
11
2 to 32
4 to 73
8 to 154
16 to 315

Each extra level of depth doubles how many enchantments fit, which is why the prior work grows so slowly. Adding a fourth enchantment moves you from 2 to 3, but you can go all the way to seven before it becomes 4.

This is not just theory. We ran the calculator's own solver in Min prior work mode for n = 1 to 8 enchantments on a fresh helmet, with every enchantment on a fresh single-enchantment book. It returned a result prior work of 1, 2, 2, 3, 3, 3, 3, 4, exactly ceil(log2(n + 1)), on both Java Edition 1.21.11 and Bedrock Edition 1.19.1. (The rows from 16 up follow from the same tree argument; no vanilla item takes that many enchantments.)

Worked example: a pickaxe

On Java Edition 1.21.11, a fresh diamond pickaxe with Efficiency V, Unbreaking III and Fortune III, every book fresh and single-enchantment:

ModeTotal XPResult prior work
Min XP183
Min prior work192

Three enchantments give a minimum of ceil(log2(4)) = 2. Min XP finds a plan that is one level cheaper now but leaves the pickaxe at prior work 3; Min prior work spends one extra level to finish at prior work 2, so every later upgrade (adding Mending, say) starts from a cheaper base.

With a fourth enchantment, Mending, both modes give the same answer: 23 XP and prior work 3. Four enchantments need depth 3 whichever way you order them.

Why one big all-enchantments book does not help

It is tempting to merge all the books into one finished book first and apply it to the item once. It does not lower the count. Merging four single-enchantment books into one takes two rounds of combines (count 2), and applying that book to the item is one more operation (count 3). That is the same depth 3 as the balanced tree for four enchantments, because the item is just one more leaf. A book built this way is also not free of prior work: it carries the count of every merge that made it, which is the subject of the next section.

Books with several enchantments beat the formula

The formula assumes every book carries one enchantment. A book that already carries several enchantments and has prior work 0 lets you merge them all in a single operation. It is one leaf instead of several, so fewer combine levels are needed.

A concrete pair, again on a fresh diamond pickaxe wanting Efficiency V, Unbreaking III, Fortune III and Mending (Java Edition 1.21.11, the other books assumed fresh and single-enchantment):

Your Efficiency V + Unbreaking III bookTotal XPResult prior work
None (four single-enchantment books)233
One book with both, prior work 0 (a fished or looted book, say)202
The same two enchantments, but the book is "combined 1x"213

The first row is the four-enchantment baseline. The second row replaces two leaves with one and drops the finished pickaxe to prior work 2, for fewer levels as well. The third row has the same enchantments on a book that was itself built by combining two single-enchantment books on an anvil: it already carries a count of 1, so the lower minimum is out of reach, and the plan lands back at prior work 3. In the calculator's inventory such a book is shown with a "combined 1×" badge.

So the rule of thumb: a multi-enchantment book helps only while it is fresh. The moment you build it yourself by combining books, you have paid the prior work you were trying to avoid.

Where books come from, and whether they carry several enchantments

This is what the Minecraft Wiki says for each source (checked against the wiki on 2026-10-23, Java Edition unless marked):

  • Villager trades. A librarian's enchanted-book offer picks one random enchantment, then a random level. So a traded book carries a single enchantment. You can buy as many as you like, and the wiki's trade description gives a traded book no prior work, so for this guide it counts as a fresh single-enchantment book.
  • Enchanting table. Books get a reduced chance of several enchantments: if several would be added to a book, one is removed at random. A table book therefore has a reduced chance of carrying several enchantments. Treasure enchantments such as Mending cannot come from the table.
  • Fishing. A fished enchanted book has the equivalent of a level 30 enchantment from the table, but with treasure enchantments available and the chance of multiple enchantments not reduced. This is the most reliable multi-enchantment source, at about a 0.8% chance of an enchanted book per catch (see Enchanted Books From Fishing for the odds and worked examples).
  • Chest loot. It depends on the loot table. The wiki lists several kinds of loot book, including level 30 books and random-enchantment books, and which chest has which varies. We do not state a general rule here: read the book's tooltip.

Whatever the source, a book you did not combine yourself has prior work 0. Open the book's tooltip, count its enchantments, and enter exactly what it holds.

Getting these plans in the calculator

  1. Pick your item and your target enchantments in the calculator, as in Using the Calculator.
  2. Set the Min XP / Min prior work control above the plan to Min prior work. It finds the plan whose finished item has the fewest anvil operations on it and, among those, the cheapest in XP. The plan is labelled with the mode and the result, for example "Mode: Min prior work · result prior work: 2". The shared link and the copied image keep the mode.
  3. Decide what the plan may use with the Inventory usage control: Don't use assumes every book is obtainable, May use uses your inventory when it helps (this is the default once your inventory holds something relevant to the item), and Only use restricts the plan to what you own.
  4. To model a multi-enchantment book, add it to an inventory with all its enchantments. Leave "Already combined on an anvil before" off for a fished or looted book (prior work 0) and turn it on, with the count, for a book you built yourself.

Compare the two modes on the same build to see what a lower prior work costs you today. Often both give the same plan; when they differ, Min prior work typically combines books with each other first. For how to read the steps, see How to Use an Anvil. To plan the books themselves, see Enchanting Strategy.

Open the calculator →

Frequently asked questions

What is the minimum prior work of an item with several enchantments?

With a fresh item and every enchantment on its own fresh single-enchantment book, the minimum is ceil(log2(n + 1)) for n enchantments: 1 for one enchantment, 2 for two or three, 3 for four to seven, 4 for eight to fifteen. The item and the books are the leaves of a combine tree, and the prior work is the depth of the tree.

Can I build one book with every enchantment and apply it once?

You can, but it does not lower the prior work. Merging four single-enchantment books into one book takes two rounds of combines, and applying that book to the item is a third operation, so the item ends at prior work 3, the same as the balanced plan for four enchantments. The only books that help are ones that already carry several enchantments and have prior work 0, such as a fished book.

Why is my prior work 3 and not 2?

Prior work is the depth of the combine tree, so four to seven separate enchantments cannot finish below 3. You can get 2 only with at most three enchantments from single-enchantment books, or with books that already hold several enchantments at prior work 0. A book that you built by combining carries its own count, which can also push the item to 3.

Does renaming add prior work?

No. According to the Minecraft Wiki, renaming alone does not add to an item's prior work, but it costs one extra level and pays the penalty of the prior work the item already has. It is cheapest to rename before or while you enchant. In the calculator the rename is bundled into a step that has room for it.

Do books from villagers carry prior work?

No. A librarian's book is a fresh enchanted book with one random enchantment at a random level, and the wiki gives it no prior work, so it counts as prior work 0. You can also buy more copies, which makes villager books the easy way to supply single-enchantment leaves.

Which books can carry more than one enchantment?

Fished books are the clearest case: they get a level 30 style roll with treasure enchantments and the chance of multiple enchantments is not reduced. Enchanting table books have a reduced chance of several: if several would be added, one is removed at random. Villager books carry exactly one. Chest loot varies by loot table, so read the book's tooltip.

When should I choose Min prior work instead of Min XP?

Choose Min prior work for gear you will keep upgrading, such as netherite armor or a long-term pickaxe, because every extra operation doubles the penalty of every later combine. Choose Min XP when you just want the item finished as cheaply as possible today. For many builds both modes give the same plan.