Hardness

Hardness rating is the number shown on equipment next below its durability. It affects how likely your weapon or other item may be damaged.

The exact formula isn't known, but here are some rough guidelines of how it works:
 * For weapons, each time you attack an enemy, a roll is made: It compares your weapon's hardness versus the CR rating of the monster, plus a secret modifier based on how dangerous the monster is, or how damaging Turbine intends it to be towards your equipment.
 * If your weapon's hardness is at least equal or higher then the CR of the monster you attack, it's very unlikely it will be damaged in the attack. Although the chance never goes to 0%, it can get as low as 0.01% if you're using say a hardness 30+ weapon against a CR1-2 enemy.
 * If the monster's CR is just slightly higher then your weapon's hardness rating, you have a small chance of damaging it with each swing. Somewhere around 1-10% depending on how much higher it is.
 * Epic monsters have extremely high CR ratings, and as such in the original release of epic, non-adamantine weapons would tend to be destroyed extremely fast. This was later nerfed however, and now epic monsters have the same CR, but have a hidden modifier that makes them deal far less damage to your equipment.

For non-weapons: The formula just works in reverse - anytime you take damage, from any source, there's a small chance of damaging all your equipment. Items you actually have equipped have a far higher chance of being damaged.

Most items which are stackable can't take damage, but instead are simply destroyed if you roll badly enough (again all hidden rolls). This include scrolls, potions, cakes, and arrows, but not ingredients - they never take damage. It also seems like fire damage is far more likely to destroy these - a powerful spell like delayed blast fireball or meteor swarm for example can destroy upwards of 10 potions at a time.

Any basic non-enchanted metal weapon will have these hardness ratings:
 * Steel: 10
 * Cold Iron: 10
 * Adamantine: 20
 * Byeshk: 17
 * Silver: 8

Any basic non-enchanted wooden weapon will these hardness ratings:
 * Wood: 5
 * Darkwood: 6
 * Densewood: 8