Weapon damage is the sum of your level damage and attribute damage. Both of these depend on your weapon's base damage.
Level damage is calculated like so:
((Character Level - 1) * 0.025 + 1) * Base Damage
Attribute damage is increased by a percentage of your base damage for each point you add, with diminishing returns.
Weapons that scale with two attributes:
If a weapon scales with two attributes, then it will have two attributes damages which contribute to its weapon damage. Its primary (the one listed first) attribute damage scales at 90%, and its secondary at 65%.
This means that your first point in strength will add 1.625% of base damage for a great axe and 1.463% for a hatchet.