If you’re thinking of buying or building a home in a rural area or some other place that’s not connected to a public sewer system, here’s an unsavory news flash: You will need your own septic system and to figure out what septic tanks cost. That way, the water going down the drain of your bathtub, toilet, and sinks has someplace to go!

In fact, about one-third of Americans have their own septic system, according to the American Ground Water Trust. If you’re breaking ground on a new home or, say, converting a cabin with no running water, you will have to install one. But how much does a septic system cost? Answers ahead.

How much do septic tanks cost

For a three-bedroom home, you can expect to need a 1,000-gallon tank, which will range in price from $8,000 to $15,000, according to AngiesList.com. For a five-bedroom home, you’ll probably need a 1,500-gallon tank, which will cost between $15,000 and $25,000.

The cost of a septic system depends on its size, and its size will hinge on how much water you use. You can estimate both of these by using the number of bedrooms in your house as a rule of thumb.

In addition to the cost of the system and installation, you will also be on the hook for a few other expenses—namely permits, soil tests, and the excavation equipment needed to dig the hole in your yard where the tank will be placed.

A local septic installation expert will have an estimate of those costs, which vary widely by area. As part of that cost, “An engineer will come out and perform all the necessary tests and design a system that will work for the home,” says J. Cook at Cortlandt Septic Tank in Montrose, NY.

Installing a septic system typically takes about three to five days—and ideally should be done after your home has been built but before you’ve installed a driveway or other landscaping features. Note: A septic tank will displace a decent amount of dirt onto your lawn, which you can use elsewhere (hello, landscaping!).

What are the costs of maintaining a septic system?

Even when your septic system is safely in the ground, your days of dealing with it are not done. For one, a septic tank will need to be maintained—which mainly boils down to having it pumped every few years. This keeps the sludge at the bottom from rising so high that it spills into your yard (yuck).

This is why the Environmental Protection Agency recommends having your septic system pumped once every one to three years.

“The price range for pumping the tank is $300 to $400,” says Cook. At the very least, have your tank checked to see if it needs to be pumped. Trust us, this is not the kind of thing you want to let slide, unless you want a sewage plant in your backyard.

And there are ways to save on maintenance: Just use less water by installing low-flow toilets and not running the water more than necessary. And in addition to researching the costs of installing and maintaining a home septic system, be sure to review and understand all your local laws and regulations involving wastewater treatment and related issues.