Like seeing half a glass of water as half full or half empty, a house with an in-ground pool can bring out the optimist or pessimist in home shoppers.

The same backyard pool that some people see as a great investment that will only add value to a home can be seen by others as a hazard and potential liability, with swimming pool maintenance costs a continuous drain on their finances. However they view it, home buyers should look at the true costs of owning and maintaining a pool, and feel comfortable that they can afford the expenses.

Here are some swimming pool costs to keep in mind:

Swimming pool maintenance

Just as you would hire a home inspector to check a home out overall before buying it, an inspection by a professional pool company can help determine what shape the pool is in.

The proper maintenance of a backyard pool and its equipment is more important than its age, says Kevin Baron, founder of Probity Pools, a residential swimming pool franchise that provides swimming pool maintenance, repairs and renovations.

"Be sure to find out if the previous homeowner had regular maintenance," Baron says. "Not paying for, or doing regular maintenance can lead to more costly repairs down the line, such as replacing the pool's surface."

"Also, not having the proper chemical balance can accelerate the wear on your pool's surface, which can cost thousands of dollars to address," he says.

Age

While a pool's age isn't as important if it has been properly maintained, it's worth considering repair or replacement costs if a pool is nearing the end of its life.

Pools should last 40 years or more, with concrete lasting the longest, says Matt Giovanisci, owner of SwimUniversity.com, an online pool guide. Pools with a vinyl lining and a steel or polymer frame can last a less amount of time.

Depending the condition of the pool, repair or replacement costs can vary widely, from a few hundred dollars for a simple patch, while the replacement cost for an in-ground swimming pool liner can run over $4,000 for a standard size pool.

Chemicals and other pool supplies

Pool supplies like chemicals are a big part of pool maintenance monthly costs, typically ranging about $100-$200 a month during the summer. Chemicals help balance the water chemistry and keep the pH level (acidity) at 7.5 pH, Giovanisci recommends. When pH is low, it means the water is acidic and when it's high the water is basic.

If you're a neglectful pool owner, a low pH can dry out the pool liner or eat away at the concrete, he says, and can also destroy pipes, the pool heater and filter system.

Chlorine is another chemical a pool needs. Chlorine is a pool sanitizer, killing bacteria and algae. Other chemicals are also needed, and their cost depends on the size of the pool and how often it rains, among other factors.

"Pool care is very simple," Giovanisci says, "and the more you're on top of it and the more education you have (in caring for it), the less money you're going to spend."

Pool pump and other equipment

A pool pump filters the water to clean it and keeps the water circulating, and should ideally run 24 hours a day, Giovanisci says. But if that electricity cost is too much for a homeowner, running the pump 10-12 hours a day should be OK, he says.

A pump will have the most wear and tear among any part of a pool, and should last five to 10 years, says Giovanisci, who estimates a pump's cost at $600.

Most pumps, filters and chlorination systems have a life of 5-7 years, depending on type and how they're maintained, according to Poolwerx, a pool service company. Automatic pool cleaners have a lifespan of approximately five years.

Typically all swimming pool equipment will require some minor repairs and parts replaced over five years, approximately $200 per year for parts on top of regular maintenance costs of about $89 per month and chemical costs of $80 per month, according to Poolwerx.

Electricity and heating

Electricity costs vary around the country, but with a pool pump running most of the day and the heater being used either rarely or often, depending on how warm you like the water, plan on $200 or so in extra electricity costs for each month of use.

Usage may be the key in many areas of pool expenses. In the northeastern United States, outdoor pools are only used from May through September because of the cold weather, says Giovanisci, who lives in New Jersey.

Pools in cold-weather areas should be drained a little in winter and covered, he says. That means less time to spend in them, as opposed to sunny Florida.

Steven G. Bazil, a lawyer who lives near Philadelphia, says he keeps his pool open from around Memorial Day through September and spends about $2,000 per season through a pool service to have the pool open and closed, cleaned and treated on a weekly basis. That cost doesn't include heating.

Bazil says he installed a pool heater a few years ago and kept the pool open through Thanksgiving, spending $600 on gas to heat it one week. He now spends about $1,000 per season to heat the pool during the summer.

Insurance

A pool will increase the liability risk for a homeowner, and is considered an "attractive nuisance" that may require additional liability insurance, according to the Insurance Information Institute. Even if pool gates are installed to keep children from entering the pool area and are required by your local municipality, homeowner's insurance costs can still be high.

Most homeowner's policies include at least $100,000 worth of liability protection, according to the insurance organization. But pool owners may want to consider increasing it to $300,000 or $500,000.

An umbrella policy for $1 million in liability protection above what the home already is protected for can cost an extra $200 to $300 per year. Extra insurance may also be needed to replace the pool if it's destroyed by a storm or other disaster.

With all of those swimming pool costs, buying a home with one may look like a money pit. But if you're an optimistic home buyer, it may be well worth the cost - as soon as you get into the pool on a hot, summer day.