ULTIMA works differently than every other spell. It's based on:
Spell Base Damage [SBD] <- Ultima's Base Damage is 96
Spell Level [SLV]
All Skill/Spell Levels [ASL]

[DAMAGE] = (SBD + ASL) * SLV

Now then, each single Skill/Spell level is counted seperately. If you have 16
spells that are all Level 16, and all your weapons are at Level 16, you would
count 16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16+16
or 16*24. That is your ASL number. Plug in everything else and you get the
following equation:

[DAMAGE] = (96 + 384) * 16

Your total damage is 7680. Considering the next most powerful spell can only
do 2408 damage, Ultima can be pretty damn powerful.

-Action's guide on Gamefaqs.com