Defense

Defense is the number that determines how much damage can be absorbed per hit. Damage the player takes is reduced by their defense divided by two. Defense values are rounded up.

Defense can be increased by equipping armor and or accessories, as well as (temporarily) Ironskin Potion and Bowl of Soup

Mechanics
Defense (or Defense Rating) gives an arithmetic reduction in damage: i.e. reduces damage by a fixed amount per hit (as opposed to a geometric damage reduction, which reduces damage percentage based). Because of this, ironically, high Defense is particularly important against low damage attacks, which can be reduced almost completely, but not as important against high damage attacks, where the reduction won't be as effective.

Formula
The formula is: Damage Reduction = ROUND_UP(Defense/2)

For example, with 10 Defense, a 20 Damage attack is reduced by 5 to 15 Damage.

Monsters
Monsters have same Defense mechanics as players. Monsters with high defense will take virtually no damage from low damage weapons (i.e. Fire Imps take 5 damage from the Minishark with Musket Balls). Accordingly when fighting high defense monsters, high damage weapons are preferable.

Armor and Accessory Defense
See Defense for full list. Here is a list of armors, accessories, and their respective defense bonuses, including any applicable set bonuses. Before the 1.1 update the highest possible defense bonus obtainable was by equipping a full molten armor set alongside a Cobalt Shield, an Obsidian Skull and several Shackles, (of which you can equip 3) then drinking an Ironskin Potion and a Bowl of Soup. Now it is possibly to achieve a much higher defense. Hallowed armor gives you 50 defense alone, you can then equip an Obsidian Shield (+2) an Obsidian Skull (+1) and 3 shackles to provide a defense of 56. If all these accessories have the warding attribute, that provides an additional 20 defense, giving you 76 defense. Ironskin and bowl of soup then give an additional 9 giving you 85 total defense.