What triggers 'Too Expensive'
The anvil adds up: the enchantment costs of everything being applied, plus the prior work penalty of both items (2^penalty - 1 each). If the total exceeds 39 levels, the operation is blocked. Because penalties grow exponentially (1, 3, 7, 15, 31...), a heavily-worked item crosses the cap suddenly - often on the final, most important enchant.
The fixes, ranked
- Plan the order first: merging books with each other before touching the item keeps the item's penalty at 1-2 uses.
- Use fresh, never-anviled books and gear for god items - an item that already has anvil history brings its penalty with it.
- Get max-level books directly from librarian villagers instead of combining low-level books (fewer anvil steps).
- On an old item that is already 'Too Expensive': there is no undo in survival - the practical fix is a new item, enchanted in the right order.
What does NOT work
- Grinding more XP: the cap is on levels per operation, not on your balance.
- Switching to Bedrock/creative tricks in survival: the 39-level cap is enforced in Java survival regardless of XP.
- Adding enchantments in multiple anvil passes 'later': every pass adds penalty - postponing makes it worse.
Plan first, enchant once
The whole point of an enchantment calculator is to make 'Too Expensive' impossible: tick your enchantments, and the solver returns an order where every step stays under the cap - usually with the item touched only once or twice. If the solver says no solution exists, the set itself is impossible (too many heavy enchantments) and no order would work.