# Formulas for D&D



## thol (Jun 7, 2005)

Does anyone have a link to a listing of the fomulas used for calculating things like ability score bonus, saves, etc.?

If there is no link that anyone knows of, can someone post them quick if they know them. I could figure them all out but if someone has them handy it would save me some time.


----------



## dcollins (Jun 7, 2005)

On my website, I have a document called "Math Formulas for D&D". Look about 6 items down on this page: http://superdan.net.home.comcast.net/dnd3.html


----------



## thol (Jun 7, 2005)

Thanks a bunch! Saves me a lot of time!    

I can always count on ENWorld.


----------



## thol (Jun 7, 2005)

Something you might want to fix on your document.

The formula for ability modifiers is off just a little. You end up with 3 ability mods of 0.

Looks like you need to do:

modifier = (ability / 2.1) - 5

and round to the nearest whole number


----------



## Pinotage (Jun 7, 2005)

3 ability modifiers of 0?

Ability/2 -5 is the official formula. Can you give an example of those 3 which give 0. My calculations only give 2, for 10 and 11. Remember in D&D math you always round down.

Pinotage


----------



## dcollins (Jun 7, 2005)

thol said:
			
		

> The formula for ability modifiers is off just a little. You end up with 3 ability mods of 0. Looks like you need to do: modifier = (ability / 2.1) - 5... and round to the nearest whole number




Let me guess what your problem really is: you're implementing this in a computer language, and unfortunately when you truncate a negative number, the result is effectively rounding up. (For example: 9/2 - 5 = -0.5 -> truncates to 0.)

EDIT: So make sure you do the truncation before you do the subtraction.


----------



## Henry (Jun 7, 2005)

thol said:
			
		

> Looks like you need to do:
> 
> modifier = (ability / 2.1) - 5
> 
> and round to the nearest whole number




Not sure what you mean by that; it should be 

modifier = INT(ability / 2) - 5, which is valid for ability scores from 1 on up.


----------



## thol (Jun 7, 2005)

I was forgetting about INT.

In Excel, if you do Ability/2 -5 and Rounddown you end up with this string of mods for 1 to 20:

-4 -4 -3 -3 -2 -2 -1 -1 0 0 0 1 1 2 2 3 3 4 4 5

If you just Round, you end up with:

-5 -4 -4 -3 -3 -2 -2 -1 -1 0 1 1 2 2 3 3 4 4 5 5

That's why I was confused. I shouldn't try to do math before noon.


----------



## thol (Jun 7, 2005)

Are there any formulas for the Spell Charts? They seem pretty wacky, especially the Sorcerer Spells Known table.


----------



## Darkness (Jun 7, 2005)

thol said:
			
		

> In Excel, if you do Ability/2 -5 and Rounddown you end up with this string of mods for 1 to 20:
> 
> -4 -4 -3 -3 -2 -2 -1 -1 0 0 0 1 1 2 2 3 3 4 4 5
> 
> ...



 Yep. In my chargen spreadsheet, I solved it by having Excel use an IF function first that leads to two slightly different formulas (one for >11, one for <11).


----------



## thol (Jun 7, 2005)

You can use INT in Excel.


----------



## Darkness (Jun 7, 2005)

thol said:
			
		

> You can use INT in Excel.



 Of course you can - I was just thinking out loud about how I handled it back when I forgot about it.


----------



## dcollins (Jun 7, 2005)

thol said:
			
		

> Are there any formulas for the Spell Charts? They seem pretty wacky, especially the Sorcerer Spells Known table.




Actually, it looks regular enough to create a formula, not that I've done that to date. Admittedly if I were doing a computer version I'd just input the whole table as-is.


----------



## dvvega (Jun 8, 2005)

I once worked out the spell chart formulas. Lost them in the great hard drive crash of 2003.

It isn't a big deal working it out again.

D


----------



## Ballard_Alvar (Jun 8, 2005)

thol said:
			
		

> Are there any formulas for the Spell Charts? They seem pretty wacky, especially the Sorcerer Spells Known table.




8+2/level for spells know, spells per day there doesn't seem to be a set formula that i can readaly determine.  if you wonder what is the max level spell for a wizard, divide wizards level by 2, add 1, rd down. so a 9th level wizard can cast 5th level spells.  for sorcs. subtract 1 then divide by 2 then add 1 per sorcs are always 1 behind the wiz. (Sorclvl-1)/2+1=(Max spll lvl able to cast), (Wizlvl)/2+1=(Max spll lvl able to cast) conversley (Target Spl lvl-1)*2=(Wiz lvl able to cast) etc.  Was that coherant?


----------



## Ferret (Jun 8, 2005)

Coherent enough, thanks


----------



## styopa (Feb 25, 2015)

The trick is to rounddown((stat)/2) and THEN subtract 5.  I know, necro thread but people are building these for 5e now and it might be useful.


----------

