Attack Rolls and Armor Class Rules

The attack roll and Armor Class (AC) system forms the mechanical core of combat resolution in Dungeons & Dragons, determining whether a physical or magical strike connects with its intended target. This page covers the structure of attack rolls, the components that modify them, how AC is calculated across character builds, and the decision points that arise in edge cases — from cover and conditions to the interaction between ranged attacks and melee threat ranges. These mechanics appear across the D&D core rules overview and are referenced in nearly every combat encounter a table will run.

Definition and scope

An attack roll is a d20 roll made by an attacker to determine whether an action — typically a weapon strike or an attack-based spell — overcomes a target's defenses. The result of the roll is compared against the target's Armor Class, a static number representing how difficult that creature or character is to hit. If the roll meets or exceeds the AC, the attack lands and the attacker proceeds to a damage roll. If the roll falls below the AC, the attack misses with no effect on hit points.

Armor Class is not a single-source value. It aggregates from equipped armor, shields, Dexterity modifiers, class features, spell effects, and magical items. A character wearing no armor calculates base AC as 10 plus their Dexterity modifier. A fighter in plate armor has a base AC of 18 before any additional bonuses from a shield (+2) or the Shield of Faith spell (+2), which could push effective AC to 22 — a number that makes hitting that character statistically difficult for low-level attackers.

The scope of these rules covers all attack types defined in the fifth edition ruleset: melee weapon attacks, ranged weapon attacks, melee spell attacks, and ranged spell attacks. Each follows the same fundamental resolution structure, though the modifiers applied differ by attack type and the attacking character's stat block.

How it works

Attack rolls use a structured formula:

  1. Roll 1d20 — the base randomization element
  2. Add the relevant ability modifier — Strength for most melee attacks, Dexterity for finesse or ranged weapons, the spellcasting ability modifier for spell attacks
  3. Add proficiency bonus — applied only when the attacker is proficient with the weapon or spell type; at character level 1, this is +2, scaling to +6 at level 17
  4. Add any additional bonuses or penalties — magical weapon bonuses (e.g., +1, +2, +3), the Archery fighting style (+2 to ranged attack rolls), situational penalties from conditions, or penalties from disadvantage
  5. Compare the total to the target's AC — if the total equals or exceeds AC, the attack hits

A natural 20 on the d20 is a critical hit, automatically succeeding regardless of the target's AC and doubling the number of damage dice rolled. A natural 1 is an automatic miss regardless of modifiers — no total bonus can overcome a rolled 1.

Armor Class itself is calculated differently depending on armor type. Light armor (e.g., leather, AC 11) adds the full Dexterity modifier. Medium armor (e.g., chain shirt, AC 13) adds Dexterity up to a maximum of +2. Heavy armor (e.g., plate, AC 18) adds no Dexterity modifier at all. This distinction creates a meaningful trade-off between equipment choices and character ability scores.

Common scenarios

Ranged attacks into melee: A ranged attacker targeting a creature that has an enemy within 5 feet of it makes the attack roll at disadvantage. This is a common source of missed attacks in crowded combat.

Cover: Targets behind half cover gain +2 to AC; three-quarters cover grants +5 to AC. Total cover makes a target untargetable. Full rules for positional AC modifiers appear in the flanking and cover rules.

Invisible or unseen attackers: Attacks against a target the attacker cannot see are made at disadvantage. Conversely, attacks made while the attacker is invisible or hidden are made at advantage. The interaction with the stealth and hiding system governs when these conditions apply.

Two-weapon fighting: When a character makes an attack with a light melee weapon in each hand, the bonus action attack from the off-hand weapon does not add the ability modifier to damage unless the character has the Two-Weapon Fighting style — but the attack roll still uses the full modifier.

Spells vs. weapon attacks: Spell attack rolls use the caster's spellcasting ability modifier plus proficiency bonus but do not benefit from fighting styles or weapon-specific features. The broader spellcasting rules govern which spells use attack rolls versus saving throws — an important structural distinction because saving throw spells bypass AC entirely.

Decision boundaries

The attack roll versus saving throw distinction is one of the most consequential design splits in the combat system. Attack rolls are opposed by a static number (AC); saving throws are opposed by a DC set by the attacker. A high-AC target may be more vulnerable to Fireball (Dexterity saving throw) than to a sword, while a target with poor Dexterity saves might be best approached with attack-roll-based spells like Toll the Dead or Fire Bolt.

The choice of armor type has cascading effects. A Dexterity-focused character (modifier +4 or higher) achieves AC 15 in studded leather without the Strength requirement of heavy armor and without encumbrance concerns — matching or exceeding chain mail (AC 16) when Dexterity bonuses are factored into the comparison.

Optional rules in the Dungeon Master's Guide introduce variants such as the called shot system or defense-based AC calculations, which alter how attack resolution functions outside the standard framework. Tables applying these variants should establish them clearly in session zero to prevent mid-campaign inconsistencies.

The broader structure of how combat fits into tabletop recreation is addressed in the conceptual overview of how recreation works, which contextualizes systems like attack resolution within the larger framework of game-table engagement. Additional combat mechanics, including initiative, damage and hit points, and actions, bonus actions, and reactions, integrate directly with the attack roll system covered here. The full rule set for all combat interactions is indexed at dndrules.com.

References

Explore This Site