A 40-gallon water heater can last anywhere from 8 to 12 years, depending on how well it’s maintained and the quality of the unit. Regular maintenance, such as flushing the tank and checking for leaks, can help prolong the lifespan of your water heater. Choosing a high-quality unit and having it installed by a professional can also improve its durability. It’s important to keep an eye out for signs of wear and tear, such as rust or strange noises, as these can indicate that it’s time for a replacement.