For these two spells, the formula for your average damage is as follows:
F + FLOOR(S * D * P / 1000 + P / 4)
Where:
| F | Flat damage |
| S | Shielding skill |
| D | Shield defense |
| P | Base power of spell |
Note that shield defense can be modified by your weapon, and there is also a weapon proficiency perk to further increase it.
Example: level 100, shielding skill 100, great shield (def 50), magic sword (+3 def modifier), wheel of destiny with one gem (+1 to flat damage). Total flat damage will be 21, total def will be 53. For shield slam (base power 52):
21 + FLOOR(100 * 53 * 52 / 1000 + 52 / 4) = 309
If you take the +1 defence modifier perk on the magic sword's proficiency tree, it will increase D from 53 to 54, and the average damage will increase from 309 to 314 in this instance.
Note that this is your average damage (there is some variation), and then the damage will also get affected by the creature's physical resistance, armor, and mitigation.