I roll a d20.
If I have a choice between d20+x with advantage, or d20+y without advantage, what choice do I make to maximise the result? What are the values of x and y where the choice changes (if it changes at all)?
Assume x < y.
The first thing we'll look at is a table that represents the odds of rolling at least a given DC, given a d20 with or without advantage (no modifiers yet).
Natural DC | Advantage | No Advantage | Difference | Eq. Flat Modifier |
---|---|---|---|---|
DC 1- | 100.000% | 100.000% | 0.000% | 0 |
DC 2 | 99.750% | 95.000% | 4.750% | 0.95 (1) |
DC 3 | 99.000% | 90.000% | 9.000% | 1.8 (2) |
DC 4 | 97.750% | 85.000% | 12.750% | 2.55 (3) |
DC 5 | 96.000% | 80.000% | 16.000% | 3.2 (4) |
DC 6 | 93.750% | 75.000% | 18.750% | 3.75 (4) |
DC 7 | 91.000% | 70.000% | 21.000% | 4.2 (5) |
DC 8 | 87.750% | 65.000% | 22.750% | 4.55 (5) |
DC 9 | 84.000% | 60.000% | 24.000% | 4.8 (5) |
DC 10 | 79.750% | 55.000% | 24.750% | 4.95 (5) |
DC 11 | 75.000% | 50.000% | 25.000% | 5 |
DC 12 | 69.750% | 45.000% | 24.750% | 4.95 (5) |
DC 13 | 64.000% | 40.000% | 24.000% | 4.8 (5) |
DC 14 | 57.750% | 35.000% | 22.750% | 4.55 (5) |
DC 15 | 51.000% | 30.000% | 21.000% | 4.2 (5) |
DC 16 | 43.750% | 25.000% | 18.750% | 3.75 (4) |
DC 17 | 36.000% | 20.000% | 16.000% | 3.2 (4) |
DC 18 | 27.750% | 15.000% | 12.750% | 2.55 (3) |
DC 19 | 19.000% | 10.000% | 9.000% | 1.8 (2) |
DC 20 | 9.750% | 5.000% | 4.750% | 0.95 (1) |
DC 21+ | 0.000% | 0.000% | 0.000% | 0 |
A +1 to a non-advantage roll will always improve the odds of rolling a given number by exactly 5 percentage points. Conversely, a +1 to an Advantage roll will increase your odds by an amount equal to moving up one row on that table: a DC7 check made with +1 is equivalent to a DC6 check made with +0. A DC20 check made with advantage and a +1 modifier is equivalent to a DC19 check made with +0, which constitutes a 9.250 percentage point improvement.
There are a few casual observations we can make:
So back to the original question: Given two rolls, 1d20+x/Adv, and 1d20+y/NoAdv, which is better? Well, as established, it depends on the DC of the check, but to get the results from this table:
Attack Rolls are a little weird, because you no longer simply care about passing the check; you also care what the natural number was because of Critical Hits and Misses.
Most of the math still checks out: if all you care about is hitting/missing, then the table above can be used, since the scenarios where a Natural 2 hits and a Natural 19 misses are pretty rare in 5e. If, however, you instead care more about the Crits/Auto-Misses, then you should introduce a "subjectivity factor", which you can define however you like: is it important to you that you get a critical hit (or avoid a critical miss)? Then always go Advantage. If not, then use the table above. I generally stick to the table personally, but "clutch factor" is one of those hazy things that can't be objectively defined, so you'll need to make that call for yourself.
It will depend on what you're trying to achieve. For example, if you need to reach DC 25, and \$x = 4\$ and \$y = 5\$, the advantage on the roll with \$x\$ doesn't matter; you'll never roll higher than 24. With the +5, you'll at least have a 5% chance.
Here (scroll down to "Advantage versus Simple Bonuses") is a table which shows which bonus (difference between x and y) corresponds to having advantage or not.
(source: Zero Hit Points)
If you only care about maximising the expected result, as opposed to your odds of hitting a specific target number (for instance, you might be making a contested roll against someone else, like in a grapple, or otherwise don't know the target number ahead of time) this is a pretty simple comparison. Having advantage on a d20 roll increases the expected result from an average of 10.5 to 13.82 (illustrated by this anydice program); that's a benefit of +3.32.
Therefore, in order for a roll without advantage to have a higher expected result than a roll with advantage, the modifier on the normal roll needs to be four or more points better than the modifier on the advantaged roll. +3 with advantage is worse than +7 normally, and so on.
First, subtract \$x\$ both from \$y\$ and from the target number you're rolling against. Then look at this graph:
In the graph, find the position on the horizontal axis that matches the target number (minus \$x\$) that you're trying to meet or exceed, and the colored line that matches the extra bonus \$y-x\$ to the roll without advantage. If that colored line is higher that the curved black line at that position on the horizontal axis, you should choose the higher bonus over advantage.
(Specifically, the various lines in the graph show the probability of meeting or exceeding a given target number with various rolls: the black curved line is for d20 with advantage but no bonus, while the five different colored straight lines on top of it are for d20+1 to d20+5.)
Or, to summarize, you should choose a plain \$+y\$ bonus over advantage \$+x\$ when...
(As noted by Xirema, things can change a little if you're e.g. making an attack roll and care about crits. Rolling with advantage has a 9.75% chance of giving you a natural 20, and only a 0.25% chance of a natural 1, whereas with a normal d20 roll both 1s and 20s show up 5% of the time each. Whether those differences in crit odds are worth trading for a somewhat worse chance to hit depends both on the target DC and on how much you value crits.)
X:1
to what X you want and the same for Y:2
. E.g., you want 5 and 10, X:5
and Y:10
.
\$\endgroup\$
Commented
May 9, 2019 at 18:22
tl;dr- Assuming neither roll is a sure thing, then advantage has better odds if$$ \frac{ \left(\text{DC} - \text{advantage bonus} - 1\right)^2}{\text{DC} - \text{normal bonus} - 1 {\phantom{{}^{2}}}} < 20 \tag{1} \,.$$Here's an online C# script to play with this. Details at the bottom of this answer.
You have to beat a \$\text{DC} = 10 .\$
You have two options:
Roll normally with a bonus of \$+5 .\$
Roll with advantage and a bonus of \$+1 .\$
Plug this into \$\operatorname{Eq.}{\left(1\right)}\$ to find:$$ \frac{\left(\text{DC} - \text{advantage bonus} - 1\right)^2}{\text{DC} - \text{normal bonus} - 1 {\phantom{{}^{2}}}} ~=~ \frac{\left(10 - 1 - 1\right)^2}{10 - 5 - 1} ~=~ \frac{8^2}{4} ~=~16 ~<~ 20 \,.$$
Since \$16 < 20 ,\$ this inequality is \$\texttt{TRUE} ,\$ and therefore rolling with advantage is better.
By contrast, if the \$\text{DC}\$ were \$17\$ instead of \$10 ,\$ then the inequality would've reduced to$$ \frac{\left(\text{DC} - \text{advantage bonus} - 1\right)^2}{\text{DC} - \text{normal bonus} - 1 {\phantom{{}^{2}}}} ~=~ \frac{\left(17 - 1 - 1\right)^2}{17 - 5 - 1} ~=~ \frac{{15}^2}{11} ~=~ \sim 20.45 ~<~ 20 \,,$$
and since \$\sim 20.45 < 20\$ is \$\texttt{FALSE} ,\$ this means that the odds aren't better when rolling with advantage. So, in this case, it'd seem better to roll normally with \$+5\$ rather than with \$+1\$ and advantage.
First:
If either option is a sure-thing, just do it.
If neither option has a chance, nothing you can do anyway.
So this leaves only the case in which both options have some non-certain possibility.
Then, the odds of failing to beat a DC on a single roll are $$ P_{\text{roll}} ~=~ 5 \, \left(\left[\text{DC}\right] - \left[\text{bonus}\right] - 1\right) \, \% \,, $$and the odds of failing to beat a DC with advantage are$$ P_{\begin{array}{c}\text{roll with} \\[-10px] \text{advantage}\end{array}} ~=~ P_{\text{roll}}^2 ~=~ \left(5 \, \left(\left[\text{DC}\right] - \left[\text{bonus}\right] - 1\right) \, \%\right)^2 ~=~ 0.25 \, \left(\left[\text{DC}\right] - \left[\text{bonus}\right] - 1\right)^2 \, \% \,.$$
So, your odds of failure with advantage are lower when $$ 0.25 \, \left(\left[\text{DC}\right] - \left[\text{bonus}\right]_{\text{advantage}} - 1\right)^2 \, \% ~<~ 5 \, \left(\left[\text{DC}\right] - \left[\text{bonus}\right]_{\text{normal}} - 1\right) \, \% \,,$$ or $$ \frac{ \left(\left[\text{DC}\right] - \left[\text{bonus}\right]_{\text{advantage}} - 1\right)^2 }{ \left[\text{DC}\right] - \left[\text{bonus}\right]_{\text{normal}} - 1 } ~<~ 20 \,. $$
To make that a little more intuitive, let's write it as $$ \frac{ \left(\text{DC} - \text{advantage bonus} - 1\right)^2 }{ \text{DC} - \text{normal bonus} - 1 } ~<~ 20 \,. $$
The tl;dr advice recommends against rolling with advantage when the odds are the same either way. I chose this convention since it's less work. But, if someone likes to roll, then they might instead roll with advantage if $$ \frac{ \left(\text{DC} - \text{advantage bonus} - 1\right)^2}{\text{DC} - \text{normal bonus} - 1 {\phantom{{}^{2}}}} \le 20 \,.$$
The above logic assumes that the d20-die is fair. If it's not, then I'd guess that rolling without advantage is a bit better than it would normally be because an unfair die would seem to have less variability between rolls. Since most dice probably aren't perfectly fair, a hardcore optimizer might prefer to roll without advantage when$$ \frac{ \left(\text{DC} - \text{advantage bonus} - 1\right)^2}{\text{DC} - \text{normal bonus} - 1 {\phantom{{}^{2}}}} \approx 20 \,.$$
The \$`` 20 "\$ in the inequality is no coincidence; it corresponds to the "20" in "d20". Likewise, the \$`` 1 "\$ corresponds to the minimum die value. So if another sort of die is used, this inequality can be generalized to$$ \frac{ \left(\text{DC} - \text{advantage bonus} - \text{min die value}\right)^2}{\text{DC} - \text{normal bonus} - \text{min die value} {\phantom{{}^{2}}}} ~<~ \text{max die value} - \text{min die value} + 1 \,.$$
The above derivation focused on the probability of failure, rather than the probability of success, because the math would've been a bit uglier for rolling with advantage if we focused on maximizing success (rather than minimizing error). However, if anyone does this same calculation for rolling with disadvantage, the math should be cleaner if you instead derive it by focusing on maximizing success. The reason for this is that advantage/disadvantage requires a second die roll only on failure/success of the first roll.
I was going to attach a JavaScript snippet here, but I guess that feature's not on this StackExchange. So, here's a C# script that can be run online.
Notes:
To use it, call Report(dc, bonus_normal, bonus_advantage);
, and it'll tell you which is better.
Currently, it's pre-loaded to call Report(10, 5, 1);
and Report(17, 5, 1);
to demonstrate the example given near the top of this answer. This should return:
For DC = 10 Bonus (normal) = 5 Bonus (advantage) = 1: Your odds are better with the power of ADVANTAGE! For DC = 17 Bonus (normal) = 5 Bonus (advantage) = 1: Advantage is for losers; roll normally!
By default, it uses a d20, with a minimum value of 1
and a maximum value of 20
. Both of these values can be changed in the code.
\$\operatorname{Eq.}{\left(1\right)}\$ (and its generalization, as used in this script) assume that, if the odds can't be improved by advantage, you prefer to roll normally (since it's less rolling).
\$\operatorname{Eq.}{\left(1\right)}\$ assumes success and failure are both possible with both advantage and normal rolling. This script checks to ensure that that's true before using \$\operatorname{Eq.}{\left(1\right)} .\$
Source code (C#):
using System;
public class Program
{
// A typical d20 has a minimum value of 1 and a maximum of 20:
public const long MINIMUM_DIE_VALUE = 1;
public const long MAXIMUM_DIE_VALUE = 20;
public static void RunExample()
{
Report(
10
, 5
, 1
);
Report(
17
, 5
, 1
);
}
public static void Report(
long dc
, long bonus_normal
, long bonus_advantage
)
{
var stringMessage =
"For\tDC = "
+ dc.ToString()
+ "\tBonus (normal) = "
+ bonus_normal.ToString()
+ "\tBonus (advantage) = "
+ bonus_advantage.ToString()
+ ":"
+ System.Environment.NewLine
;
if (ShouldRollWithAdvantage(
dc
, bonus_normal
, bonus_advantage
))
{
stringMessage += "Your odds are better with the power of ADVANTAGE!";
//Console.WriteLine("Your odds are better with the power of ADVANTAGE!");
}
else
{
stringMessage += "Advantage is for losers; roll normally!";
//Console.WriteLine("Advantage is for losers; roll normally!");
}
Console.WriteLine(stringMessage);
Console.WriteLine();
}
public static bool ShouldRollWithAdvantage(
long dc
, long bonus_normal
, long bonus_advantage
)
{
// Case 1:
// If rolling with advantage can't succeed, then just roll normally.
// Doesn't matter if rolling normally can't succeed, either, because if
// you're going to fail either way, may as well only roll once.
if (dc - bonus_advantage > MAXIMUM_DIE_VALUE)
{
return false;
}
// Case 2:
// If rolling without advantage can't succeed, then roll with advantage.
if (dc - bonus_normal > MAXIMUM_DIE_VALUE)
{
return true;
}
// Case 3:
// If rolling without advantage always succeeds, then roll without advantage.
if (dc - bonus_normal <= MINIMUM_DIE_VALUE)
{
return false;
}
// Case 4:
// If rolling with advntage always succeeds, then roll with advantage.
if (dc - bonus_advantage <= MINIMUM_DIE_VALUE)
{
return true;
}
// Case 5:
// Since rolling with advantage and rolling without advantage are both
// possible-but-not-guaranteed, we compare their odds of success.
//
// This method checks if
// (DC - bonus_advantage - 1)^2
// is less than
// 20 * (DC - bonus_normal - 1)
// instead of the fraction to avoid floating-point values.
{
var leftHandSide = (dc - bonus_advantage - MINIMUM_DIE_VALUE);
leftHandSide *= leftHandSide;
var rightHandSide = (MAXIMUM_DIE_VALUE - MINIMUM_DIE_VALUE + 1) * (dc - bonus_normal - MINIMUM_DIE_VALUE);
var shouldRollWithAdvantage = leftHandSide < rightHandSide;
return shouldRollWithAdvantage;
}
}
private static bool TryValidateProgramConstants(
out string errorMessage
)
{
if (!(MINIMUM_DIE_VALUE < MAXIMUM_DIE_VALUE))
{
errorMessage = "Maximum die value must be greater than minimum die value.";
return false;
}
if (MINIMUM_DIE_VALUE < -1000)
{
errorMessage = "Unreasonably low minimum die value.";
return false;
}
if (MAXIMUM_DIE_VALUE > 1000)
{
errorMessage = "Unreasonably high maximum die value.";
return false;
}
errorMessage = default(string);
return true;
}
public static void Main()
{
string errorMessage;
if (TryValidateProgramConstants(out errorMessage))
{
RunExample();
}
else
{
Console.WriteLine("Error in program validation; aborting run.");
if (!string.IsNullOrWhiteSpace(errorMessage))
{
Console.WriteLine(errorMessage);
}
}
}
}
y-x
, and asking if Advantage is better than a bonus of +y-x
to a straight roll, for a DC ofDC - x
. Then you can use the existing tables / math people have already done, like statmodeling.stat.columbia.edu/2014/07/12/… and How does rolling two dice and taking the higher affect the average outcome?. Of course, if there are special downsides to a natural 1 like your gun breaking, or upside to natural 20, Advantage is extra valuable. \$\endgroup\$