Firstly, the way a water heater is installed plays a major role. Many homeowners try to install one themselves so that they can save some money, however, they may quickly come to regret that decision as installing a water heater is not as easy as it seems, especially with tankless gas heaters. A water heater should be installed upright and in an area that is well ventilated. Do not install the heater anywhere that may be at risk of flood damage as this would cause rusting of the exterior pipes, which would then reduce its efficiency and lifespan. Another point to have in mind when deciding where to place the water heater is to make sure there will be easy access to it which will make repairs and inspections a lot easier.
Another factor when it comes to the lifespan of the water heater is the amount of use it gets. The more water that it has to heat, the harder it will need to work which will put more stress on it.
When looking to purchase a water heater, how can you make sure you are buying one that will last? As we find with most appliances, you get what you pay for. A more expensive water heater will likely last longer than a cheap one. It is also important to check how long of a warranty it comes with. Generally, water heaters that have a longer warranty are built better and so will have a longer lifespan.