How are prefixes and suffixes on magic & rare items determined? A breakdown of the in-game algorithm.
Affixes are magical properties applied to Magic (blue) or higher quality items. Prefixes appear before the item name, suffixes after it.
Cruel Long Sword of the Leech
Which affixes appear is not purely random — it follows a probability system based on item level, base type, and frequency weights.
Magic 1-2, Rare 3-6
Calculated from ilvl & qlvl
Higher freq = more common
Magic (blue) items receive 0-1 prefix + 0-1 suffix, for a minimum of 1 and maximum of 2 affixes.
| Combination | Chance | Name Example |
|---|---|---|
| Suffix only | 50% | Long Sword of the Leech |
| Prefix only | 25% | Cruel Long Sword |
| Prefix + Suffix | 25% | Cruel Long Sword of the Leech |
Only 25% of magic items get both prefix and suffix. Suffix-only items are most common at 50%.
Which affixes are eligible is determined by alvl. Higher alvl allows more powerful affixes to appear.
Step 0: Pre-adjustment
If ilvl > 99: ilvl = 99
If qlvl > ilvl: ilvl = qlvl(temporary, for calculation only)
Step 1: Check maglvl bonus
If maglvl > 0: alvl = ilvl + maglvl
※ Circlet (+3), Coronet (+8), Tiara (+13), Diadem (+18)
Step 2: Standard formula (no maglvl)
If ilvl < (99 − qlvl÷2): alvl = ilvl − qlvl÷2
Otherwise: alvl = 2 × ilvl − 99
Step 3: Clamp
alvl is clamped to 1–99 (integer math, fractions truncated)
Normal Cow (ilvl 28) + Long Sword (qlvl 20)
qlvl(20) ≤ ilvl(28), maglvl=0 → 28 < (99−10)=89 → alvl = 28 − 10 = 18
→ alvl = 18
Hell Mephisto (ilvl 87) + Diadem (qlvl 85, maglvl 18)
qlvl(85) ≤ ilvl(87), maglvl=18 → alvl = 87 + 18 = 105 → cap 99
→ alvl = 99
Hell Baal (ilvl 99) + Circlet (qlvl 24, maglvl 3)
qlvl(24) ≤ ilvl(99), maglvl=3 → alvl = 99 + 3 = 102 → cap 99
→ alvl = 99
This is why Diadems (maglvl +18) are popular for gambling and crafting — the alvl bonus of 18 dramatically increases chances for top-tier affixes at the same ilvl.
Among eligible affixes (filtered by alvl), the actual selection uses frequency weighting. Higher frequency = more common.
Selection Chance = Affix Frequency ÷ Total Frequency
Within the same group, higher-tier affixes have lower frequency. For example, in the Def% group, Sturdy (freq 9) is selected 9× more often than Godly (freq 1).
Similar affixes share a group ID. An item cannot have two affixes from the same group.
→ Only 1 of these can appear per item
→ Only 1 of these can appear per item
So "Def +30% AND Def +50%" on the same item is impossible by design. However, prefix groups and suffix groups are separate — a prefix with Def% and a suffix with flat Def can both appear.
Rare (yellow) items can have more affixes than magic items, making them potentially much more powerful.
3
affixes
25%
4
affixes
25%
5
affixes
25%
6
affixes
25%
| Property | Magic (Blue) | Rare (Yellow) |
|---|---|---|
| Total Affixes | 1–2 | 3–6 |
| Max Prefixes | 1 | 3 |
| Max Suffixes | 1 | 3 |
| Affix Pool | Magic-only | Same pool as Magic |
Rare items use the same frequency weighting, group restrictions, and alvl filtering as magic items. Only the affix count differs.
Higher ilvl = more powerful affix candidates
Items from Hell bosses (ilvl 85-99) can receive top-tier affixes. Normal difficulty items are limited to basic affixes.
Items with maglvl bonus have an advantage
Diadems (+18), Tiaras (+13) etc. gain higher alvl at the same ilvl, improving chances for high-end affixes. Especially useful for gambling and crafting.
Group restrictions make "perfect" rares extremely rare
Getting 6 affixes is already just 25%. Factor in the odds of desired groups, specific affixes within those groups, and value rolls — perfect rares are astronomically rare.
Check frequencies and conditions in the Affix Encyclopedia
Our Affix Encyclopedia lets you view frequencies, spawn levels, and applicable item types for all prefixes and suffixes.