How Spell Damage is calculated
Why this post?
If you want to optimize/min-max your (caster)-build or to gear your A3 merc properly, it would be really nice to know how the total damage output of a certain spell is calculated.
This may be common knowledge to experienced players but I think this can help new players.
What kind of Spells are out there?
- Spells that scale only with hard points of stats like Psicrown or Psionic Storm
- Spells that has to be cast but actually do wdm Damage like Fairy Ring
- Spells that scale with at least one type of Spell Damage and Synergies (and may have to be triggered by attacks)
- ...

Of course most of the Spells if not all get better with base points and soft points put into the skill.
What is the big Formula?
I really appreciate the presence of the skill calculator but unfortunately it is outdated.
I assumed, that the overall mechanic did not change and played around with numbers on many skills and came up with following result:

TD: Total Damage of Spell per cast/projectile/missile/arbitrary time-unit
BD: Base Damage that depends on base and soft skill level and char lvl (only devs and smarter people know those numbers and its progression)
SD: The Spell Damage Bonus of the corresponding type (fire, cold, light, ...) in %
Synergie: The Sum of all Synergies to the Spell in %
Some skill descriptions (e.g. Witchblood) sounds like a third overall multiplier is applied to the Formula but the only way to do this is equipping an item with an Orange Modifier that does so.
[edit] the numbers from the following tests I got from Median 2017 but the mechanics did not change [edit]
I made a test sorc on SP to get in-game numbers. I only skilled Flamefront to 22 and crafted test-gear to get the following max Damage numbers:

so apart from some strange small offsets and rounding issues due to d2 engine number handling, the formula seems to be right.
I did this with several other spells on different chars and got similar results.
What does affect the SD and Synergy ?
SD:
- Modifier + xx% to corresponding Spell damage
- Buffing auras like Demon Blood Aura from Flayers or Avenging Aura from SoV
- Buffing Skills that can be cast on players like Bloodlust, MotW, ...
- Buffing Skills like Superbeast morph or Symbiosis
- Some Passives that add Damage Bonus to corresponding Skill like Life and Death/Solstice and Equinox
- ...
Synergy:
- Synergies from Stats and Spell Damage Factors Like EF and SF
- Synergy Skills like Bachanallia or Nightwalker or Witch Blood
- ...


Other things:
Of course there are other things that actually increase the DPS like less frames per cast, more missiles of spell, pierce (in case of elemental spells) and more, but they do not change the displayed number.
Increased Poison skill duration certainly increases the total damage output but not per second.
► Show Spoiler
Nice theory, but what shall I do?
I will only give an advice in terms of balancing Synergy and Spell Damage. I assume that in this process the skill level,the pierce (in case of elemental spells) and the achieved speed breakpoints will not suffer.
There is a simple rule:
If possible, keep both multipliers on the same level
speaking in numbers:
SD=Synergy=400 is better than SD=500 and Synergy=300. It is total factor of 25 against total factor of 24 so a real TD increase of 4.16%. So it can be good to sacrifice some SD to increase Synergy.
Or to rephrase it: when you have the choice of either increasing SD or Synergy by the same amount, always increase the lower stat of both.
List of Synergy Bonuses
I am aware of the fact that SD is much more present than the synergy bonus. So I try to compile a list with all Synergies to spell damages.
Stat Synergy:
Take a look at the skill description of your spell. At the bottom you might find a line
stat: xx % Increased Damage
where stat can be one or two of (ene,str,dex).Examples for not(only) ene:
► Show Spoiler
The Stat Synergy Bonus in % is calculated with
260*(10+stat)/(250+stat)
. In case of two stats granting the synergy, stat has to be replaced by the sum of them.
Early on this Synergy is probably the highest one:
stat = 140 gives 100 %
stat = 790 gives 200 %
It has heavy diminishing returns and only in theory can be pushed to 259 % ( @stat = 62150 )

Factor Synergy:
The Factor Synergy in % is calculated the following way
min[(str*SF+ene*EF)/15000 , 200]
.So Factor parts adds and scale linear in the stat and factor itself but the sum has a hard cap at 200%. In other words: If you have 4000 Energy and 750 EF getting SF will do nothing.
Getting EF:
Most common ways are MOs on weaopns ( 8 EF for 4 req lvls) and jewels that can spawn with up to 15 EF.
EF can spawn as an affix on many other items
EF is a modifier of Eerie Shrines
EF can be found as an modifier on many Sacred Uniques
Some Charms (
Hammer of the Taan Judges
, 
Hammer of the Taan Judges
Required Level: 115
Keep in Inventory to Gain Bonus
+1 to All Skills
+1 to Necromancer Skill Levels
+(21 to 25) Spell Focus
Weapon Physical Damage +0.1875% (Based on Character Level)
Required Level: 115
Keep in Inventory to Gain Bonus
+1 to All Skills
+1 to Necromancer Skill Levels
+(21 to 25) Spell Focus
Weapon Physical Damage +0.1875% (Based on Character Level)
Silver Seal of Ureh
, 
Silver Seal of Ureh
Required Level: 120
Keep in Inventory to Gain Bonus
+1 to All Skills
+(21 to 30) Spell Focus
+(11 to 13)% to Summoned Minion Damage
+(11 to 15)% to Summoned Minion Resistances
+(11 to 20) to Strength
+(11 to 20) to Dexterity
+(11 to 20) to Vitality
+(11 to 20) to Energy
Required Level: 120
Keep in Inventory to Gain Bonus
+1 to All Skills
+(21 to 30) Spell Focus
+(11 to 13)% to Summoned Minion Damage
+(11 to 15)% to Summoned Minion Resistances
+(11 to 20) to Strength
+(11 to 20) to Dexterity
+(11 to 20) to Vitality
+(11 to 20) to Energy
Moon of the Spider
, 
Moon of the Spider
By Richard Knaak
Required Level: 110
Keep in Inventory to Gain Bonus
+(21 to 25) Spell Focus
+1 to Jitan's Gate
Half Freeze Duration
By Richard Knaak
Required Level: 110
Keep in Inventory to Gain Bonus
+(21 to 25) Spell Focus
+1 to Jitan's Gate
Half Freeze Duration
The Sleep
with CoL trophy, 
The Sleep
Required Level: 125
Cube After Completing a Trophy Challenge to Awaken
Disenchant to open a portal to the World Nexus
Keep in Inventory to Gain Bonus
Maximum Fire Resist +(0 to 1)%
Maximum Lightning Resist +(0 to 1)%
Maximum Cold Resist +(0 to 1)%
Maximum Poison Resist +(0 to 1)%
Required Level: 125
Cube After Completing a Trophy Challenge to Awaken
Disenchant to open a portal to the World Nexus
Keep in Inventory to Gain Bonus
Maximum Fire Resist +(0 to 1)%
Maximum Lightning Resist +(0 to 1)%
Maximum Cold Resist +(0 to 1)%
Maximum Poison Resist +(0 to 1)%
Nexus Crystal
)
Nexus Crystal
(Sorceress Challenge Item)
(Sorceress Only)
Required Level: 90
Keep in Inventory to Gain Bonus
Unlocks your Ennead Skill
+2 to Sorceress Skill Levels
+15% Bonus to Spell Focus
+15% to Spell Damage
(Sorceress Challenge Item)
(Sorceress Only)
Required Level: 90
Keep in Inventory to Gain Bonus
Unlocks your Ennead Skill
+2 to Sorceress Skill Levels
+15% Bonus to Spell Focus
+15% to Spell Damage
Items with the modifier xx% Bonus to Energy Factor (
Wake of Destruction
,
Wake of Destruction
Greaves (4)
Defense: (90 - 102) to (135 - 152)
Required Level: 9
Required Strength: 17
Item Level: 19
+(4 to 6)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(11 to 13)% to Physical/Magic Spell Damage
+(6 to 8)% to Fire Spell Damage
+(6 to 8)% to Poison Spell Damage
+(24 to 40)% Enhanced Defense
+(21 to 25) to Energy
Requirements -20%
Socketed (1)
Defense: (333 - 369) to (462 - 512)
Required Level: 27
Required Strength: 33
Item Level: 36
+(7 to 9)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(15 to 17)% to Physical/Magic Spell Damage
+(10 to 12)% to Fire Spell Damage
+(10 to 12)% to Poison Spell Damage
+(58 to 75)% Enhanced Defense
+(26 to 30) to Energy
Requirements -25%
Socketed (2)
Defense: (854 - 930) to (1152 - 1254)
Required Level: 44
Required Strength: 158
Item Level: 59
+(10 to 12)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(19 to 21)% to Physical/Magic Spell Damage
+(14 to 16)% to Fire Spell Damage
+(14 to 16)% to Poison Spell Damage
+(92 to 109)% Enhanced Defense
+(31 to 35) to Energy
Requirements -30%
Socketed (3)
Defense: (1274 - 1378) to (1713 - 1853)
Required Level: 52
Required Strength: 272
Item Level: 85
+(13 to 15)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(23 to 25)% to Physical/Magic Spell Damage
+(18 to 20)% to Fire Spell Damage
+(18 to 20)% to Poison Spell Damage
+(109 to 126)% Enhanced Defense
+(36 to 40) to Energy
Requirements -40%
Socketed (4)
Greaves (4)
Defense: (90 - 102) to (135 - 152)
Required Level: 9
Required Strength: 17
Item Level: 19
+(4 to 6)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(11 to 13)% to Physical/Magic Spell Damage
+(6 to 8)% to Fire Spell Damage
+(6 to 8)% to Poison Spell Damage
+(24 to 40)% Enhanced Defense
+(21 to 25) to Energy
Requirements -20%
Socketed (1)
Defense: (333 - 369) to (462 - 512)
Required Level: 27
Required Strength: 33
Item Level: 36
+(7 to 9)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(15 to 17)% to Physical/Magic Spell Damage
+(10 to 12)% to Fire Spell Damage
+(10 to 12)% to Poison Spell Damage
+(58 to 75)% Enhanced Defense
+(26 to 30) to Energy
Requirements -25%
Socketed (2)
Defense: (854 - 930) to (1152 - 1254)
Required Level: 44
Required Strength: 158
Item Level: 59
+(10 to 12)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(19 to 21)% to Physical/Magic Spell Damage
+(14 to 16)% to Fire Spell Damage
+(14 to 16)% to Poison Spell Damage
+(92 to 109)% Enhanced Defense
+(31 to 35) to Energy
Requirements -30%
Socketed (3)
Defense: (1274 - 1378) to (1713 - 1853)
Required Level: 52
Required Strength: 272
Item Level: 85
+(13 to 15)% Bonus to Spell Focus
(10 to 40)% Movement Speed
+(23 to 25)% to Physical/Magic Spell Damage
+(18 to 20)% to Fire Spell Damage
+(18 to 20)% to Poison Spell Damage
+(109 to 126)% Enhanced Defense
+(36 to 40) to Energy
Requirements -40%
Socketed (4)
Robe of Steel
,
Robe of Steel
Full Plate Mail (Sacred)
Defense: (6692 - 7471) to (8202 - 9156)
Required Level: 100
Required Strength: 469
Item Level: 105
+(11 to 20)% Bonus to Spell Focus
25% Cast Speed
+(21 to 30)% to Spell Damage
+(115 to 140)% Enhanced Defense
+100 to Strength
+100 to Energy
Elemental Resists +20%
+250 Life after each Demon Kill
50% Bonus to Defense
Requirements -33%
Socketed (6)
Full Plate Mail (Sacred)
Defense: (6692 - 7471) to (8202 - 9156)
Required Level: 100
Required Strength: 469
Item Level: 105
+(11 to 20)% Bonus to Spell Focus
25% Cast Speed
+(21 to 30)% to Spell Damage
+(115 to 140)% Enhanced Defense
+100 to Strength
+100 to Energy
Elemental Resists +20%
+250 Life after each Demon Kill
50% Bonus to Defense
Requirements -33%
Socketed (6)
Auriel's Focus
,...) 
Auriel's Focus
Mystic Orb
Right-Click to Apply
+2% Bonus to Spell Focus
+25% Enhanced Defense
+15 to Energy
Poison Length Reduced by 5%
+10 Required Level
Mystic Orb
Right-Click to Apply
+2% Bonus to Spell Focus
+25% Enhanced Defense
+15 to Energy
Poison Length Reduced by 5%
+10 Required Level
Getting SF:
SF is much rarer and can be found on some Sacred Uniques,
Uldyssian's Spirit
, 
Uldyssian's Spirit
Mystic Orb
Right-Click to Apply
+15 Spell Focus
+30% Damage to Demons
+3% to Spell Damage
+10 Required Level
Mystic Orb
Right-Click to Apply
+15 Spell Focus
+30% Damage to Demons
+3% to Spell Damage
+10 Required Level
Lone Wolf's Path
and on Lone Wolf's Path
(Druid Seer Set)
Lone Wolf's Claws
Lone Wolf's Fur
Lone Wolf's Maul
Lone Wolf's Track
Set Bonus with 2 or more set items:
+150 Spell Focus
+14 to Firedance
Set Bonus with 3 or more set items:
+50% to Poison Spell Damage
Poison Resist +50%
Set Bonus with complete set:
+1 Hunting Banshee/Ember Spirit Projectile
+6 to Druid Skill Levels
-30% to Enemy Fire Resistance
-30% to Enemy Cold Resistance
+19 to Nova Charge
+400 to Life
(Druid Seer Set)
Lone Wolf's Claws
Lone Wolf's Fur
Lone Wolf's Maul
Lone Wolf's Track
Set Bonus with 2 or more set items:
+150 Spell Focus
+14 to Firedance
Set Bonus with 3 or more set items:
+50% to Poison Spell Damage
Poison Resist +50%
Set Bonus with complete set:
+1 Hunting Banshee/Ember Spirit Projectile
+6 to Druid Skill Levels
-30% to Enemy Fire Resistance
-30% to Enemy Cold Resistance
+19 to Nova Charge
+400 to Life
Yaerius' Xyston
.Barb (Shamanic Trance) and Druid (Force of Nature) however have access to this modifier due to a skill.

char specific Synergy Skills
Amazon:
The Bachanallia skill of the blood tree. It adds 10% to the synergy bonus to Blood skills per base level if below 2/3 of max life or when Blood Fury is active.
► Show Spoiler
Assassin:
Barbarian:
Shamanic Trance in Spirit tree adds 5 SF for every Base level in Spirit tree.
Druid:
Uber Skill Force of Nature adds SF with diminishing returns
► Show Spoiler
Necromancer:
Nightwalker in Malice tree adds 4% to Synergy Bonus of Malice Spells per Base lvl.
Paladin:
Sorceress:
Vengeful Power in Poison Tree adds 2% to Synergy Bonus per level for 5 seconds after being hit
Uber Skill Witch Blood gives you 4% Synergy Bonus to sorc spells per level if your HP is above 90%.
Orange Text Modifiers on Items
I will complete this list, when the BBcode for new items is working
There are many new items in Sigma with modifiers that cannot be obtained by 'regular' gear. If they are kind of unique they are written in Orange. The following list tries to give an overview over Modifiers that affect Spell Damages.
SU
Adjudicator

Adjudicator
Goedendag (Sacred)
One-Hand Damage: 53 to 54
(Paladin Only)
Required Level: 100
Required Strength: 574
Item Level: 120
Strength Damage Bonus: (0.14 per Strength)%
Holy: Holy Fire Deals 4.5% of Strength as More Total Damage (max 250%)
Unholy: Blood Thorns: +40% Damage Multiplier
Nephalem: +25% Total Vessel Damage Bonus from Passives
+1 to Paladin Skill Levels
Adds 175-325 Fire Damage
Adds 1-600 Lightning Damage
Adds 200-250 Cold Damage
+800 Poison Damage over 1 seconds
-(15 to 25)% to Enemy Elemental Resistances
Socketed (3)
Goedendag (Sacred)
One-Hand Damage: 53 to 54
(Paladin Only)
Required Level: 100
Required Strength: 574
Item Level: 120
Strength Damage Bonus: (0.14 per Strength)%
Holy: Holy Fire Deals 4.5% of Strength as More Total Damage (max 250%)
Unholy: Blood Thorns: +40% Damage Multiplier
Nephalem: +25% Total Vessel Damage Bonus from Passives
+1 to Paladin Skill Levels
Adds 175-325 Fire Damage
Adds 1-600 Lightning Damage
Adds 200-250 Cold Damage
+800 Poison Damage over 1 seconds
-(15 to 25)% to Enemy Elemental Resistances
Socketed (3)
- adds 30% Total Bonus to Blood Thorns if you go Unholy.
- Adds 200% to SD Percentage for Vessels if you go neutral.
How to Gear my A3 merc?
► Show Spoiler
thanks to:
suchbalance for the skill calculator
the whole mxl dev team for this mod
the people who made the wiki that unfortunately is out of date at some points (but someday will be great)