As summer approaches, perhaps you’re daydreaming about putting in a swimming pool or buying a property with a backyard pool. That way you can take a dip and cool off in your own pool whenever the mood strikes, never mind piling the kids in the car on a hot summer day or jockeying for space at a community pool.

But before you dive in (pun intended), consider these financial implications of a swimming pool.

Upfront cost. If you’re planning to install a pool, be prepared to open your wallet. PK Data reports that the average cost of a residential in-ground swimming pool was $39,084 last year. Don’t expect to recoup all of that money when you sell your house in the future, cautions Sabine H. Schoenberg, a home improvement expert and founder of “It’s not something that’s value-enhancing to a lot of people,” she says. “Just as there are people with positive feelings towards pools, there are those with negative feelings. I would never put a pool in as a speculative builder.”

If you decide to move forward with a pool installation, Schoenberg suggests thinking carefully about the placement of the pool in your yard. “If it’s in one faraway corner, people aren’t going to use the pool,” she says. “You need to look at the natural daylight as it travels around the house. I don’t think it’s a good idea to put a pool into a dark, shadowy place.” She also suggests finding an installer who offers a five-year warranty, not just a one-year warranty.

Also investigate your town or municipality’s regulations around pools. “Each town will have its own definition of a ‘pool,’ often based on its size and water depth,” says Loretta Worters, spokeswoman for the Insurance Information Institute, an industry organization that provides insurance information to the public. “If the pool you are planning to buy meets the definition, then you must comply with local safety standards and building codes. This may include installing a fence of a certain size, locks, decks and pool safety equipment.”

Ongoing maintenance. Before you buy a home with a pool, try to get the pool inspected. “The best way, I find, is to get a pool company to come and look at the pool closely,” Schoenberg says. “Sometimes that’s a challenge if it’s the winter, and the pool is partially drained down, so you may not be able to do a full inspection.”

Also, find out if the previous homeowner had a pool company servicing the pool so you can find out if it’s been serviced regularly and what that company charges. Peter Haskew, owner of Crystal Clean Pools of New York, says the quality of a pool’s construction matters more than its age. “You might have above-ground pools where you’ve got ladders pulling on the side and ripping the vinyl,” he says. “Some people cut costs, and there’s thicker vinyl or better grade vinyl available.” In-ground pools can also get cracks, he adds.

Some of Haskew’s customers just pay a few hundred dollars for his company to open the pool at the beginning of the summer (including removing the cover, cleaning out debris and getting the motor running again), and close it at the end of the season, while others also pay for weekly or biweekly cleanings. When homeowners don’t pay for regular cleanings or clean it themselves, that can trigger costlier maintenance calls. “We’ve opened pools, and [they] didn’t take care of it, and the next thing you know you’ve got a gunked up filter or a motor that might have issues,” Haskew says. One customer even had a snake stuck in the pump!

The cost of replacing motors, pumps and covers (which can get moldy if they’re rolled up while wet) varies depending on the size and model used. Adding chemicals to balance the pool’s pH level is another cost. “If your pool gets used a lot, you might need more chemicals,” Haskew says. “I’ll see that the kids are out of school, and they have friends over. The more use they get out of it, the more demand to get chemicals in it.”

Insurance costs. Insurance companies do not like insuring homes with swimming pools, according to Worters. “All pools – from a simple above-ground kiddy pool to an in-ground pool – can be dangerous and need to be properly insured and comply with local safety standards,” she says.

A pool increases the homeowner’s liability risk, so you may want to increase your liability coverage. “Liability limits generally start at about $100,000,” Worters says. “However, experts recommend that you purchase at least $300,000 worth of protection. Pool owners should consider purchasing an umbrella liability policy. In today’s litigious society, $1 million of liability is nothing, especially if someone dies in your pool and the family sues.”

Pools are meant to be fun, so getting a handle on the expected costs can help alleviate potential stress. “They should be part of your fun outdoor entertainment,” Schoenberg says. “You want to have predictability in terms of cost, and you don’t want to suddenly find out you have some huge repair.”