Minecraft wiki entry for Before_1.8, associated text: To make the best use of the bonus, repair when the total item durability of the pair is no more than 88% of the maximum. For swords and tools, the 12% bonus is 3 durability for gold, 7 for wood, 15 for stone, 30 for iron, and 187 for diamond.
You may want to use F3+H to show the numeric durability of your items (in the inventory tooltips).