The anvil cost formula
- E (enchantment cost): each enchantment being transferred has a rarity weight (common = 1, rare = 4); higher levels cost more than lower ones.
- P1 + P2 (prior work penalties): every item that has ever been on an anvil carries a penalty that doubles each time - this is the number that quietly kills god-gear builds.
- R (rename): adding or changing a name is a flat 1 level. Renaming during an already-planned merge is free value.
Prior work penalty table
The penalty is 2^uses - 1, so it doubles every step. This is why applying six books to a sword one at a time fails while the same six books merged pairwise first cost a fraction of that.
- 0 uses (fresh item or book) → +0
- 1 use → +1
- 2 uses → +3
- 3 uses → +7
- 4 uses → +15
- 5 uses → +31
- 6 uses → the next merge is always refused (63 > 39)
Worked example: two books onto a fresh sword
Merging Sharpness IV (common weight) with a fresh sword costs a handful of levels; the sword's penalty is still 0. Now add a second book to that same sword: the enchantment cost is the same, but the sword's prior work penalty has doubled to 1, then 3, then 7. By the sixth single-book application the sword alone contributes 31 levels - most merges now blow past 39. Merge the books into one super-book first and the sword takes a single hit: one penalty step, total often under 15 levels.
The 39-level cap and 'Too Expensive!'
In Java Survival mode any merge costing 40+ levels is refused - 39 is the hard ceiling. Survival cannot bypass it (creative mode can). The levers you control are order (pair-merge books before touching gear) and renaming (bundle it into a cheap merge). When an item is already at penalty 5, even a cheap enchantment on top of it can be refused - at that point the honest fix is a new base item.
Calculate before you spend
The calculator on the home page runs the exact same cost model across every book you select, tries the merge orders, and shows the cheapest one with a step-by-step list - so you never discover 'Too Expensive!' after paying for it. Pre-select your gear below for a tailored starting point.