D&D Attack Bonus Calculator
Calculate your D&D 5e attack bonus instantly.
Enter your level, ability modifier, proficiency, and magic weapon bonus to get your total to-hit bonus.
How Attack Bonus Works in D&D 5e
Every time you attack, you roll a d20 and add your attack bonus. If your total equals or beats the target’s Armor Class (AC), the attack hits.
Formula
Attack Bonus = Ability Modifier + Proficiency Bonus (if proficient) + Magic Weapon Bonus
The ability modifier is usually Strength for melee weapons or Dexterity for ranged and finesse weapons. Spellcasters use their spellcasting ability (INT, WIS, or CHA) for spell attacks.
Proficiency Bonus by Level
| Levels | Proficiency Bonus |
|---|---|
| 1–4 | +2 |
| 5–8 | +3 |
| 9–12 | +4 |
| 13–16 | +5 |
| 17–20 | +6 |
Magic Weapon Bonus
A +1 weapon adds +1 to both attack rolls and damage. A +2 or +3 weapon stacks with all other bonuses. These are rare items — most characters never find a +3 weapon.
Practical Example
A level 9 Ranger with +4 DEX modifier, proficient with a shortbow, and a +1 magic shortbow: Attack Bonus = +4 (DEX) + +4 (Proficiency, level 9) + +1 (magic) = +9 to hit.
Rolling a 1 always misses (critical miss). Rolling a 20 always hits (critical hit).