Introducing AnvilCalc: the cheapest anvil order for any enchanted build, Java and Bedrock
AnvilCalc is a calculator for one specific job in Minecraft: given an item and the enchantments you want on it, find the cheapest order in which to combine books and items at the anvil. It works for both Java Edition and Bedrock Edition. This post describes what the first version, built on September 18, 2026, does.

The problem
Adding enchantments to an item looks simple, but anvil costs are not additive. Every time an item or book goes through an anvil, its prior work count goes up, and the penalty added to its next combine grows as 2^n − 1 levels: 0, 1, 3, 7, 15, 31. When two things are merged, the result keeps the higher of the two counts plus one. So the order matters. Adding four books to a sword one by one gets expensive fast, while merging some of the books with each other first can keep every step cheaper.
There is also a hard limit. A single operation that would cost 40 levels or more is refused with “Too Expensive!”, on Java, and the same 39-level ceiling per operation applies on Bedrock. A build that cannot be done in the obvious order may still be possible in another one. The enchanting strategy guide on AnvilCalc explains the penalty and the cap in more detail.
What the calculator does
You pick an edition and version, an item, and the enchantments you want. AnvilCalc searches for the cheapest sequence of anvil operations and shows it as numbered steps, each with the two things being combined, the result, and the cost in XP levels, plus the total.

The plan above is for a diamond pickaxe with Efficiency V, Unbreaking III, Fortune III and Mending on Java 26.1. The total is 23 XP levels in four steps. The first step merges two books before either touches the pickaxe.
What the solver takes into account:
- The prior-work penalty on every item and book, as described above.
- The per-step cap, so a plan never includes an operation the anvil would refuse.
- Enchantment conflicts. A conflicting enchantment does not stop a merge; it is dropped, with a small cost.
- Renaming, which costs a flat extra level and is folded into the cheapest step.
- Java and Bedrock rules. The two editions use different cost formulas, not just different data. In this first version the Java versions are 1.21.11 and 26.1, and Bedrock is 1.19.1.
Using what you already own
By default AnvilCalc assumes you can get a fresh book with a single enchantment for each enchantment you need, which is why the steps above say “freshly obtained”. If you already hold a book or item that carries some of the enchantments, you can add it to an inventory. Inventories are named, you can keep several, and they are stored in your browser rather than on a server. The calculator then uses those items instead of assuming you start from scratch.
Plans you can share and follow
The calculator is built mobile-first, with large tap targets and pills instead of dropdowns. Each step has a Mark done button so you can keep your place while you work through the anvil. Copy result copies the plan as text, and Share produces a link to a plan page. The plan is stored in the link itself, after the #, so opening it needs no account.
An MCP server for AI agents
The same engine is also available as a remote Model Context Protocol server at mcp.anvilcalc.com, public and read-only. It has two tools: anvil_combine_cost simulates a single anvil operation and returns its cost, and anvil_migration_path searches for the cheapest multi-step path from an item’s current state to a target one. The idea is that an agent can compute an exact plan instead of guessing at enchanting costs.
To try the calculator, open AnvilCalc, choose Java or Bedrock, and tap an item.
