Skip to content
MC Calc

Villager trade prices explained: demand, reputation and Hero of the Village

Why villager prices go up and down, the exact Java formula behind every trade, and how to get enchanted books and diamond gear for 1 emerald.

Java Edition5 min read

A villager’s price tag isn’t fixed. The same librarian can ask 30 emeralds for a book on Monday, 64 after you buy it out twice, and 1 after a raid. All of that comes from one formula with four inputs. Knowing it tells you which trades are worth fixing, which discounts are worth chasing and why hitting a villager is a terrible idea.

The formula

Every trade has a base price (the first item in the trade window) and a price multiplier. The game then applies, in Java Edition:

price = base + demand bonus − reputation discount − Hero of the Village discount

The result is clamped between 1 and a full stack, so no trade ever becomes free or costs more than 64 emeralds. The multiplier is 0.2 for armor, enchanted books, enchanted tools and fishing rods, explorer maps, saddles and leather horse armor, and 0.05 for everything else, including all the trades where the villager buys items from you. It decides how strongly demand and reputation move the price.

Demand: why prices climb

Each trade tracks a demand value. When the villager restocks (up to twice a day at its job site), demand rises by the number of times you used the trade and falls by the number of uses you left unbought. While demand is positive the price rises by:

demand bonus = ⌊base × demand × multiplier⌋
Worked example

Buying a farmer out

A farmer buys 20 wheat for an emerald, up to 16 times between restocks. Buy all 16 and demand goes to 16 at the next restock: ⌊20 × 16 × 0.05⌋ = 16 extra wheat, so the trade now costs 36 wheat. Leave it unused for a restock and demand falls back by 16; it never pushes prices below the base.

The same demand of 2 on a 9-emerald iron chestplate (multiplier 0.2) adds ⌊9 × 2 × 0.2⌋ = 3 emeralds. The higher multiplier is why gear prices react faster than crop trades.

The practical rule: if a trade matters to you, spread it across several villagers instead of draining one, or accept the bump and let it settle over a few restocks.

Reputation: gossip with a price tag

Villagers remember what you did to them as “gossip”, and different kinds of gossip are weighted differently:

GossipWeightCapHow you get it
Major positive+520Curing the villager from a zombie villager (+20)
Minor positive+1200Curing (+25)
Trading+125Trading with the villager
Minor negative−1200Hitting the villager (+25 per hit)
Major negative−5100Killing a villager near it (+25)

Add them up with their weights and you have your reputation with that villager. The price changes by ⌊reputation × multiplier⌋. Curing gives 5 × 20 + 25 = 125: 6 items off a 0.05 trade and 25 emeralds off a 0.2 trade. Trading reputation tops out at 25, worth just 1 item on a 0.05 trade and 5 emeralds on a 0.2 trade.

Negative reputation works in reverse, and because the game rounds down, small penalties round up in the villager’s favour. A single accidental hit gives −25 reputation: ⌊−25 × 0.05⌋ = −2, so wheat costs 22 instead of 20, and ⌊−25 × 0.2⌋ = −5 adds five emeralds to every book. Bedrock Edition ignores negative reputation for prices.

Hero of the Village

Winning a raid gives Hero of the Village, whose level matches the raid’s Omen level. It takes a share of the base price off every trade, ignoring the multiplier: 30% at level I, plus 6.25% per extra level, up to 55% at level V. The discount is rounded down but never less than one item.

Trade (base)Hero IHero IIIHero V
Bookshelf (9 emeralds)765
Enchanted book (30 emeralds)211814
Wheat (20 per emerald)14129
Worked example

Getting a book down to 1 emerald

A librarian offers an enchanted book for 30 emeralds (multiplier 0.2). You cured it and you have Hero of the Village V.

  1. Demand: 0, nothing added.
  2. Reputation 125 × 0.2 = 25 off → 5.
  3. Hero V: ⌊30 × 0.55⌋ = 16 off → −11.
  4. Clamped to the minimum: 1 emerald. The discounts have 11 emeralds of headroom, so even a demand of 5 (+30) would only bring it to 19.

Without the cure, Hero V alone gives 30 − 16 = 14 emeralds. Without Hero, the cure alone gives 5.

Curing is permanent and only counts for the player who cured; Hero of the Village wears off. Do your big shopping while the effect is on, and rely on cured villagers the rest of the time.

Reading prices in the trade window

When a discount applies, the trade window shows the original price struck through next to the new one. A price higher than you remember, with no strike-through, is demand or negative reputation. If you can’t tell which, enter the numbers into the Villager Trading Price Calculator: it shows the base, the demand bonus, the reputation and the Hero discount as separate lines.

Villager Trading Price CalculatorTry any trade with curing, Hero of the Village, reputation and demand.
All guides →