When the outcome of an action is uncertain the game uses a d20 roll to determine success or failure. These rolls are called d20 tests and they come in 3 kinds: Ability Checks Saving Throws and attack rolls. They Follow these steps
1 Roll 1d20: You always want to roll high. If the roll has Advantage or Disadvantage you roll 2 d20s but you use the number from only one of them the higher one if you have Advantage or the lower one if you have Disadvantage.
2 Add Modifiers: Add these modifiers to the number rolled on the d20:
The Relevant Ability Modifier
Your Proficiency Bonus if Relevant: Each Creature has a Proficiency Bonus a number added when making a D20 test that uses something such as a skill in which the creature has proficiency
Circumstantial Bonuses and Penalties: A class feature a spell or another rule might give a bonus or penalty to the die roll.
3 Compare the Total to a Target Number: If the total of the d20 and its modifiers equals or exceeds the target number it succeeds. Otherwise it fails. The DM determines target numbers and tells players whether their rolls are successful. The target number for an ability check or a saving throw is called a Difficulty class or DC. The target number for an attack roll is called an Armor Class or AC which appears on a character sheet or in a stat block.
Ability Checks: An Ability Check represents a creature using talent and training to try to overcome a challenge such as forcing open a stuck door picking a lock entertaining a crowd or deciphering a cipher. The DM and the rules often call for an ability check when a creature attempts something other than an attack that has a chance of meaningful failure. When the outcome is uncertain and narratively interesting the dice determine the result.
Ability Modifier: An ability check is named for the ability modifier it uses a Strength check an Intelligence check and so on. Different ability checks are called for in different situations depending on which ability is most relevant.
Strength Lift push pull or break something
Dexterity Move nimbly quickly or quietly
Constitution Push your body beyond normal limits
Intelligence Reason or remember
Wisdom Notice things in the environment or in creatures behavior
Charisma Influence entertain or deceive
Proficiency Bonus: Add your Proficiency Bonus to an ability check when the DM determines that a skill or Tool proficiency is relevant to the check and you have that proficiency. For example if a rule refers to a Strength (Acrobatics or Athletics) check you can add your Proficiency Bonus to the check if you have proficiency in the Acrobatics or Athletics skill.
Difficulty Class: The Difficulty Class of an ability check represents the task's difficulty. The more difficult the task the higher its DC. The rules provide DC's for certain checks but the DM ultimately sets the info below presents a range of possible DC's for ability checks.
Typical Difficulty Classes
Saving Throws: A saving throw (also called a save) represents an attempt to evade or resist a threat such as a fiery explosion a blast of poisonous gas or a spell trying to invade your mind. You don't normally choose to make a save you must make one because your character or a monster (if you're the DM) is at risk. A save's result is detailed in the effect that caused it. If you don't want to resist the effect you can choose to fail the save without rolling.
Ability Modifier: Saving throws are named for the ability modifiers they use: a Constitution saving throw a Wisdom saving throw and so on. Different saving throws are used to resist different kinds of effects as shown below.
Strength Physically resist direct force
Dexterity Dodge out of harm's way
Constitution Endure a toxic hazard
Intelligence Recognize an illusion as fake
Wisdom Resist a mental assault
Charisma Assert your identity
Proficiency Bonus: You add your Proficiency Bonus to you saving throw if you have proficiency in that kind of save.
Difficulty Class: The Difficulty Class for a saving throw is determined by the effect that causes it or by the DM. For example if a spell forces you to make a save the DC is determined by the caster's spellcasting ability and Proficiency Bonus. Monster abilities that call for saves specify the DC.
Attack Rolls: An attack roll determines whether an attack hits a target. An attack roll hits if the roll equals or exceeds the target's Armor Class. Attack Rolls usually occur in battle but the DM might also ask for an attack roll in other situations such as an archery competition.
Ability Modifier: Below shows which ability modifier to use for different types of Attack Rolls
Strength Melee attack with a weapon or an Unarmed Strike
Dexterity Ranged attack with a weapon
Varies Spell attack (the ability used is determined by the spellcaster's spellcasting feature)
Some features let you use different ability modifiers from those listed. For example the Finesse property lets you use Strength or Dexterity with a weapon that has that property.
Proficiency Bonus: You add your Proficiency Bonus to your attack roll when you attack using a weapon you have proficiency with as well as when you attack with a spell.
Armor Class: A creature's Armor Class represents how well the creature avoids being wounded in combat. The AC of a character is determined at character creation whereas the AC of a monster appears in its stat block
Calculating AC: All creatures start with the same base AC calculation:
Base AC=10 + the creature's Dexterity modifier
A creature's AC can then be modified by armor magic items spells and more.
Only one base AC: Some spells and class features give characters a different way to calculate their AC. A character with multiple features that give different ways to calculate AC must choose which one to use only one base calculation can be in effect for a creature.
Rolling 20 or 1: If you roll a 20 on the d20 (called a natural 20) for an attack roll the attack hits regardless of any modifiers or the target's AC. This is called a critical hit. If you roll a 1 on the d20 (a natural 1) for an attack roll the attack misses regardless of any modifiers or the target's AC.
Advantage/Disadvantage: Sometimes a d20 test is modified by Advantage or Disadvantage. Advantage reflects the positive circumstances surrounding a d20 roll while Disadvantage reflects negative circumstances. You usually acquire Advantage or Disadvantage.
Roll 2 d20s: When a roll has either Advantage or Disadvantage roll a second d20 when you make the roll. Use the higher of the 2 rolls if you have advantage and use the lower roll if you have Disadvantage. For example if you have Disadvantage and roll a 18 and a 3 use the 3 If you instead have Advantage and roll those numbers use the 18.
They Don't Stack: If multiple situations affect a roll and they all grant Advantage on it you still roll only 2 d20's. Similarly if multiple situations impose Disadvantage on a roll you roll only 2 d20's. If circumstances cause a roll to have both Advantage and Disadvantage the roll has neither of them and you roll 1 d20. This is true even if multiple circumstances impose Disadvantage and only 1 grants Advantage or vice versa. In such a situation you have neither Advantage nor Disadvantage.
Interactions with Rerolls: When you have Advantage or Disadvantage and something in the game lets you reroll or replace the d20 you can reroll or replace only one die not both. You choose which one. For example if you have Heroic Inspiration and roll a 3 and a 18 on an ability check that has Advantage or Disadvantage you could expend your Heroic Inspiration to reroll one of those dice not both of them.