Torch & Anvil

How the enchanting table actually works

Verified: Java 26.2 · 2026-09-01 · table mechanics; the anvil side lives in its own guide · target odds: Java 26.3 data files read 2026-10-29 · Updated 2026-10-30

The enchanting table is the half of the enchanting system people think they understand: thirty levels, pick the bottom slot, hope. The real machinery is more specific: a bookshelf count with a hard ceiling, three slots priced by formula, a bill that is far smaller than the number on the label, and offers that hold still until you spend on one. This guide covers the table; combining what it gives you is the anvil mechanics guide's job.

Fifteen shelves, level thirty, and not one shelf more

Bookshelves feed the table power, and the ceiling is exact: fifteen active shelves reach the maximum, and further bookshelves are ignored. At full power the bottom slot's requirement reaches level 30, the famous number, and it cannot be pushed higher. The geometry is exact too: a shelf counts when it sits two blocks from the table along one horizontal axis, up to two along the other, at the table's height or one block above, with the gap between shelf and table at shelf height kept open; air works, as do a handful of low blocks the game tags as power-transmitting, like snow layers and short grass. A carpet in the wrong spot silences a shelf, which is why "my table only offers 27" is almost always a decoration bug.

The three slots, by formula

Under the hood the table rolls a base value once per opening (driven by the shelf count plus randomness, topping out at 30 with fifteen shelves), and derives the three slots from it: the top slot asks about a third of the base (never less than 1), the middle about two thirds plus one, and the bottom slot the full base value, floored at twice the shelf count. That is why the bottom slot at a full table pins to exactly 30 while the top slot wobbles in the single digits: at maximum power the top asks 10 at most. If the middle slot ever looks oddly close to the bottom one, that is the formula, not a lucky table.

The number on the slot is a gate, not a price

This is the fact that changes how the table feels to use. Each slot's green number is the level you must have to click it, but the deduction is flat: the top slot takes 1 level and 1 lapis lazuli, the middle 2 and 2, the bottom 3 and 3. Enchant at the bottom slot while sitting at level 30 and you walk away at level 27, not zero. Thirty levels is the entry ticket; three levels is the fare. The practical consequence: once you are past 30, enchanting repeatedly is cheap; the expensive part of the loop is climbing to 30 the first time, which the XP calculator prices at 1,395 points from zero.

When the offers change, and when they refuse to

The three offers for a given item are not a fresh roll every time you look. They come from a hidden per-player seed, so closing the screen, reopening it, or walking to an identically shelved table shows you the same three choices for that item. The seed regenerates when you actually enchant something: that is the reroll, and it costs whatever you enchanted. The honest strategy that falls out: if none of the three offers on your sword is worth having, enchant something cheap (a book at the 1-level top slot spends a single level and one lapis), and the board resets. What the table never offers is certainty: the slot label names one enchantment, and extras ride along at random. A table cannot be aimed, only rerolled.

What a target enchantment costs at the table

The odds below are computed exactly, not sampled, for a full table: fifteen shelves, bottom slot at level 30, Java Edition. The inputs are the Java 26.3 server's own files, read on 2026-10-29: each enchantment's weight, level windows and conflicts from the data pack's enchantment files, the list the table deals from (its in_enchanting_table tag, which leaves out Curse of Binding, Frost Walker, Mending, Soul Speed, Swift Sneak, Curse of Vanishing and Wind Burst), and each item's enchantability from the item report the game's data generator writes. The selection steps are the documented ones: a randomised level (the slot level plus 1, plus two draws up to a quarter of the enchantability, then up to 15% either way), each enchantment the item can take offered at the highest level whose window fits, one picked by weight, another with a chance of (level + 1) in 50 while the level halves, and the slot's hint naming one enchantment of the result at random. We did not read the game's code for those steps. As a check, the computation reproduces all 48 figures minecraftmaps.com's exact-odds calculator prints for these five items at level 30.

TargetItemOn the itemNamed by the hint
Efficiency IVDiamond Pickaxe68.9%38.2%
Fortune IIIDiamond Pickaxe19.4%9.0%
Silk TouchDiamond Pickaxe16.1%7.6%
Sharpness IVDiamond Sword16.4%8.8%
Looting IIIDiamond Sword9.6%4.4%
Protection IVDiamond Chestplate22.5%12.7%
Power IVBow44.3%24.8%
Fortune IIIGolden Pickaxe30.5%13.6%

The reroll strategy this page recommends prices out simply. Watch the bottom slot's hint. If it names the target, enchant: 3 levels and 3 lapis. If it does not, enchant a book in the top slot for 1 level and 1 lapis, which changes the seed, and look again. With p the hint column, the expected bill is 3 + (1 − p)/p levels and the same number of lapis, and every reroll leaves an enchanted book behind.

Target, itemExpected rerollsExpected levels (and lapis)Rerolls that cover 9 runs in 10
Efficiency IV, diamond pickaxe1.64.64
Fortune III, diamond pickaxe10.113.124
Silk Touch, diamond pickaxe12.115.128
Sharpness IV, diamond sword10.413.425
Looting III, diamond sword22.025.051
Protection IV, diamond chestplate6.99.917
Power IV, bow3.06.08
Fortune III, golden pickaxe6.39.315

What the numbers say:

Table first, anvil second

The two halves of the system reward opposite instincts. The table is a slot machine with good odds at level 30: cheap pulls, no control. The anvil is a pricing engine with total control and a cost that depends brutally on order. So the working pattern for finished gear is: pull books from the table's cheap slots and big pulls from the bottom slot, then let the enchantment optimizer find the cheapest order to combine the exact set you want. Chasing one specific enchantment at the table has a price you can read off the target-cost table: from 4.6 levels on average for Efficiency IV on a diamond pickaxe to 25.0 for Looting III on a diamond sword.

Limits

This page states Java's documented mechanics; Bedrock's table behaves similarly at the headline level but this site has not verified its slot internals, so no parity claim is made: the edition ledger tracks what we have and have not checked. The target-cost section covers Java only, the bottom slot at fifteen shelves, and the hint-watching strategy; the top and middle slots and Bedrock's own selection rules are not computed here, and nothing here helps with enchantments the table simply does not deal in.

Sources

Shelf ceiling, placement geometry, slot formulas, and seed behavior: the Minecraft Wiki's enchanting mechanics documentation (minecraft.wiki/w/Enchanting_table_mechanics). The level-30 maximum at fifteen shelves and the flat 1/2/3 cost: the wiki's enchantment page (minecraft.wiki/w/Enchantment), which also records the level-30 slot deducting 3 levels and 3 lapis, the gate-versus-price distinction this whole page turns on. Verified 2026-09-01 against Java 26.2.

Target odds and reroll costs (2026-10-29): the Java 26.3 server jar named by Mojang's launcher manifest (SHA-1 checked, SHA-256 d052f14d7a17…), read for its enchantment files, its enchantment and item tags, and the item report its data generator writes; the selection steps and the cross-check from minecraftmaps.com's enchanting table calculator, whose 48 printed figures for these five items this computation matches. Every number printed here is asserted in this site's test suite.