Every level is the tower's own upgrade list from the game files: what you pay and the damage, cooldown and range you get. A trait multiplies them the way the game's trait code does, so Damage II's 10% is 1.1x damage and Cooldown II is 0.92x the cooldown. The multipliers match the game's own function on every trait.
Compare every tower at max level in the towers table, and see what each trait does and how rare it is on the traits page.
Questions
Which trait gives the most damage?
Hyperion (Divine): 60% shorter cooldown, which is 2.5x the damage a second, plus 15% range. Next are Emperor (Secret) at 1.8x, the Halloween trait Pumpkin King at 1.75x and Godlike (Divine) at about 1.7x with 40% more range. At the common end, Damage I is 1.05x and Cooldown I about 1.04x.
How is damage a second worked out?
Damage divided by cooldown at the level you pick, with the trait's multipliers applied the way the game applies them: damage and range go up by the trait's share, cooldown goes down by it. Several placed copies add up. Splash, fire and the other effects in a tower's type come on top.
Do traits change the cost?
Only the Cheap traits. Cheap I takes 8% off the placement price, and Cheap II takes 5% off placement and 12% off every upgrade. The cash total in the calculator includes that.