calculator.onl
Categories50

Minecraft enchantment order calculator

Choose an unenchanted Java 1.21 item.

A worked example

Add an unbreaking 3 book to sharpness 5. Another book appears beside the anvil, and the total cost rises from 5 to 9 levels.

Minimum sum of levels14Number of operations3Most expensive step5Final prior-work penalty7
Game edition. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.

Item. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.

Previous anvil operations. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.

Books: code level prior-work, one per line. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels. Sword: sharpness 1–5, smite 1–5, bane_of_arthropods 1–5, looting 1–3, sweeping 1–3, fire_aspect 1–2, knockback 1–2. Pickaxe: efficiency 1–5, fortune 1–3, silk_touch 1. Helmet: protection 1–4, respiration 1–3, aqua_affinity 1, thorns 1–3. Boots: protection 1–4, feather_falling 1–4, depth_strider 1–3, frost_walker 1–2, soul_speed 1–3. Bow: power 1–5, punch 1–2, flame 1, infinity 1. Crossbow: quick_charge 1–3, multishot 1, piercing 1–4. Trident: impaling 1–5, loyalty 1–3, channeling 1, riptide 1–3. Mace: density 1–5, breach 1–4, wind_burst 1–3. Fishing rod: luck_of_the_sea 1–3, lure 1–3. Code: unbreaking 1–3, mending 1, vanishing_curse 1. Previous anvil operations: 0–5.

Updates as you type

Use a dot or comma for decimals. No thousands separators.

YOUR RESULT

Minimum sum of levels

14

Calculated from your inputs

Number of operations3
Most expensive step5
Final prior-work penalty7
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels. For a related calculation, try Minecraft Nether portal coordinate calculator.

What to enter

InputWhat it meansExample value
Game editionGame edition. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.Minecraft Java 1.21
ItemItem. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.Sword
Previous anvil operationsPrevious anvil operations. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.0
Books: code level prior-work, one per lineBooks: code level prior-work, one per line. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels. Sword: sharpness 1–5, smite 1–5, bane_of_arthropods 1–5, looting 1–3, sweeping 1–3, fire_aspect 1–2, knockback 1–2. Pickaxe: efficiency 1–5, fortune 1–3, silk_touch 1. Helmet: protection 1–4, respiration 1–3, aqua_affinity 1, thorns 1–3. Boots: protection 1–4, feather_falling 1–4, depth_strider 1–3, frost_walker 1–2, soul_speed 1–3. Bow: power 1–5, punch 1–2, flame 1, infinity 1. Crossbow: quick_charge 1–3, multishot 1, piercing 1–4. Trident: impaling 1–5, loyalty 1–3, channeling 1, riptide 1–3. Mace: density 1–5, breach 1–4, wind_burst 1–3. Fishing rod: luck_of_the_sea 1–3, lure 1–3. Code: unbreaking 1–3, mending 1, vanishing_curse 1. Previous anvil operations: 0–5.sharpness 5 0 unbreaking 3 0 mending 1 0

How the calculation works

  1. Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.
  2. Sword; sharpness 5 0; unbreaking 3 0; mending 1 0 ⇒ Minimum sum of levels: 14; Number of operations: 3.
  3. Java 1.21 reference model, not Bedrock. Minimize the sum of charged levels, not XP points. Each book has one unique enchantment already at the target level; no combining duplicate low-level books, repairs, renaming or existing enchantments. Previous-work penalties are included. Incompatible books and impossible survival-mode plans are rejected.
The formulacost(L,R) = penalty(L) + penalty(R) + Σ book_weight(e) × level(e in R); penalty′ = 2 max(penalty(L),penalty(R)) + 1; cost < 40

A worked example

Sword; sharpness 5 0; unbreaking 3 0; mending 1 0 ⇒ Minimum sum of levels: 14; Number of operations: 3.

Example you can load

What to enter
Result for this example · Minimum sum of levels14

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Java 1.21 reference model, not Bedrock. Minimize the sum of charged levels, not XP points. Each book has one unique enchantment already at the target level; no combining duplicate low-level books, repairs, renaming or existing enchantments. Previous-work penalties are included. Incompatible books and impossible survival-mode plans are rejected.

Frequently asked questions

What should I enter?

Choose an unenchanted Java 1.21 item. Enter at most eight books as code, target level and previous-work count, one per line. Use the supported-code table. The optimizer considers both book orientations and combination trees, keeping every operation below 40 levels.

How is the result calculated?

Sword; sharpness 5 0; unbreaking 3 0; mending 1 0 ⇒ Minimum sum of levels: 14; Number of operations: 3.

What does the model leave out?

Java 1.21 reference model, not Bedrock. Minimize the sum of charged levels, not XP points. Each book has one unique enchantment already at the target level; no combining duplicate low-level books, repairs, renaming or existing enchantments. Previous-work penalties are included. Incompatible books and impossible survival-mode plans are rejected.