Most weapons damage formulae are stat dependent. Some, such as swords, depend on the characters strength stat, while others depend on the magick stat of the weapon.
Unarmed
DMG = [11 x RANDOM(1~1.125) - DEF] x STR x (Lv+STR)/256]
Unarmed with "Brawler" Licence
This formula is for if you have the Brawler licence, or if you have an Amber Armlet equipped (it increases unarmed damage).
DMG = [(Lv+STR)/2 x RANDOM(1~1.125) - DEF] x STR x (Lv+STR)/256]
Maces
Maces are the only weapon that completely relies on the characters magic stat.
DMG = [ATK x RANDOM(1~1.125) - DEF] x [1 + MAG x (Lv+MAG)/256]
Poles
DMG = [ATK x RANDOM(1~1.125) - MDEF] x [1 + STR x (Lv+STR)/256]
Axes, Hammers & Handbombs
DMG = [ATK x RANDOM(0~1.111) - DEF] x [1 + STR x (Lv+VIT)/128]
Katana & Staves
These weapons depend on both magick and strength. The higher a level you get, though, the less weighting is magic and depends more so on strength.
DMG = [ATK x RANDOM(1~1.125) - DEF] x [1 + STR x (Lv+MAG)/256]
Bows, Daggers and Ninja Swords
These depend upon speed and strength. These can give you an edge in battle in earlier levels because the speed stat grows very slowly in comparison to everything else.
DMG = [ATK x RANDOM(1~1.125)]- DEF] x [1 + STR x (Lv+SPD)/218]
Guns & Measures
DMG = [ATK x RANDOM(1~1.125)]^2
These are unique because they rely solely on the attack power and doesn't rely upon the targets physical or magical defence.
Modifiers
Some things, such as a characters status ailments or a foes elemental type can drastically affect the outcome of an attack.