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 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 % (see List of Synergies section)

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
- ...
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
List of SD Bonuses
Besides the modifier
xx % to yy Spell Damage
there are quite some and buffs/auras/passives that affect the SD percentage.Assassin:
Way of the Spider: adds 1.5% Poison Spell Damage per Skill level
Way of the Phoenix: adds 1.5% Fire Spell Damage per Skill level
Way of the Gryphon: adds 1.5% Lightning Spell Damage per Skill level
Amazon:
Innate skill Bloodlust increases Spell damage (excluding Poison) by 10%.
This Value can be changed by equipping items with
xx % Elemental Damage to Bloodlust
Aura from Uber Skill SoV gives 10% +3% per additional skill level to fire and phys/mag Spell Damage.
Barbarian:
Protector Spirits Bloodlust gives 5% + 1.25%(skill level-2) to elemental Spell Damages.
Druid:
Innate Skill Mark of the Wild: Increases Elemental Spell Damages by 10%. This Value can be changed by equipping items with
xx % Elemental Damage to Mark of the Wild
Aura from Acid Fiends: Aura of the Acid Fiends increases Spell Damage depending on skill lvl with diminishing returns.
Symbiosys/Mythal: Full skilled Symbiosys will add 5% Ligthning and Cold Spell Damage per Mythal Base level.
Vine Companion: Aura that Increases fsd by 3% per Base Point in RoF/Elemental and 3% psd per Base point in Poison Flash/Plague Avatar
Necromancer:
Death Pact adds min(150, floor[DPM*MBP]) % to spell damage where
DPM = 1+0.025*Death_Pact_blvl
and MBP is the amount of base points you put into the Malice Tree.Paladin:
Superbeast adds xx% to Spell Damage depending on skill level with diminishing returns
Solar Flare adds 5% to Fire, Cold and phys/mag Spell Damage per Incarnation base level but locks out all non Dragon Tree Spells.
Sorceress:
Firedance: Buffing Ring of Fire that increases Spell Damage by 20% on first +1.5 % per every additional skill level.
O-Skills
The O-skill versions of the Innate Buffing skills often scale with skill level and may differ in the Damage types they buff.
Of course there are a lot of other O-skills that buff Spell Damage
► Show Spoiler
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
+(21 to 25) Energy Factor to Spell Damage
+1 to All Skills
+1 to Necromancer Skill Levels
Enhanced Weapon Damage +0.25% (Based on Character Level)
Required Level: 115
Keep in Inventory to Gain Bonus
+(21 to 25) Energy Factor to Spell Damage
+1 to All Skills
+1 to Necromancer Skill Levels
Enhanced Weapon Damage +0.25% (Based on Character Level)
Silver Seal of Ureh
, 
Silver Seal of Ureh
Required Level: 120
Keep in Inventory to Gain Bonus
+(21 to 30) Energy Factor to Spell Damage
+1 to All Skills
+(21 to 25)% 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
+(21 to 30) Energy Factor to Spell Damage
+1 to All Skills
+(21 to 25)% 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
Required Level: 110
Keep in Inventory to Gain Bonus
+(21 to 25) Energy Factor to Spell Damage
+1 to Jitan's Gate
Maximum Skill Level Increased by 1
Half Freeze Duration
Required Level: 110
Keep in Inventory to Gain Bonus
+(21 to 25) Energy Factor to Spell Damage
+1 to Jitan's Gate
Maximum Skill Level Increased by 1
Half Freeze Duration
The Sleep
with CoL trophy, 
The Sleep
Required Level: 125
Cube with Trophy to Awaken
Keep in Inventory to Gain Bonus
Required Level: 125
Cube with Trophy to Awaken
Keep in Inventory to Gain Bonus
Nexus Crystal
)
Nexus Crystal
(Sorceress Challenge Item)
(Sorceress Only)
Required Level: 90
Keep in Inventory to Gain Bonus
Unlocks your Ennead Skill
+15% Bonus to Energy Factor
+2 to Sorceress Skill Levels
+15% to Spell Damage
Poison Length Reduced by 33%
(Sorceress Challenge Item)
(Sorceress Only)
Required Level: 90
Keep in Inventory to Gain Bonus
Unlocks your Ennead Skill
+15% Bonus to Energy Factor
+2 to Sorceress Skill Levels
+15% to Spell Damage
Poison Length Reduced by 33%
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: 60
Item Level: 16
+(3 to 5)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(6 to 8)% to Fire Spell Damage
+(6 to 8)% to Poison Spell Damage
+(11 to 13)% to Physical/Magic 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: 84
Item Level: 32
+(9 to 11)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(10 to 12)% to Fire Spell Damage
+(10 to 12)% to Poison Spell Damage
+(15 to 17)% to Physical/Magic 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: 164
Item Level: 51
+(15 to 17)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(14 to 16)% to Fire Spell Damage
+(14 to 16)% to Poison Spell Damage
+(19 to 21)% to Physical/Magic 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: 292
Item Level: 86
+(18 to 20)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(18 to 20)% to Fire Spell Damage
+(18 to 20)% to Poison Spell Damage
+(23 to 25)% to Physical/Magic 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: 60
Item Level: 16
+(3 to 5)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(6 to 8)% to Fire Spell Damage
+(6 to 8)% to Poison Spell Damage
+(11 to 13)% to Physical/Magic 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: 84
Item Level: 32
+(9 to 11)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(10 to 12)% to Fire Spell Damage
+(10 to 12)% to Poison Spell Damage
+(15 to 17)% to Physical/Magic 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: 164
Item Level: 51
+(15 to 17)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(14 to 16)% to Fire Spell Damage
+(14 to 16)% to Poison Spell Damage
+(19 to 21)% to Physical/Magic 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: 292
Item Level: 86
+(18 to 20)% Bonus to Energy Factor
(0 to 40)% Movement Speed
+(18 to 20)% to Fire Spell Damage
+(18 to 20)% to Poison Spell Damage
+(23 to 25)% to Physical/Magic 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: (6084 - 6876) to (7456 - 8427)
Required Level: 100
Required Strength: 428
Item Level: 105
+(11 to 20)% Bonus to Energy Factor
25% Cast Speed
+(21 to 30)% to Spell Damage
+(115 to 143)% Enhanced Defense
+100 to Strength
+100 to Energy
Elemental Resists +20%
Total Character Defense 50%
+250 Life after each Demon Kill
Requirements -33%
Socketed (6)
Full Plate Mail (Sacred)
Defense: (6084 - 6876) to (7456 - 8427)
Required Level: 100
Required Strength: 428
Item Level: 105
+(11 to 20)% Bonus to Energy Factor
25% Cast Speed
+(21 to 30)% to Spell Damage
+(115 to 143)% Enhanced Defense
+100 to Strength
+100 to Energy
Elemental Resists +20%
Total Character Defense 50%
+250 Life after each Demon Kill
Requirements -33%
Socketed (6)
Auriel's Focus
,...) 
Auriel's Focus
Mystic Orb
Cube Reagent
Cube with Any Armor to Add Bonus
+2% Bonus to Energy Factor
+25% Enhanced Defense
+20 to Energy
Poison Length Reduced by 5%
+10 Required Level
Mystic Orb
Cube Reagent
Cube with Any Armor to Add Bonus
+2% Bonus to Energy Factor
+25% Enhanced Defense
+20 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
Cube Reagent
Cube with Any Weapon to Add Bonus
+10 Strength Factor to Spell Damage
+10 Energy Factor to Spell Damage
+50% Damage to Demons
+3% to Spell Damage
+10 Required Level
Mystic Orb
Cube Reagent
Cube with Any Weapon to Add Bonus
+10 Strength Factor to Spell Damage
+10 Energy Factor to Spell Damage
+50% Damage to Demons
+3% to Spell Damage
+10 Required Level
Lone Wolf's Path
.Lone Wolf's Path
Druid Elemental Set
Lone Wolf's Maul
Lone Wolf's Fur
Lone Wolf's Claws
Lone Wolf's Track
Set Bonus with 2 or more set items:
+150 Strength Factor to Spell Damage
+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/Elemental Projectile
+6 to Druid Skill Levels
-30% to Enemy Fire Resistance
-30% to Enemy Cold Resistance
+19 to Nova Charge
+400 to Life
Druid Elemental Set
Lone Wolf's Maul
Lone Wolf's Fur
Lone Wolf's Claws
Lone Wolf's Track
Set Bonus with 2 or more set items:
+150 Strength Factor to Spell Damage
+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/Elemental Projectile
+6 to Druid Skill Levels
-30% to Enemy Fire Resistance
-30% to Enemy Cold Resistance
+19 to Nova Charge
+400 to Life
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 6% 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:
Tiefling Form adds 3 Energy Factor to Spell Damage per skill level.
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:
Tainted Blood grants 10 EF per base lvl
Not synergy percentage but:
Life & Death adds 10% on first and 6% on every additional slvl as an overall multiplier to VoJ
Solstice & Equinox adds 10% on first and 6% on every additional slvl as an overall multiplier to VoR
Sorceress:
Vengeful Power in Poison Tree adds 2% to Synergy Bonus per level for 5 seconds after being hit
Uber Skill Witch Blood adds 4% Synergy Bonus to sorc spells per level if your HP is above 90%.
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
Basic Examples
[WIP]
Oskill caster Assassin
► Show Spoiler
Ele Caster Sorc
► Show Spoiler
Summon/Caster Barb
► Show Spoiler
Ele Caster Druid
► Show Spoiler
Neutral Caster Paladin
► Show Spoiler
Orange Text Modifiers on Items
I will only give some examples on how those modifiers work/intended to work or what I think they do
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.18 per Strength)%
Holy: Plague Deals 150% More Total Damage
Unholy: Blood Thorns Deal 40% More Total Damage
Neutrality: +50% Total Vessel Damage Bonus from Passives
+50% Damage to Undead
Adds 350-650 fire damage
Adds 1-1200 lightning damage
Adds 400-500 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.18 per Strength)%
Holy: Plague Deals 150% More Total Damage
Unholy: Blood Thorns Deal 40% More Total Damage
Neutrality: +50% Total Vessel Damage Bonus from Passives
+50% Damage to Undead
Adds 350-650 fire damage
Adds 1-1200 lightning damage
Adds 400-500 cold damage
+800 poison damage over 1 seconds
-(15 to 25)% to Enemy Elemental Resistances
Socketed (3)
- adds 40% Total Bonus to Blood Thorns if you go Unholy.
- Increases the Bonus of Vessel Passives by total 50% (S&E, L&D) if you go neutral.
SU
Gromotvod

Gromotvod
Coronet (Sacred)
Defense: 605 to 684
(Amazon Only)
Required Level: 100
Required Dexterity: 327
Item Level: 105
+3% Lightning Spell Damage per Spirit of Vengeance Skill Level
+(2 to 3) to Amazon Skill Levels
(20 to 40)% Cast Speed
-(5 to 15)% to Enemy Lightning Resistance
Maximum Lightning Resist +(1 to 2)%
Physical Resist (5 to 10)%
+(20 to 60) Life after each Kill
Socketed (4)
Coronet (Sacred)
Defense: 605 to 684
(Amazon Only)
Required Level: 100
Required Dexterity: 327
Item Level: 105
+3% Lightning Spell Damage per Spirit of Vengeance Skill Level
+(2 to 3) to Amazon Skill Levels
(20 to 40)% Cast Speed
-(5 to 15)% to Enemy Lightning Resistance
Maximum Lightning Resist +(1 to 2)%
Physical Resist (5 to 10)%
+(20 to 60) Life after each Kill
Socketed (4)
- adds 3% Lightning Spell Damage per SoV Skill level
► Show Spoiler
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)