Defense

Defense is a player statistic that determines how much damage can be taken per hit. On non-Expert mode worlds, the damage the player takes is reduced by half of their defense value, altogether. In Expert mode, damage the player takes is reduced by three-quarters of their defense value, rounded up. Defense can be increased by equipping armor and accessories, or temporarily boosted by various buffs. No attack can be reduced below 1 damage (with the exception of a player with an ally wearing the Paladin's Shield).

Some forms of damage are impossible to reduce through defense. Damage from health-draining Debuffs like Cursed Inferno, drowning in water, or colliding with a boulder are not reduced by defense.

Damage taken from lava can be reduced through defense.

Mechanics
Defense gives a flat reduction in damage: i.e. damage is reduced by a fixed amount per hit (as opposed to a multiplicative damage reduction, which would reduce damage by a percentage).

Normal mode Formula
The formula is: net damage = attack - (defense * 0.5) For example:
 * With 20 Defense, a 40 Damage attack is reduced by 10, resulting in 30 damage taken.
 * With 30 Defense, a 40 Damage attack is reduced by 15, resulting in 25 damage taken.

Expert mode Formula
In expert mode, the formula is: net damage = attack - (defense * 0.75) For example:
 * With 20 Defense, a 40 Damage attack is reduced by 15, resulting in 25 damage taken.
 * With 30 Defense, a 40 Damage attack is reduced by 23, resulting in 17 damage taken.

Note that in expert mode only the player's defense follows the formula. Enemies will still take the same amount of damage as in normal mode.

Enemies
Enemies have a defense statistic just like players do, but they do not gain more protection from defense in Expert mode. Enemies will always reduce incoming damage by 50% of their defense regardless of difficulty. Monsters with high defense will take virtually no damage from low damage weapons (e.g. Fire Imps take 5 damage from the Minishark with Musket Balls). Accordingly, when fighting high defense monsters, high damage weapons are preferable.

Armor
Armor is a set of equipable defense items that reduce damage taken from enemies and most other damage sources. Armor pieces are equipped by placing them in the Armor slots of the player's inventory. Armor can also be placed in vanity slots to change the player's appearance without affecting stats.

In addition to the defense provided by individual Armor pieces, most Armor types provide a "Set Bonus" when all three pieces of the same Armor type are worn simultaneously. For the basic pre-Hardmode Ore armors (Copper, Tin, Iron, Lead, Silver, Tungsten, Gold, and Platinum), this is an additional defense bonus. More advanced or unique Armors can provide other specialized set bonuses (e.g. the Shroomite Armor will provide invisibility when not moving).

See the full page here, which includes an overview, a full list of armor types, and descriptions of each armor set.

Defense boosts
Here is a list of accessories, and their respective defense bonuses. A list of armor including defenses can be found on the armor page.

Damage reduction boosts
All damage reduction boosts (except Paladin's Shield) affect damage taken after defense.

Armor Penetration
Armor penetration is a statistic that reduces the defense of the player's targets. For instance, a Pixie normally has 20 defense. If the player has 5 Armor Penetration, then the Pixie will be taken to have 15 defense instead.

Trivia

 * Although not possible in-game, if a piece of armor were to gain a prefix, it would apply the effects just like an accessory would. For example, a set of Warding modified armor would add 12 defense total; each piece adds 4 defense to the total.
 * If the player somehow has negative defense, they will constantly take 1 damage, and die with the death message " couldn't put out the fire".

Abwehr Défense 防御力