
Syrus Terrigan |
1 person marked this as a favorite. |

I *might* have made some low B's in trigonometry/precalculus back in high school, but I doubt it. I took *one* algebra class in college; that was 16 years ago. I am not a fan of mathematics, at all -- sometimes I can't even do division/multiplication properly.
That being said, I would like to gain a greater understanding of how DPR is calculated, so that I can run the numbers myself, and accurately. I think all I need is a formula, and the means to accurately and precisely arrive at the component variables for that formula.
I hope that some of you math experts out there are willing to help; please remember that I've got two decades, average grades, and some basic dislike for the medium. I'll try to be a good student.
Thanks!

wraithstrike |
7 people marked this as a favorite. |

Yes.
I am assuming yes means the hard way.
Forumla---->h(d+s)+tchd.
h = Chance to hit, expressed as a percentage
d = Damage per hit. Average damage is assumed.
s = Precision damage per hit (or other damage that isn't multiplied on a crit). Average damage is again assumed.
t = Chance to roll a critical threat, expressed as a percentage.
c = Critical hit bonus damage. x2 = 1, x3 = 2, x4 = 3.
PS: If "yes" meant give you the link then let me know.

DM_Kumo Gekkou |
2 people marked this as a favorite. |

The formula is
Chance to hit as a percentage * (average damage per hit + damage not multiplied on a critical hit) + Critical hit chance expressed as a percentage * critical hit bonus damage(see note) * Chance to hit as a percentage * average damage per hit
H(D+S)+TCHD
H = Chance to hit as a percentage
D = average damage per hit
S = damage not multiplied on a critical hit
T = Critical hit chance expressed as a percentage
C = critical hit bonus damage x2=1 x3=2 x4=3
Post if this doesn't clear it up I will attempt to be more throughout.

LoneKnave |
1 person marked this as a favorite. |
You'll need an excel sheet for this.
You grab all of your to-hit bonuses on each attack (including BAB, stat points, magic/masterwork weapons, etc.). You subtract this from the AC of the average target you are hitting.
You multiply this by 5% (capped out at 95%, since you always hit on a 20).
This is your chance to miss on a given attack roll. You can get your to-hit chance from this pretty easily by just substracting it from 100%.
For example, a 6th level warrior who has 2 attacks with his sword (+6/+1) and 18STR (+4) and Masterwork sword (+1) against a 20 AC target. So the first attack has a +11 bonus against 20 AC: you have 9*5%=45% to miss. 55% to hit. On his second attack, it's 20-6=14, 14*5%=80% chance to miss, 20% to hit.
Then you take the average of damage dices (easy method: half the die and add 0,5 so a d6 is 3,5, a d8 is 4,5, etc) and add all of your damage bonuses from stats, magic weapons, etc.
Then finally, you multiply the damage bonus by the chance to hit.
This gets you your average DPR on rounds you can full attack, without critical hits. Crits complicate the matter a bit...

Midnight-Gamer |
1 person marked this as a favorite. |

Syrus Terrigan wrote:Yes.I am assuming yes means the hard way.
Forumla---->h(d+s)+tchd.
h = Chance to hit, expressed as a percentage
d = Damage per hit. Average damage is assumed.
s = Precision damage per hit (or other damage that isn't multiplied on a crit). Average damage is again assumed.
t = Chance to roll a critical threat, expressed as a percentage.
c = Critical hit bonus damage. x2 = 1, x3 = 2, x4 = 3.PS: If "yes" meant give you the link then let me know.
I presume we are to distribute the "h" to "d" & "s", multiply the variables on the far right, and add the result?

BigDTBone |
1 person marked this as a favorite. |

wraithstrike wrote:I presume we are to distribute the "h" to "d" & "s", multiply the variables on the far right, and add the result?Syrus Terrigan wrote:Yes.I am assuming yes means the hard way.
Forumla---->h(d+s)+tchd.
h = Chance to hit, expressed as a percentage
d = Damage per hit. Average damage is assumed.
s = Precision damage per hit (or other damage that isn't multiplied on a crit). Average damage is again assumed.
t = Chance to roll a critical threat, expressed as a percentage.
c = Critical hit bonus damage. x2 = 1, x3 = 2, x4 = 3.PS: If "yes" meant give you the link then let me know.
That is the hard way but you absolutely could do it. Or you could just add d and s together then multiply the sum by h.

Orfamay Quest |
1 person marked this as a favorite. |

The hit percentage is 5% for every number that hits.
So if you hit on an 18, the hit percentage is 15% -- 5% for 18, 5% for 19, 5% for 20.
If you want something more formal, subtract your attack bonus from the opponents armor class, then multiply by 5%. For example, if you have a +2 attack and the opponent has AC 20, 20-2 = 18. 17 times 5% is 90%. This is the miss percentage, so 100% - 90% is a 10% chance to hit...... Well, I tell a slight lie. Because you hit on a tie, you need to subtract 5% from the miss percentage (or add 5% to the hit percentage, so it's really a 15% chance in this example.
Which matches. If I have a +2 and I'm attacking AC 20, I need an 18 to hit (because 18+2 = 20).
Crit percentages are the same thing; if I crit on a 19-20, then that's a 10% chance to crit (UNLESS a 19 is a miss).

BigDTBone |
1 person marked this as a favorite. |

Thanks so much for you efforts, people.
now, let's boost the complexity a bit: what if a character has an ability that allows a reroll on an attack? To be more specific -- Greater Weapon of the Chosen allows two attack rolls, and the higher may be taken. How does that mathematically translate?
Reroll on the attack would be expressed as h=1-(chance to miss)^2
PEMDAS is an acronym telling you the mathematical order of operations.
Parenthesis
Exponents
Multiply/divide
Add/subtract

Snowblind |
1 person marked this as a favorite. |

To take into account multiple rolls, use the following
if:
a=chance of hitting target AC with a single roll
p=total probability of hitting (what you use in the DPR equation)
p=1-(1-a)^2
You will need to follow the same equation with the critical chance (so for a longsword without a Keen effect, the crit chance is 2/20 or 0.1 so p=1-(1-0.1)^2=0.19 crit chance).

Gwen Smith |
3 people marked this as a favorite. |

I've posted my Damage Calculator Spreadhsheet and the instructions to our local group's share folder (look for the DamageCalculator folder). The instructions document contains a full explanation of the math and how the formulas are derived.

nate lange RPG Superstar 2012 Top 32 |
1 person marked this as a favorite. |

People keep saying 'chance to hit expressed as a percentage' but that's probably misleading... You actually want to express it as a decimal... If you hit on an 11 or better that's a 50% chance to hit, do not do 50(d+s... that will be way off use .5(d+s...
All of your 'H's will vary between .05 (5%, because a 20 always hits), and .95 (95%, because a 1 always misses)

Cevah |
1 person marked this as a favorite. |

People keep saying 'chance to hit expressed as a percentage' but that's probably misleading... You actually want to express it as a decimal... If you hit on an 11 or better that's a 50% chance to hit, do not do 50(d+s... that will be way off use .5(d+s...
All of your 'H's will vary between .05 (5%, because a 20 always hits), and .95 (95%, because a 1 always misses)
If you express 50% as "50%" and not "50", most spreadsheets convert it to 0.5 with a format of percentage. So expressing it as a percentage works.
For a simpler understanding, you could use
=(21-18)/20
to express you need an 18 to hit. 21-18 gets you the 3 possible rolls that hit, and the 20 is out of a possible 20 rolls.
/cevah, math nerd.

Chemlak |
1 person marked this as a favorite. |

Sometimes PEDMAS is written as BEDMAS
Brackets
Exponents
Division
Multiplication
Addition
Subtraction
And sometimes as BODMAS
Brackets
Order (of magnitude)
Etc...
I really must find my full-blown spreadsheet that does all of this, accounting for the auto hit and miss chances.

Wasum |
1 person marked this as a favorite. |

In highschool you for sure learned how to calculate expectancy values. The curricula of most countries include that around 10th grade.
And that is actually all you need to calculate DPR. Also, you dont need excel-sheets or something like that to do so as it contains only simple multiplications.
No need to have studied math at all - just visiting highschool lets you know how to do it, so no need to be deterred :D

BigDTBone |
1 person marked this as a favorite. |

Caedwyr wrote:Sometimes PEDMAS is written as BEDMAS
Brackets
Exponents
Division
Multiplication
Addition
SubtractionAnd sometimes as BODMAS
Brackets
Order (of magnitude)
Etc...I really must find my full-blown spreadsheet that does all of this, accounting for the auto hit and miss chances.
I made and host the first spreadsheet that wraithstrike linked upthread. It does that and more and is quite easy to use. (Even easier now thanks to Cevah! Thanks again!)

Saldiven |
1 person marked this as a favorite. |
should be noted that the h in the crit section may be different as there are abilities that improve crit confirmation rolls (Critical Focus is a prime example)
I was actually wondering about this, too. I haven't seen any spreadsheets that take this into account. I was looking at a crit-fishing type build that would have (at the very least) a +8 to confirm critical hits after level 10.

BigDTBone |
1 person marked this as a favorite. |

Entryhazard wrote:should be noted that the h in the crit section may be different as there are abilities that improve crit confirmation rolls (Critical Focus is a prime example)I was actually wondering about this, too. I haven't seen any spreadsheets that take this into account. I was looking at a crit-fishing type build that would have (at the very least) a +8 to confirm critical hits after level 10.
The first spreadsheet wraithstrike linked above accounts for that possibility.

Ssyvan |
1 person marked this as a favorite. |

Saldiven wrote:The first spreadsheet wraithstrike linked above accounts for that possibility.Entryhazard wrote:should be noted that the h in the crit section may be different as there are abilities that improve crit confirmation rolls (Critical Focus is a prime example)I was actually wondering about this, too. I haven't seen any spreadsheets that take this into account. I was looking at a crit-fishing type build that would have (at the very least) a +8 to confirm critical hits after level 10.
Are there any tools that express a ratio of expected damage taken and expected damage given?
That way < 1 you're doing more than them
== 1 you're doing the same as them
> 1 you're doing less than them
Although I'd expect every result to be below 1, as that's how the game is balanced. But, I'd wonder what kind of builds would hit the ratio (against the create a monster by CR chart) where you'd expect to last 6 battles (i.e. 1/6 or hopefully less) because that's about how many encounters you expect in a day. I think.

BigDTBone |
1 person marked this as a favorite. |

BigDTBone wrote:Saldiven wrote:The first spreadsheet wraithstrike linked above accounts for that possibility.Entryhazard wrote:should be noted that the h in the crit section may be different as there are abilities that improve crit confirmation rolls (Critical Focus is a prime example)I was actually wondering about this, too. I haven't seen any spreadsheets that take this into account. I was looking at a crit-fishing type build that would have (at the very least) a +8 to confirm critical hits after level 10.Are there any tools that express a ratio of expected damage taken and expected damage given?
That way < 1 you're doing more than them
== 1 you're doing the same as them
> 1 you're doing less than themAlthough I'd expect every result to be below 1, as that's how the game is balanced. But, I'd wonder what kind of builds would hit the ratio (against the create a monster by CR chart) where you'd expect to last 6 battles (i.e. 1/6 or hopefully less) because that's about how many encounters you expect in a day. I think.
Not that I'm aware of (strictly speaking, that isn't DPR)
However, the sheet I made and host has all of the relevant monster numbers on a tabbed sheet. It isn't accessable from the web app, but you could download it and then you would just need to write a single formula cell to give you that info.

Ssyvan |
1 person marked this as a favorite. |

Ssyvan wrote:BigDTBone wrote:Saldiven wrote:The first spreadsheet wraithstrike linked above accounts for that possibility.Entryhazard wrote:should be noted that the h in the crit section may be different as there are abilities that improve crit confirmation rolls (Critical Focus is a prime example)I was actually wondering about this, too. I haven't seen any spreadsheets that take this into account. I was looking at a crit-fishing type build that would have (at the very least) a +8 to confirm critical hits after level 10.Are there any tools that express a ratio of expected damage taken and expected damage given?
That way < 1 you're doing more than them
== 1 you're doing the same as them
> 1 you're doing less than themAlthough I'd expect every result to be below 1, as that's how the game is balanced. But, I'd wonder what kind of builds would hit the ratio (against the create a monster by CR chart) where you'd expect to last 6 battles (i.e. 1/6 or hopefully less) because that's about how many encounters you expect in a day. I think.
Not that I'm aware of (strictly speaking, that isn't DPR)
However, the sheet I made and host has all of the relevant monster numbers on a tabbed sheet. It isn't accessable from the web app, but you could download it and then you would just need to write a single formula cell to give you that info.
Awesome! Thanks!

Syrus Terrigan |
1 person marked this as a favorite. |

casts raise unthread
I am prepared to continue my remedial mathematics training, if anyone out there is interested and willing to invest the time and effort.
I am adjusting to Google Sheets from a long history with Excel, and I do know that I will eventually be able to craft the proper macros for my new project, but I don't know the math that undergirds it all. And so it is that I will have a series of boneheaded questions about how math works. Hopefully, any lessons will lodge within my mind.
1) How would you build the equation expressing this probability?
---> the average result of rolling a die with advantage
EDIT: I should have been more specific. I also want to understand how to determine the necessary components/functions, and, if possible, how to figure out what maths to use. That will probably all become clearer once I ask more questions.

Wonderstell |
1 person marked this as a favorite. |

1) How would you build the equation expressing this probability?
---> the average result of rolling a die with advantage
I'm assuming we're talking about attack rolls? The average result isn't needed for DPR calculations as what we're really after is the chance of success.
By rolling twice you must roll below your chance of success two times in a row in order to miss the attack. Anything else and you hit. Which means your new miss chance is the normal miss chance squared. As stated, anything else and you hit. So your new hit chance is the rest of the percentage, achieved by subtracting the new miss chance from 1.
[1-([Normal Miss Chance]^2)] = Advantage hit chance
If your chance of success was 0,6 (60%) before rolling twice, it becomes 0,84 (84%) with advantage.
[1-([0,4]^2)] -> [1-([0,16])] -> [0,84]
====
The reason why this method is attractive is because rolling twice has four different outcomes: You either succeed with both dice, succeed with the first and fail with the second, fail with the first and succeed with the second, or fail with both.
S=Success
F=Failure
SS SF
FS FF
Since percentages (should) add up to 100% we can calculate the sum of SS, SF, and FS simply by subtracting FF from 1.
====
Edit: Accidentally wrote "New" instead of "Normal"

Syrus Terrigan |
1 person marked this as a favorite. |

Well, I'm trying to expand upon the earlier premise concerning DPR outward into game math in general.
To add new specificity:
What does the math for determining the average results of d8s rolled with advantage look like?
EDIT: I will take what you've posted, Wonderstell, and apply it as best I can. I'll even pencil-whip it and save my work so I can compare my work to yours!
And many thanks for taking the time!!

MrCharisma |
1 person marked this as a favorite. |

I did a breakdown of how to calculate percentages when rolling dice with (dis)advantage HERE if you wanna have a read (read to the end though, I got one of the percentages wrong, and it's corrected a few posts further down).
Specifically I linked to THIS PICTURE, because it's a good visual representation of the odds when rolling 2 dice and taking the better.

![]() |
1 person marked this as a favorite. |
I haven't read the comments but average damage is calculated by lowest damage plus highest dividided by 2 multiplied by chance to hit.
So 1d6+4 with +7 attack against 19 AC would be 5.5 * .40 + 5.5 * .15 + 5.5 * .05
For a full round attack or 2.2+0.82+0.27 per round for a full attack.

Syrus Terrigan |
1 person marked this as a favorite. |

The best of two dice will be a bit over 70% of the max.
Obviously this is just an approximation, but it can save time and is pretty close.
(Because 2^0.5 / 2 = 0.71…)
Help me break down the steps, here. I'll give it a shot.
"Two raised to the power of .5" represents the two rolls, each averaged in value?
And then you divide that result by two . . . to represent the fact that you can only choose one of those two results?
So, by extension, if you were to roll three matching dice and take the best result of the three, would it look like this?
3^0.5 / 3 =
*cheats with calculator*
86.6% of the maximum result?
Application
So the equation to determine the average result of rolling 1d8 with advantage would be . . . .
8 * (2^0.5/2) ?
Resulting in . . . 5.66 on average?

Derklord |
1 person marked this as a favorite. |

Well, It's a bit complicated, but I'll try to explain. Emphasis on try, as it's been a long time for me, too, and I'm not familiar with all the english terms.
There're three different parts to the base term.
A) The number of different die combinations that result in a specific end value is always twice the value minus one. The picture MrCharisma linked shows that fairy well, but I can try to explain it further if it's unclear.
B) The number of different possible numbers (N) are always equal to the sides of the dice. This should be self-explanatory.
C) The total number of combinations is always the dice maximum value squared (N^2). I hope this is self-explanatory, too.
Are the above clear? I can try to explain them some more.
To get the average, first, we write out the above part A as a mathematic term, for a given number x: 2*x-1.
Next, since we care about the value rather than the chance for a given result, we multiply this by the value of the given number: x*(2*x-1).
Third, as we care about all possible results, we do the above for all the different possible values for x, i.e. six times for a six-sided die, and add them all together.
Fourth, to get the average, divide the sum produced in the last step by the number of possible results, i.e. N^2.
The above lets you do it by hand, but an eight sided dice would take nine different calculations. Thankfully, it's possible to put the different terms together into a single term by using summation, by using an index number instead of a regular variable: sum(i*(2*i-1)), where i ranges from 1 to N. Now all we need to add in the division by N^2 to finish the formula: The average value of 2dN take higher is sum(i*(2*i-1))/N^2.
The sum term can be spelled out, although I honestly forgot how to do that by hand, as 2/3*N^3+N^2/2-N/6. We need to add back in the divisor, i.e. (2/3*N^3+N^2/2-N/6)/N^2, which can be simplified into 2/3*N-1/(6*N)-1/2. This is the same as the formula in my last post, just in a slightly different form. It's actually even shorter - properly doing it (mostly) by hand instead of copy-pasting from some old notes, has an advantage, yay!

MrCharisma |
1 person marked this as a favorite. |

Yup.
So for a basic run through of how it works:
Let's start with D6's.
If you take a look at THIS PICTURE you can see all the posibilities for all the different rolls.
1 chance of rolling a 1
3 chances of rolling a 2
5 chances of rolling a 3
7 chances of rolling a 4
9 chances of rolling a 5
11 chances of rolling a 6.
There are 36 possible rolls (6×6), and if you add the numbers in the left hand column above (1+3+5+7+9+11) you see that they add to 36 as well. That's not super important, but it's a way to check that your numbers are correct.
Now to get the mean (average) you add all the options together and divide by the number of options, so:
So that's 1 chance of rolling a 1, 3 chances of rolling a 2, 5 chances of rolling a 3, 7 chances of rolling a 4, 9 chances of rolling a 5, 11 chances of rolling a 6.
Or in mathematical terms: (1×1 + 3×2 + 5×3 + 7×4 + 9×5 + 11×6) ÷ 36 = 4.47222...
So the average when rolling 2d6 pick the highest is ~4.5, it gives ~+1 to the roll on average.
Now the pattern there is that the chance of rolling x is 2x-1 (eg. To work out the odds of rolling exactly a 4 it's 2×4-1=7). This continues forever, so we can make these calculations with bigger dice. If we do the same thing with 2d20 pick the highest:
There's 1 chance of rolling a 1, 3 chances of rolling a 2, 5 chances of rolling a 3, ... 35 chances of rolling an 18, 37 chances of rolling a 19, 39 chances of rolling a 20. There are 400 individual rolls on 2d20. In order to work that out you just multiply the highest number on one die by the highest number on the other die (remember that rolling [1 and 3] is different to rolling [3 and 1], so these have to be counted seperately). For 2d20 that's 20×20, but if you were rolling 1d20 and 1d6 there wrould be 120 combinations (20×6).
In mathematical terms: 1×1 + 3×2 + 5×3 ... + 35×18 + 37×19 + 39×20 = 5,530
÷ (20×20=400) = 13.825
The average number on 1d20 is 10.5 so the difference when rolling twice is 13.825 - 10.5 = 3.325.
This will work the same when rolling twice and picking the lowest number, but will end up 3.325 lower than the average (7.175) instead of higher.
For the extreme numbers you have:
- 39/400 (9.75%) chance of rolling a Nat-20
- 1/400 (0.25%) chance or rolling a Nat-1
When rolling with Advantage.
- 1/400 (0.25%) chance of rolling a Nat-20
- 39/400 (9.75%) chance or rolling a Nat-1
When rolling with Disadvantage.
The chance is usually 5% for everything, so when rolling with Advantage you've almost doubled your chances of getting a Nat-20, and all-but-eliminated the chance to roll a Nat-1. The chance of rolling a 15+ with your Keen Scimitar (or whatever) goes from 30% to ~51% (and your confirmation roll has advantage).
When rolling disadvantage you've almost doubled your chances of getting a Nat-1, and all-but-eliminated the chance to threaten a crit. Even with a Keen Scimitar you end up with only a 9% chance to threaten a crit, and your chances of confirming that crit aren't great.
Now that's the way to do it manually, and you should be able to do that with a pencil and paper (or with a calculator) fairly easily. It's addition, multiplication and division, I've just given you the order of operations and explained why we're doing them that way. The equation Derklord has given you is a much shorter way of doing things. If you're unsure, try doing a few manually and then put the same numbers through Derklord's equation and see if the same numbers come out (using smaller dice like d6's will make this exercise quicker if you prefer).
ANY QUESTIONS?

Syrus Terrigan |
1 person marked this as a favorite. |

Okay. I'm back at it.
Derklord, you get the first reply.
Of the three points you made (A, B, and C) the one that I'm most confused about is A. Can you attempt to explain why it is true that value is 2x-1?
Is it simply because two rolls of a 1 results in 1?
EDIT: Or the "-1" simply addresses the fact a tied 'roll pair' has no variance between the results? That factor deals with the diagonal line of matching/tied rolls?