Deep DiveAnvilCalc

AnvilCalc's Min prior work mode: planning the anvil for upgrades later

On October 23, 2026, AnvilCalc gained a second way to plan an anvil build. The calculator has always looked for the cheapest combine order in XP levels. The new Min prior work mode instead looks for the plan that leaves the finished item with the fewest anvil operations on it, and only then picks the cheapest of those in XP.

A fantasy blacksmith at an anvil with enchanted books and a pickaxe

Why the number of operations matters

In Minecraft, every time an item or book goes through an anvil its anvil use count, called prior work, goes up. The result of a combine gets the higher of the two inputs’ counts plus one, and the penalty added to the next operation on it grows as 2^n − 1 levels: 0, 1, 3, 7, 15, 31 for counts of 0 to 5. An operation that would cost 40 levels or more is refused as “Too Expensive!”, so 39 levels is the most any single step can cost.

That means the cheapest plan today is not always the best plan for an item you will keep upgrading. Every operation left on the finished item makes each later combine more expensive.

What the new mode does

The calculator now has a Min XP / Min prior work selector above the plan. Min XP is the original behaviour and is unchanged. Min prior work finds the lowest prior work the finished item can end with, then the cheapest plan in XP among those. The plan header names the mode and the result, for example “Mode: Min prior work · result prior work: 2”, and the copied image and shared link keep the mode. The choice is remembered in your browser.

The search has a time budget of about two seconds. If it runs out, AnvilCalc returns the best plan it found, which in that case is not guaranteed to be optimal. The same mode is available to AI agents through the objective option of the anvil_migration_path tool on AnvilCalc’s MCP server.

A worked example: a pickaxe

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

Mode Total XP Result prior work
Min XP 18 3
Min prior work 19 2

Min prior work spends one extra level now to finish at prior work 2. Add Mending as a fourth enchantment and both modes give the same plan: 23 XP and prior work 3.

AnvilCalc’s plan for the pickaxe in Min prior work mode, with the mode selector and the first step

The plan above is that example in the calculator: the selector set to Min prior work, the total of 19 XP levels, and the first step, which merges two books before they touch the pickaxe.

How low can it go

With a fresh item and every enchantment on its own fresh book, the lowest possible prior work for n enchantments is the ceiling of log2(n + 1): 1 for one enchantment, 2 for two or three, 3 for four to seven, 4 for eight to fifteen. The calculator’s own solver reproduces this for one to eight enchantments on both Java 1.21.11 and Bedrock 1.19.1. Books that already carry several enchantments at prior work 0, such as a fished book, can beat the formula. The full reasoning is in the minimum prior work guide, and the background on the penalty is in the enchanting strategy guide.

To try it, pick an item and enchantments in the AnvilCalc calculator and switch the selector. For many builds the two modes give the same plan; compare them on yours to see what a lower prior work costs.