Water Heater Repair or Replace?

How do you tell when its time to replace your hot water heater or if its possible or even wise to repair it? First of all if your water heater is over 15 years old and breaks down then its time to replace it as modern hot water heaters are far more efficient than older models. If your hot water heater is only a couple of year old on the other hand then trying to get it repaired makes a lot more sense. Its those water heaters in between there that you would need to evaluate the cost to repair vs the cost to replace along with expected efficiency gains lowering your gas or electric bill.