Ad Space — Top Banner

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.

Total Attack Bonus

Dungeons & Dragons — the original tabletop RPG

Dungeons & Dragons was created by Gary Gygax and Dave Arneson and published in 1974. The current 5th Edition (5e) launched in 2014 and has become the most successful version of the game, with tens of millions of players worldwide.

D&D’s enduring popularity stems from:

  • Collaborative storytelling: shared narrative experience
  • Mathematical depth: dice-based probability systems
  • Character customization: vast options for unique characters
  • Theater of the mind + tactical combat: blend of narrative and rules
  • Community: millions of active players, conventions, podcasts

Combat in 5e is rooted in a simple system — and the attack bonus is at the heart of it.

How combat resolution works

When you attack in 5e, the basic flow is:

  1. Roll a 20-sided die (d20)
  2. Add your attack bonus
  3. Compare to the target’s Armor Class (AC)
  4. If your total equals or exceeds AC → hit
  5. If below AC → miss
  6. Roll a 20 = critical hit (double damage dice)
  7. Roll a 1 = critical miss (always misses)

The attack bonus is the modifier that goes into this calculation. Higher = more likely to hit.

The attack bonus formula

Attack bonus = Ability modifier + Proficiency bonus (if proficient) + Magic weapon bonus + Other modifiers

Each component:

Ability modifier:

  • Calculated from your ability score: (Score − 10) ÷ 2, rounded down
  • Score 10-11 = +0; 12-13 = +1; 14-15 = +2; 16-17 = +3; 18-19 = +4; 20 = +5
  • Strength (STR) for melee weapons
  • Dexterity (DEX) for ranged and finesse weapons
  • Spellcasting ability (INT/WIS/CHA) for spell attacks

Proficiency bonus (if proficient with the weapon):

  • Based on character level
  • Levels 1-4: +2
  • Levels 5-8: +3
  • Levels 9-12: +4
  • Levels 13-16: +5
  • Levels 17-20: +6

Magic weapon bonus:

  • +1, +2, or +3 from enchantments
  • Adds to both attack and damage rolls
  • Rare items, especially +3

Other modifiers:

  • Class features (Sneak Attack from Rogue doesn’t add to attack)
  • Spells (Bless: +1d4, Bardic Inspiration: variable)
  • Conditions (frightened: disadvantage)
  • Special weapons (some specific +1 or higher)

Proficiency bonus progression

This is one of D&D 5e’s elegant designs — proficiency scales smoothly:

Character Level Proficiency Bonus
1-4 +2
5-8 +3
9-12 +4
13-16 +5
17-20 +6

You become more skilled as you level up. Spells and abilities also use this bonus.

Worked example

A 9th-level Ranger using a shortbow:

  • Dexterity 18 → DEX modifier +4
  • Proficient with shortbow → +4 proficiency bonus
  • Wielding a +1 magic shortbow
  • Total attack bonus: +4 + +4 + +1 = +9

To hit AC 15: needs 6 or higher on the d20 → 75% chance to hit To hit AC 20: needs 11 or higher on the d20 → 50% chance to hit To hit AC 25: needs 16 or higher on the d20 → 25% chance to hit

Probability table for any attack bonus

For attack bonus +X attacking AC Y, the chance to hit is:

P(hit) = (21 − (AC − Attack Bonus)) ÷ 20

Attack Bonus vs AC 10 vs AC 15 vs AC 20
+0 55% 30% 5%
+2 65% 40% 15%
+4 75% 50% 25%
+6 85% 60% 35%
+8 95% 70% 45%
+10 95% (cap) 80% 55%
+12 95% (cap) 90% 65%

(95% cap because rolling a 1 always misses. 5% minimum because rolling a 20 always hits.)

Ability score range

D&D 5e character ability scores:

Score Modifier Description
1 -5 Helpless
3 -4 Catastrophically weak
5 -3 Very poor
7 -2 Below average
8-9 -1 Slightly below average
10-11 +0 Average
12-13 +1 Slightly above average
14-15 +2 Good
16-17 +3 Excellent
18-19 +4 Near peak
20 +5 Maximum for most characters
21-29 varies Magical enhancement
30 +10 Demigod / divine

Standard characters max at 20. Magical effects can push higher (Manual of Bodily Health, etc.).

Common attack types and their abilities

Different weapons and spells use different abilities:

Melee weapons (longsword, axe, dagger):

  • Strength-based by default
  • “Finesse” weapons (rapier, scimitar) can use DEX
  • “Heavy” weapons require STR

Ranged weapons (longbow, shortbow, crossbow):

  • Dexterity-based
  • “Thrown” weapons (handaxe, javelin) use STR (or DEX if finesse)

Spell attacks:

  • Wizard, Eldritch Knight: Intelligence
  • Cleric, Druid, Ranger: Wisdom
  • Bard, Sorcerer, Warlock, Paladin: Charisma

Class-specific examples

Fighter (level 5, two-handed sword):

  • STR 18 (+4), Proficient, no magic weapon
  • Attack: +4 STR + +3 Proficiency = +7

Paladin (level 8, longsword and shield):

  • STR 18 (+4), Proficient, +1 longsword
  • Attack: +4 STR + +3 Proficiency + +1 magic = +8

Wizard (level 9, casting fire bolt):

  • INT 18 (+4), spellcasting proficient
  • Attack: +4 INT + +4 Proficiency = +8

Rogue (level 10, hand crossbow with sneak attack):

  • DEX 18 (+4), Proficient
  • Attack: +4 DEX + +4 Proficiency = +8 (plus Sneak Attack damage if conditions met)

Ranger (level 11, longbow with +2 enchantment):

  • DEX 20 (+5), Proficient, +2 magic bow
  • Attack: +5 DEX + +4 Proficiency + +2 magic = +11

Critical hits and misses

Critical hit (natural 20):

  • Hit regardless of bonus or AC
  • Roll damage dice twice
  • Add modifiers once
  • Class features may add to critical (Champion Fighter: 19-20 crit range)

Critical miss (natural 1):

  • Miss regardless of bonus
  • No damage
  • Some homebrew rules add penalties (weapon drop, AOO triggers, etc.)
  • Official 5e rules: just a miss

Advantage and disadvantage

D&D 5e’s most important mechanic:

Advantage: roll 2d20, take the higher

  • Sources: prone target (melee), invisible attacker, flanking (variant rule)
  • Effective bonus: ~+3.5 to roll

Disadvantage: roll 2d20, take the lower

  • Sources: prone target (ranged), heavily obscured, restrained
  • Effective penalty: ~-3.5 to roll

Advantage and disadvantage are massive — bigger than most modifiers.

Improving attack bonus

To boost your attack bonus:

  1. Increase relevant ability score: ASIs (Ability Score Increases) at certain levels
  2. Level up: proficiency bonus increases
  3. Find magic weapons: +1, +2, +3
  4. Class features: Fighter’s Action Surge, Paladin’s Smite (separate roll)
  5. Buffs: Bless spell (+1d4), Bardic Inspiration (+1d6 to 1d12)
  6. Hunter’s Mark / Hex: extra damage, not attack
  7. Feats: Sharpshooter (-5/+10), Great Weapon Master (-5/+10)

Common attack bonus mistakes

  1. Forgetting proficiency: rangers using crossbows they’re proficient with shouldn’t drop the bonus
  2. Wrong ability: using STR for a DEX-based weapon
  3. Stacking magic: only one weapon bonus applies
  4. Missing class features: Bardic Inspiration, Bless, etc.
  5. Wrong proficiency at level: proficiency increases each tier
  6. Stacking bonuses incorrectly: typically only one of each type
  7. Forgetting advantage: huge effective bonus
  8. Sharpshooter math: -5 to hit, +10 damage requires careful evaluation

Bottom line

Attack bonus in D&D 5e = Ability modifier + Proficiency bonus (if proficient) + Magic weapon bonus. Ability modifier depends on score: 14 = +2, 16 = +3, 18 = +4, 20 = +5. Proficiency: +2 (levels 1-4), +3 (5-8), +4 (9-12), +5 (13-16), +6 (17-20). Roll d20 + bonus vs target AC. Natural 20 always hits (critical); natural 1 always misses. Advantage (2d20, take higher) is approximately equivalent to a +5 bonus. Different weapons use different abilities — STR for melee, DEX for ranged and finesse, casting ability (INT/WIS/CHA) for spells. Most level 5 characters have +5 to +7 attack bonus; level 20 characters have +10 to +12. Most monsters have AC 13-20 depending on type.


Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.