# Understanding the maths behind 5e

#### miggyG777

##### Explorer
I am currently trying to dive deeper into the mechanics behind 5e. I was fascinated with PF2s structured approach in this regard and therefore wanted to see how my favorite system (5e) compares to it.

5e overall is a little bit harder to understand, mainly because the material is not always thoroughly informative on how the underlying mechanics are implemented. Therefore you have to resort to reverse engineering to understand the actually quite beautiful mechanics that 5e employs.

Example: The monster building tutorial as outlined in the DMG is superficial at best, when it comes to explaining the reasoning behind why certain things are the way they are. The AngryGM wrote a good article on this, where he goes past the DMG and uncovers what lies beyond Monster Building 201: The D&D Monster Dissection Lab

Obviously not all concepts in 5e need this sort of reverse engineering to understand and are quite self explanatory, such as Bounded Accuracy.

But I still have some things that I want to learn.

For instance: How does HP and damage scale? For players and for monsters. This should tell me how long it takes the party to kill an appropriate level monster on average. That will allow me to understand the resource draining mechanics better and improve my own encounter building.

The monster scaling is outlined in the DMG, unfortunately the infos for the player character side are lacking, I found some spreadsheets but they are not as conclusive as I wish them to be. Therefore I do not know how much damage a player will do on average, at a certain level, and I cant infer the average TTK that the creators of 5e envisioned. That TTK is needed to calculate how much damage a certain monster will deal to a character on average, hence the resource draining.

The obvious approach here would be to reverse engineer as mentioned beforehand, but I'd be surprised if nobody had ever thought about this before. However, I haven't really found anything in the net yet. That's why I am asking you guys. Do you have good materials on the underlying mechanics of 5e? Maybe even something that deals with resource draining and encounter building? Perhaps I have missed something.

Last edited:

#### dave2008

##### Legend
I've done an analysis of Monster and PC damage across levels before. I know the PC information was in a spreadsheet it posted on this forums somewhere. If I can find it, i'll link to it here.

They only thing relevant that I remember off the top of my head was that: monsters are relatively weaker as they go up in CR. As PCs go up in level, the damage monsters do (at an equivalent CR) becomes a lower percentage of the PC's hit points. Basically, a CR 1 monster requires fewer hits to kill a lvl 1 PC than a CR20 monster requires to kill a lvl 20 PC.

#### Jacob Lewis

##### The One with the Force
One of the many things I absolutely loved about 4th Edition (DnD) was how easy it was to figure out the maths. Sure, the numbers bloated to insane amounts, but the principles were solid. It was well structured and highly organized, and yet retained immense versatility making it easy to scale and adjust as needed.

The digital tools helped, of course. Still, it didn't take much effort to do it by hand. We just got spoiled and lazy with automated software. I miss that. I miss 4e. Sigh.

#### dave2008

##### Legend
One of the many things I absolutely loved about 4th Edition (DnD) was how easy it was to figure out the maths. Sure, the numbers bloated to insane amounts, but the principles were solid. It was well structured and highly organized, and yet retained immense versatility making it easy to scale and adjust as needed.
PF2e is structured in a similar way (math wise) as 4e. You might give it a try.

#### Jacob Lewis

##### The One with the Force
PF2e is structured in a similar way (math wise) as 4e. You might give it a try.
I might. It's being delivered today, as we type!

#### NotAYakk

Using the DMG table, the product of DPR*HP*(1+.1*(ATK+AC-13)) is pretty damn proportional to XP. There is a factor of 5

#### Fenris-77

##### Hero
Using the DMG table, the product of DPR*HP*(1+.1*(ATK+AC-13)) is pretty damn proportional to XP. There is a factor of 5
Check out the big brain on Brad! I love having maths types on the forum. I can tinker with some back-of-napkin maths, but not this sort of thing. Marvelous.

#### NotAYakk

Warning Edit: I did the math in this from memory, not from my spreadsheet. The actual exponent is 2/3 not 3/4, and there are a few other errors (corrected in later posts).

---

As for encounter building, all of that futzy "double XP" crap can be gotten rid of by just raising XP values and budgets to the ^(3/4). This changes the 25%/50%/75%/100% easy/medium/hard/deadly to 40%/60%/80%/100%.

The basic idea is, how hard is a monster with 2x the HP and Damage? Is it 2x (I mean, you doubled both), or 4x (2x * 2x = 4x)? If you just double a monster's damage, it is twice as hard, right?

So how about 2 monsters? Well, they are more vulnerable to AOE effects, and it tends to be harder to focus fire with 2 monsters, and if you deal 1 monsters worth of HP their damage output halves. How do 2 monsters compare to one with 2x HP?

That (3/4) factor is 5e D&Ds answer to that question.

Suppose we have X monsters on the left and one monster with Y times the HP and Damage on the right.

(HP*Damage)^(3/4) (adjusted for defences and accuracy) answers "how many X monsters does it take to be just as hard as a Y".

X * (HP*Damage)^(3/4) = (Y*HP*Y*Damage)^(3/4)

X * (HP*Damage)^(3/4) = (Y^2)^(3/4) * (HP*Damage)^(3/4)

X = (Y^2)^(3/4)
X = Y^1.5

So if Y is 4, X is 4^1.5 which is about 6.

So 6 "small" monsters are just as hard as one "4 times size" monster.

How this works in the 5e encounter balancing system is this.

Suppose the small monsters are wroth 400 XP each. The big monster will be worth 400*4*4 = 6400 XP or so.

400 * 6 is only 2400 XP. But the encounter size multiplier then boosts 2400 XP by 2.5-3, making it reach 6000-7200 XP. Roughly the same budget.

As far as I can tell, all of those encounter size multipliers can be ignored by first raising XP to the (3/4) power. Now XP is additive.

But if we are doing this, we don't have to use the XP values posted. I mean, many people advance by milestones instead anyhow.

---

Anyhow, you can take the XP values of various CR monsters, raise it to the (3/4) power, then futz around with it and round it. You get something like:

CR 1/8: 1
CR 1/4: 2
CR 1/2: 4
CR 1: 6
CR 2: 9
CR 3: 12
CR 4-15ish: +6 per CR
CR 16-19: +9 per CR
CR 20: 140ish
CR 21+: +15 or 20, I forget, per CR

I call those "encounter building points". They let you build encounters by just adding up numbers and no multiplication.

---

On the PC side, you can add up player EBP and divide by 4 to work out what their medium budget should be. Then an easy encounter is 2/3, hard is 4/3, deadly is 5/3 of that, and "crazy" is 2x.

If we divide by 3 instead of 4 we get even nicer math. Easy is 1/2, medium is 3/4, hard is that EBP, and deadly is 5/4 (+25%) and crazy is 3/2 (+50% over budget).

As the EBP stuff above is already divisible by 3 we get:
L1: 2 EBP
L2: 3 EBP
L3: 4 EBP
L4-15: +2 EBP per level (or Level*2-2)
L16-19: +3 EBP per level
L20: 45 EBP

then just add up the party's EBP to give an EBP budget (at "hard" difficulty).

(the cutoff at 15-16 might be a level layer, I'm doing this from memory).

There is modest differences in the encounters build this way compared to the DMG, but I find it ridiculously easier.

Turning this into scene building (budget for time-between-short-rests) and daily budgets isn't hard. Really, 5 times your EBP budget (as calculated above) isn't a bad number to at level 3 and above (at level 1-2, use 4x).

So a party of 4 level 5 PCs has an EBP budget of:
16 easy (don't use anything easier than this)
24 medium
32 hard
48 crazy
160 per day

If you have 2 short rests per day, that is about 56 EBP per "scene" (period between short rests).

Lets build a set of encounters. We are in a village. The baron's daughter is visiting. Mercenaries attack, pinning down the PCs.

1. 6 guards (EBP 6) plus PCs against 6 orcs (24 EBP) (18 EBP net, easy fight)
2. Guards leftover from first 1 (say, 4), plus 5 new guards (so 9 EBP), plus PCs, vs 8 orcs (32 EBP) and a veteran (CR 2, 18 EBP) 41 -- deadly-crazy fight.

Short rest. The attackers have kidnapped the baron's daughter! They flee on the water.

PCs get on boat and give chase (short rest).

3. Neried (36 EBP, hard-deadly) engages PC's boat.

PC continue chase (short rest).

4. Enemy boat is pulled up on a dock. They left 6 orcs behind to ambush PCs (24 EBP, medium encounter).

A boat with 20 guards (EBP 20) and a Guard Captain (EBP 12) arrives after the fight is finished, as they got going slower than the PCs did.

5. PCs catch up to fleeing bad guy. They are a mage (CR 6, EBP 30) with a veteran (EBP 18) and 10 orcs (EBP 40) with the daughter (Scout, CR 1/2, EBP 4, but restrained and unarmed). The guards engage the orcs while the PCs+Guard Captain have to fight the mage and veteran. (EBP 36, hard-deadly)

(each round 1d6 guards die and 1d3-1 orcs; if the PCs take too long, the orcs fall on them.)

6. Clean up leftover orcs. They flee if reduced to 3 or fewer orcs (EBP: 20ish)

Total budget: 155-175

Now just need to work out what happens if the PCs don't follow the railroad.

Last edited:

#### jsaving

PF2e is structured in a similar way (math wise) as 4e. You might give it a try.
PF2e brought in a fair number of 4e elements, from the abolition of free-form multiclassing to a simpler skill-point system to increased "guardrails" on player choice so you won't inadvertently create a gimped character. Some players who adopted PF1e because they disliked 4e are mystified by Paizo's decision to go in that direction (which they are now doubling down on with the recently announced promotion of 4e's design guru). But yes you are completely right that math structure is another area where PF2e drew from 4e.

#### briggart

##### Explorer
Kobold Press had a series of blog posts by Steve Winter discussing some of the math behind Monster Manual entries.

#### Saelorn

They only thing relevant that I remember off the top of my head was that: monsters are relatively weaker as they go up in CR. As PCs go up in level, the damage monsters do (at an equivalent CR) becomes a lower percentage of the PC's hit points.
Doesn't that balance against accuracy, though? At low levels, your AC is almost a reliable defense, but you can only take a couple of hits. At high levels, AC is unreliable, but you can take more hits before falling.

#### NotAYakk

I approached doing math from the encounter building perspective. I assumed the DMG knew what it was doing, and wanted an easier way to model it, build monsters, and use existing monsters.

I didn't model PCs. I wasn't intending on building ad-hoc PCs like I was monsters, and the PC building minigame wasn't somethinf I wanted to rake away from players.

But it is interesting.

What we could do is model the featless magic itemless pure fighter DPR over a model encounter day. 2 short rests, 5x hard enemies total. Champion and Battlemaster.

Some at-will some per-rest damage.

And the same with a Rogue.

#### miggyG777

##### Explorer
Anyhow, you can take the XP values of various CR monsters, raise it to the (3/4) power, then futz around with it and round it. You get something like:

CR 1/8: 1
CR 1/4: 2
CR 1/2: 4
CR 1: 6
CR 2: 9
CR 3: 12
CR 4-15ish: +6 per CR
CR 16-19: +9 per CR
CR 20: 140ish
CR 21+: +15 or 20, I forget, per CR
I tried to recreate this step, however I did not get these values when I raised the XP values by (3/4). What do you mean with "futz around with it"?

#### dave2008

##### Legend
Doesn't that balance against accuracy, though? At low levels, your AC is almost a reliable defense, but you can only take a couple of hits. At high levels, AC is unreliable, but you can take more hits before falling.
Possibly. That makes sense at first glance, but it was not part of the analysis I did (that I can remember). I wouldn't want to wholeheartedly agree without looking into more. And of course AC is a tricky one as it can vary quite a bit at higher levels (from less or more reliable than lower levels), so it really depends on a lot of factors (like many things at high levels)

#### NotAYakk

I tried to recreate this step, however I did not get these values when I raised the XP values by (3/4). What do you mean with "futz around with it"?
Sorry, it is 2/3 not 3/4. And it is a calculated XP, not the rounded XP on the table, I used to fit the curve.

If take DMG XP and I raise XP to the power 0.65 then divide so that CR 1 monsters are worth 12 EBP (divide by ... 2.6?), I get

 1 3 5 8 12 20 28 36 48 60 72 84 96 108 123 138 153 168 183 198 218 238 258 278 308 373 438 503 568 633 698 763 828 893
after some rounding and curve smoothing.

This is:
CR 0: 1
CR 1/8: 3
CR 1/4: 5
CR 1/2: 8
CR 1: 12
then +8 per CR up to 4:
CR 4: 36
then +12 CR up to 10:
CR 10: 108
CR 11: 123
Then +15 to CR up to 16:
CR 16: 198
Then +20 CR up to 20:
CR 17: 218
CR 20: 278
CR 21: 308
CR 22+: +65 per CR

The biggest changes here are that CR 1/8 and 1/4 are worth more, as are CR 2/3. It is also "double units" so I don't have to use fractions.

I think I over-rounded CR 1/8 and 1/4 before.

Bold parts above are where the derivative (slope) changes. They are at 1, 4, 10 and 16, and a bunch around 20 -- and 5, 11 and 17 may be familiar to people making 5e characters (points where cantrip damage scales up).

Last edited:

#### miggyG777

##### Explorer
Sorry, it is 2/3 not 3/4. And it is a calculated XP, not the rounded XP on the table, I used to fit the curve.

If take DMG XP and I raise XP to the power 0.65 then divide so that CR 1 monsters are worth 12 EBP (divide by ... 2.6?), I get

 1 3 5 8 12 20 28 36 48 60 72 84 96 108 123 138 153 168 183 198 218 238 258 278 308 373 438 503 568 633 698 763 828 893
after some rounding and curve smoothing.

This is:
CR 0: 1
CR 1/8: 3
CR 1/4: 5
CR 1/2: 8
CR 1: 12
then +8 per CR up to 4:
CR 4: 36
then +12 CR up to 10:
CR 10: 108
CR 11: 123
Then +15 to CR up to 16:
CR 16: 198
Then +20 CR up to 20:
CR 17: 218
CR 20: 278
CR 21: 308
CR 22+: +65 per CR

The biggest changes here are that CR 1/8 and 1/4 are worth more, as are CR 2/3. It is also "double units" so I don't have to use fractions.

I think I over-rounded CR 1/8 and 1/4 before.

Bold parts above are where the derivative (slope) changes. They are at 1, 4, 10 and 16, and a bunch around 20 -- and 5, 11 and 17 may be familiar to people making 5e characters (points where cantrip damage scales up).
Thanks a lot, this might be one of the most useful things I have learned about 5e so far. I still have some more minor questions though, if you don't mind.

1) How did you calculate the XP progression?
2) Why did you divide the numbers so CR1 = 12 EBP?
3) How did you figure out that the power of (2/3) gets rid of the XP multipliers?

Last edited:

#### NotAYakk

I copied XP progression from the DMG chart. I played with exponents until I got a roughly linear set of values from 1 to 20.

I was trying to go from raw stats to CR at the time, and after noticing the raw stats to XP connection, I figured converting XP to XR would help.

The values where not quite linear, so I examined how. Setting CR 1 to a multiple of 3 was because 1/2 and 1/4 was roughly 2/3 and 1/3 of the calue for 1.

Setting CR 1 to 12 gives really low percent errors for CR 1/8, 1/4, 1/2 and 1 as integers.

Then it is just some curve fitting. It was in my response that I noticed that putting inflection points at 5/11/17 and 20ish worked well.

The "just add them up" was a goal of mine. From looking at 4e CR I knew you can do lots to make that work.

I'll have to confirm that adding them up does the right thing with these numbers. But the test isn't that hard; take 12 CR 1/8 (36 EBP, which is CR 4). And use DMG to calculate XP multiplier etc. Then compare witb XP of CR 4 monster.

Repeat a few times.

#### miggyG777

##### Explorer
I copied XP progression from the DMG chart. I played with exponents until I got a roughly linear set of values from 1 to 20.

I was trying to go from raw stats to CR at the time, and after noticing the raw stats to XP connection, I figured converting XP to XR would help.

The values where not quite linear, so I examined how. Setting CR 1 to a multiple of 3 was because 1/2 and 1/4 was roughly 2/3 and 1/3 of the calue for 1.

Setting CR 1 to 12 gives really low percent errors for CR 1/8, 1/4, 1/2 and 1 as integers.

Then it is just some curve fitting. It was in my response that I noticed that putting inflection points at 5/11/17 and 20ish worked well.

The "just add them up" was a goal of mine. From looking at 4e CR I knew you can do lots to make that work.

I'll have to confirm that adding them up does the right thing with these numbers. But the test isn't that hard; take 12 CR 1/8 (36 EBP, which is CR 4). And use DMG to calculate XP multiplier etc. Then compare witb XP of CR 4 monster.

Repeat a few times.
Thanks, I am testing it right now, so far it seems to hold up quite well. There is a bit of a deviation though, sometimes more sometimes less (I would say <10%, just from eyeballing it), which still is absolutely amazing given the simplification of the process.

Last edited:

#### Charlaquin

##### Goblin Queen
I am currently trying to dive deeper into the mechanics behind 5e. I was fascinated with PF2s structured approach in this regard and therefore wanted to see how my favorite system (5e) compares to it.

5e overall is a little bit harder to understand, mainly because the material is not always thoroughly informative on how the underlying mechanics are implemented. Therefore you have to resort to reverse engineering to understand the actually quite beautiful mechanics that 5e employs.

Example: The monster building tutorial as outlined in the DMG is superficial at best, when it comes to explaining the reasoning behind why certain things are the way they are. The AngryGM wrote a good article on this, where he goes past the DMG and uncovers what lies beyond Monster Building 201: The D&D Monster Dissection Lab

Obviously not all concepts in 5e need this sort of reverse engineering to understand and are quite self explanatory, such as Bounded Accuracy.

But I still have some things that I want to learn.

For instance: How does HP and damage scale? For players and for monsters. This should tell me how long it takes the party to kill an appropriate level monster on average. That will allow me to understand the resource draining mechanics better and improve my own encounter building.

The monster scaling is outlined in the DMG, unfortunately the infos for the player character side are lacking, I found some spreadsheets but they are not as conclusive as I wish them to be. Therefore I do not know how much damage a player will do on average, at a certain level, and I cant infer the average TTK that the creators of 5e envisioned. That TTK is needed to calculate how much damage a certain monster will deal to a character on average, hence the resource draining.

The obvious approach here would be to reverse engineer as mentioned beforehand, but I'd be surprised if nobody had ever thought about this before. However, I haven't really found anything in the net yet. That's why I am asking you guys. Do you have good materials on the underlying mechanics of 5e? Maybe even something that deals with resource draining and encounter building? Perhaps I have missed something.
You should check out Angry’s more recent articles on monster building where he basically redesigns encounter balancing based on the principles of monsters’ and PCs’ expected TTKs and DPRs. He glosses over most of the math, so they probably won’t be super helpful in revealing those underlying mathematical assumptions, but he produces a system that works well based on those principles, and it might be another useful datapoint in reverse-engineering those values.

#### miggyG777

##### Explorer
You should check out Angry’s more recent articles on monster building where he basically redesigns encounter balancing based on the principles of monsters’ and PCs’ expected TTKs and DPRs. He glosses over most of the math, so they probably won’t be super helpful in revealing those underlying mathematical assumptions, but he produces a system that works well based on those principles, and it might be another useful datapoint in reverse-engineering those values.

I have read these. Unfortunately his monster building table, that arguably is pretty simple, is not very well suited for varying party sizes. As far as I can tell.