Understanding the item enhancement expected cost calculator — concept and principle
Many RPGs and MMOs let you upgrade gear with a chance of success on each try, often with a cost per attempt and sometimes a risk that a failure destroys the item. This calculator works out how many tries one enhancement level takes on average, what it is expected to cost with and without the destruction risk, and how likely you are to succeed within ten tries.
How it is calculated
Let s be the success chance and b the break chance on a failure, both as decimals.
- Expected tries = 1 ÷ s.
- Expected cost (no breaking) = cost per try ÷ s.
- Expected cost including breaks = (cost per try + (1 − s) × b × replacement cost) ÷ s.
- Chance within 10 tries = 1 − (1 − s)¹⁰.
The principle
Repeating a try until the first success is a geometric process: the average number of tries is the reciprocal of the success chance. Every try costs the same, so the expected cost is that cost multiplied by the expected tries. Destruction adds an extra expected loss per try: a try fails with probability (1 − s), and a failure breaks the item with probability b, so each try carries an average replacement cost of (1 − s) × b × replacement value. The model assumes you replace the item and keep trying at the same level.
Worked example
- Inputs: 30% success chance, 1,000 per try, 0% break chance, replacement cost 50,000.
- Expected tries = 1 ÷ 0.30 = 3.33 (3.333333333).
- Expected cost = 1,000 ÷ 0.30 = 3,333.33.
- With a 0% break chance the cost including breaks is also 3,333.33.
- Chance within 10 tries = 1 − 0.7¹⁰ ≈ 97.18%.
| Success chance per try (%) | Expected tries per success |
|---|---|
| 7.5 | 13.33333333 |
| 15 | 6.666666667 |
| 22.5 | 4.444444444 |
| 30 | 3.333333333 |
| 37.5 | 2.666666667 |
| 45 | 2.222222222 |
| 60 | 1.666666667 |
How to read the result
Destruction risk dominates quickly. With the same inputs and a 10% break chance, the expected cost becomes (1,000 + 0.7 × 0.1 × 50,000) ÷ 0.3 = 15,000, four and a half times the safe value. Compare the expected cost with the market price of an already-enhanced item; if buying is cheaper, enhancing yourself is the worse deal on average. The ten-try figure shows the risk of a long streak: about 2.8% of players still fail after ten tries here.
Common mistakes
- Expecting success by try 4 because 1 ÷ 0.3 ≈ 3.3; one in four players needs more than four tries.
- Applying this one-level result to a whole chain of levels without adding each level separately.
- Ignoring level drops on failure, protection items or pity systems, which the model does not include.
Frequently asked questions
How do I estimate the cost of going from +0 to +10?
Calculate each level with its own chance and cost and add the expected costs. With downgrade rules the total is higher and needs a Markov chain model.
Why is the median lower than the average?
The geometric distribution has a long tail; a few very unlucky runs pull the mean above the typical outcome.
Sources: Sheldon M. Ross, A First Course in Probability (geometric distribution and expectation) · J. R. Norris, Markov Chains, Cambridge University Press