Each cell is the result of a cost-balanced battle simulation between two unit types — not a 1-vs-1 duel, but player vs player where both have spent the same amount of resources.
Both sides get the same budget. Number of units = budget ÷ unit cost. Cost is by default raw total resources (food + wood + gold treated equally). Turn on “gold-weighted” to count gold ×1.4 (gold is scarcer) — this changes the unit counts per side and therefore some cells.
Damage per hit = base damage × volley − armour (melee subtracts melee armour, ranged subtracts ranged armour), plus bonus damage vs armour class (e.g. spear +28 vs cavalry). Volleys/bursts are counted (e.g. Zhuge Nu fires 3 bolts). DPS = damage ÷ attack time. Charge attacks are excluded (one-off, not sustained).
Ranged units are assumed to kite optimally, with a smooth effect based on both speed and range, both against melee and against other ranged units with shorter range.
clamp(0.25 − 1.6 × [(shooter speed − melee speed) + 0.07 × (range − 5)], 0.12–0.9). So a Longbowman (range 7) kites Spearmen even though it is slower; a Handcannoneer (short range, slow) gets run down by cavalry.clamp(0.85 − [0.24 × range gap + speed diff], 0.15–0.95). A Longbowman (7) kites a Zhuge Nu (4.5) and wins clearly — but a small gap (Archer 5 vs Zhuge 4.5) is not enough, so the Zhuge Nu's volley DPS wins there.High ranged armour still neutralises the shooter (e.g. Archer vs Man-at-Arms). Note: fast, short-range mounted archers (Mangudai / Horse Archer) may be somewhat under-rated vs foot archers, because the model weights range more than mobility in ranged-vs-ranged.
The fight is simulated in time steps with focus fire (damage is concentrated on the front unit until it dies) — this is where the “more cheap units” advantage (the square-law effect) emerges naturally. For melee there is an engagement width: only a front line can attack at a time, so numeric superiority for melee is dampened realistically. Ranged units have no such limit.
After the fight, we measure how lopsided the resource trade was (log2 of value destroyed one way divided by the other). Thresholds: clear advantage/outmatched (±±) when the trade is ≻3× skewed; advantage/disadvantage (±) for moderate skew; even when it is close.
Healing, splash beyond volley, transformations, terrain, formation, line of sight, and blacksmith/technology upgrades. Signature units are civ-locked — the matrix compares unit types across civilizations, not actual civ-vs-civ battles. This is a model to guide intuition, not ground truth.
Source: AoE4World open unit data (data.aoe4world.com; age 4 for the matrix, all ages in the unit panel). The page recomputes everything locally each time it loads or you change a setting.