Can you still enchant when it says too expensive

I've seen a few posts on here where people show images of them in an anvil trying to repair their stuff and it says too expensive preventing them from doing so.

I've gone through the wiki page on this and compiled the relevant information here to help people who don't want to go through all of that.


The Main Stuff

Maximum Cost

If the cost of your anvil combination is 40 or more, it will just say "Too Expensive" and won't let you do it.

Prior Work Cost

The more times an item has been repaired or enchanted within an anvil, the more it will cost to repair or enchant later.

When an item is taken out of the final slot in an anvil, it's remembers that it was put through an anvil. It will remember its number of anvil uses as the largest number of anvil uses amongst the two parent items (the items you combined) + 1. This diagram should help explain it. The book has the larger number of anvil uses and so the resultant sword takes the book's number and adds 1 to it.

This cost is equal to 2Number of anvil uses - 1 and gets quite large very quickly. It's the main reason why stuff with little or no enchants on it can become "Too Expensive" to repair. So if you've gotten your diamond pickaxe and repaired it with spare diamonds (or another diamond pickaxe) 5 separate times. It's going to cost an extra 31 levels to repair it or enchant it.

This makes Mending a necessity if you wanna keep your god tools. As repairing them too many times puts that cost above 40 and makes them unrepairable.

This cost also stacks up when combining books. If you've combined a bunch of Sharpness 1 books together to make a Sharpness 5 book. That final book is gonna have at least 4 anvil uses stored in it meaning that slapping it onto a sword is gonna cost an extra 15 levels.

If you wanna make god gear, combine your tools with books (or other tools to keep the number of anvil uses on every piece as low as possible.

You've gotta be efficient when doing this. To do this, only combine 2 things if they have the same number of anvil uses. You should end up with a tree-like way of combining stuff. For example, if you were trying to make a god-sword with 7 enchantments on it, you'd do it like this, this means that the final sword only has 3 anvil uses in it. So it'll only cost an extra 7 levels to repair it (this cost is gonna go up each time you repair it though). Don't enchant your sword like this. Already, we're at 4 anvil uses and we've only added 4 enchantments, you're gonna get 5 or 6 enchants on there and then it'll say "Too Expensive".

It's also good for your books to be at the highest level they can be from the get-go. This can be accomplished for all enchantments using villagers or by finding them in dungeons, strongholds etc. Farming villagers can be some trouble though, so try to get all of your base enchantments out in a row and use the 'tree' method to get the sword up to max with the lowest cost.


The Details (For Nerds)

Total Cost

The XP cost of doing anything in an anvil is equal to the sum of:

  • The prior work cost of the first item

  • The prior work cost of the second item

  • The naming cost

  • The repair cost

  • The enchantments cost

Prior Work Cost

The costs of both items are added to the total cost. This means that if you've got a sword with a prior work cost of 7 and a book with a prior work cost of 3, it will become a total of 10 levels that are added to the total cost.

Naming Cost

If you are naming something, it will cost 1 extra level. This only applies if you are naming it, not if it's already been named. Since you can name stuff and repair/enchant at the same time, it's more level efficient to name it during a repair/enchant use. If you name it by itself without doing anything else, it will still apply the prior work cost (but the named item won't have an incremented number of anvil uses) and use up an extra 15 levels or whatever the number is for that piece of gear.

Repair Cost

If you are repairing the item on the left, it will cost 2 extra levels.

Enchantments Cost

This is the complex bit.

A few clarifications

  • The enchantments of the item you are adding the enchantments to don't matter. The enchantment cost will be the same when you add Mending to an unenchanted pickaxe and when you add Mending to your otherwise god pickaxe.

  • The other enchantments on the book/item you are sacrificing don't matter. Adding an Efficiency 5, Fortune 3 book is the same as adding an Efficiency 5 book and then a Fortune 3 book. Doing the latter, however, will require you to use an anvil 2 times, adding the prior-work cost for both uses and incrementing the number of anvil uses of the pickaxe by an extra 1.

Now, the wiki has a table with the info for every enchantment. And says the same stuff I'm gonna say here.

The game ignores about enchantments that cannot be put on that item. So efficiency on a sword isn't included in the cost and fortune on a chestplate isn't included in the cost.

For Java Edition:

  • Each enchantment on the second item that clashes with an enchantment already on the first item (like adding Fortune from a book onto a Silk Touch pickaxe) adds 1 to the cost even though the enchantment doesn't get put on.

  • For the enchantments that were on the second item and can be put on the first (including duplicates like Fortune 3 on Fortune 3), look at the final levels on the output item. Multiply that level by the 'multiplier' column of the table. That number is added to the total cost. Use the 'item' column if the second item is not a book i.e. a sword or boots. Use the 'book' column if the second item is an enchanted book.

For Bedrock Edition:

  • The game ignores enchantments that clash. It doesn't add any levels to the total cost from the fortune 3 enchanted book if the pickaxe already has silk touch and those two enchantments cant be combined.

  • For the enchantments that have been added or improved, look at the final levels on the output item. Subtract the level of that enchantment on the first item from the level on the final item. So if you have a sword with sharpness 4 on it and combine it with a book with sharpness 4 on it, the final item will have sharpness 5, this means the game cares about the increase of 1 level for it. Multiply this number by the 'multiplier' column of the table. That number is added to the total cost. Use the 'item' column if the second item is not a book i.e. a sword or boots. Use the 'book' column if the second item is an enchanted book.


TL;DR

The more you repair or combine enchantments on your gear, the higher the cost is to do it again.
Don't add books to a tool 1 by 1, add them in a tree manner.
Get Mending on your stuff as quick as you can.


It seems a little complicated and I'm not the best at explaining stuff but feel free to ask me for clarification on anything or how much any sort of combination would cost (remember to include the number of anvil-uses each item has) and I'll try and answer. I still reply to chat requests as of December 2021. When doing this, also try and see how much it costs to rename the books or any items you're enchanting, that'll help us work out where exactly where the problem comes from. Most likely, the prior work cost is abnormally high because you combined a bunch of books somewhere along the way.

EDIT: This is like 8 months late but it's pretty important. If you disenchant your item using a grindstone. It will go back to 0 anvil uses. If you've screwed up, just disenchant it using a grindstone and you can restart.