In this month’s home inspection picture there is a lot going on. If you were to replace this water heater it would cost probably under $1,000. But instead of replacing it they changed out the flue (which has the wrong pitch by the way) and left it leaking in their basement.
The life expectancy of the average water heater is only 8-12 years. Make sure your water heater does not look like this one!

