Nothing beats a cool swimming pool on a hot summer day. Even better if it’s right outside your door. But is the convenience of an inground pool worth the cost?

The average price for an inground, residential swimming pool was about $40,060 nationally in 2016, Bil Kennedy, president of market research and consulting firm P.K. Data in Alpharetta, Georgia, said via email. Of course, building a backyard oasis could cost even more, or a lot less, depending on where you live, the size and type of pool, and how you maintain it.

Here’s what’s behind inground pool costs and some tips for keeping those costs under control.

Cost to install an inground pool

Inground pool costs vary depending on how complex design choices are, says Tom Casey, vice president of sales at Anthony & Sylvan Pools, based in the Philadelphia area. But other factors have an impact as well, such as:

Location. The cost of living in your city affects labor and material prices. Building an inground pool in a dense, high-cost metropolitan area is typically more expensive than doing so in a suburban or rural area.

Pool site. Does your yard have room for excavating equipment? Is the area flat or will it have to be leveled? Is the soil sandy or rocky? Soil issues and limited access can easily increase the cost of a pool, Bart Jacobs, owner of La Jolla Pools in San Diego, said via email.

Soil issues and limited access can easily increase the cost of a pool.

Size. Large pools require more labor and materials than small inground pools. The same goes for deep vs. shallow pools.

Pool Type. Vinyl-lined, fiberglass, concrete and gunite — a type of concrete — pools often have different installation and maintenance costs.

Shape and features. Custom shapes, and special features like a hot tub or diving board, can add thousands of dollars to the pool’s price tag and installation cost, depending on the type.

Permits. Like other permanent home additions, inground pools require a permit from the local building authority. You may also have to pay an inspector to locate potential sewer or utility lines before digging.

Deck. Inground pools must be surrounded by a concrete sidewalk, or deck. The more elaborate your deck, the more it costs.

Fencing. A pool fence is an expense people tend to overlook when budgeting for a pool, though most local laws require one for safety, Mat Jobe, founder of PoolPricer.com, said via email. A swimming pool fence can cost up to $19 per linear foot while gates cost around $300, according to Home Advisor.

Cost to own an inground pool

Did your wallet just do a belly flop? Well, grab a floaty, because those are just installation costs. Once the pool is built, you’ll pay ongoing costs such as:

Insurance. Insurers call pools an “attractive nuisance,” which means they’re desirable but dangerous. Because a pool increases the chance of someone getting hurt on your property, it will also increase the price of your homeowners insurance.

Because a pool increases the chance of someone getting hurt on your property, it will also increase the price of your homeowners insurance.

» MORE: What does homeowners insurance cover?

Taxes. Inground pools sometimes bump up property value; when it goes up, property taxes tend to follow suit.

Maintenance. After installation, someone will need to clean the pool, balance chemicals and make repairs. Do-it-yourself maintenance can cost around $250 a month during the swimming season, while hiring a professional can cost around $500 per month, according to Fixr, a site that publishes cost and hiring advice for home remodeling projects.

Utilities. “The average customer may spend $30 to $50 a month on their electric bill to operate a pool,” Casey says. Add a heater, spa or waterfall and energy costs may climb even higher.

How to plan your inground pool installation

Determine the goal. When considering a pool, set your sights on comfort and convenience, not resale value. Although an inground pool can enhance property value, especially in warmer climates or neighborhoods where everyone has one, that’s usually outweighed by the cost of upkeep. A pool may actually decrease a home's value in the eyes of buyers who don’t want the extra responsibility.

Set a budget. “A good approach is to figure your pool installation budget as some percentage of your home’s value — perhaps 10% to 20% for a standard-sized pool,” Jobe says. “You want to be able to make your pool payments without settling for something that detracts from your property.”

Do your homework. Inground pools are a major construction project involving excavation, cement work, plumbing, electrical wiring and more. Get estimates from at least three experienced swimming pool installation contractors and verify:

  • Quality of past work: Ask about previous projects that were similar to yours, including any issues that arose and final cost

  • Reviews and references: Read reviews and ask the contractor to supply references

  • License, bond, insurance and warranty: Contractors, and any subcontractors they use, should have adequate insurance and guarantee their work. Your local building department or state consumer protection agency can help you investigate.

Tips for reducing the cost of an inground pool

When researching contractors and shopping design options, the following tips will help keep costs in check:

  1. Choose a simple deck: You might envision a gorgeous mosaic of paving stones that wraps around the pool and leads to your back door, but that will cost you. Save money by choosing a basic concrete deck now and adding the fancy patio later.

  2. Avoid the deep end: “Smaller pools are all the rage these days, not only because they save space but because they’re cheaper to install and maintain,” Jobe says. “Keeping the dimensions as modest as possible will save you a lot of money.”

  3. Skip the bells and whistles: Water features, spas, slides and color-changing lights are in vogue, but tend to ratchet up the price.

  4. Do the upkeep yourself: Pool drains, filters and skim baskets should be cleaned once a week. Checking the pool’s chemistry — water pH and chlorine levels — is also a weekly chore. For big savings, DIY these tasks instead of hiring a maintenance crew.