How much does it cost to build a house? According to data from the National Association of Home Builders, the median price of constructing a single-family home is $289,415, or $103 per square foot.

Just keep in mind that the cost to build a home can vary widely based on where you live. So if you’re wondering “can I afford to build a house?” and want a more targeted estimate, go to realtor.com®/local to find out the price per square foot in your area.

Only why does building a home cost so much? Let’s break down the costs.

The main costs to build a house

There are a few main costs involved in the construction of a home, says Andy Stauffer, owner and president of Stauffer and Sons Construction. Sure, each time you build a home, costs are a little different, but here are the biggies:

  • The shell of the house, which includes walls, windows, doors, and roofing, can account for a third of the home’s total cost, or $95,474.
  • Interior finishes such as cabinets, flooring, and countertops can eat up another third of the budget, averaging $85,642. Use this calculator to plug in your ZIP code, exact square footage, and level of finish to come up with a general budget for various projects.
  • Mechanical—think plumbing and heating—runs around 13%, or $37,843.
  • Kitchens and bathrooms are the most expensive rooms to build, especially when the average cost for finishes like cabinets and countertops alone is $16,056. So if you’re looking to save money, ask yourself whether you really need that third full bathroom, or will two plus a half-bath do?
  • Architect and engineer drawings will run about $4,583.

Additional costs to build a house (not included)

Now you know the basic cost to build a home, but the expenses don’t end there. Here are a few extra costs you’ll need to be aware of that aren’t factored into the above price:

  • The cost of a plot of land to build on averages $3,020 per acre. That said, the average home is built on only 0.2 acres, so unless you want a lot of space in a highly desired neighborhood, that alone won’t break the bank.
  • Excavation and foundation work are by far the most variable cost when building a home, according to Morgan Franklin of Kentucky’s LexHomeHub. In other words, you never know what you’re going to find until you start digging—be it bad soil or massive boulders. If excavation and foundation work goes relatively smoothly, the average cost for both is $33,447.
  • You’ll need a building permit, of course—it averages $908 nationally.
  • Other costs you’ll incur before you hammer even one nail include land inspections ($4,191) and an impact fee, levied by the government to cover the costs a new home will incur on public services like electricity and waste removal ($1,742).

Advantages of building a house

That’s a fair question—particularly since you can buy an existing single-family house for a median price of $223,000, or $66,415 less than building one. You will also save yourself the headaches that inevitably come with construction.

Building a house does have its advantages. Everything from pipes to the heating and cooling systems will be new. That means no costly repairs in the near future—and so a newly built home could end up costing less in the long run. Plus, of course, you get to design your home to your exact specifications. If you have very clear ideas of how you want your home to look, this blank slate could be worth every penny. (That said, designing your dream home from scratch has its challenges, too, so make sure to not make these mistakes.)

Is it cheaper to buy or build a house?

Does it cost less per square foot to buy or build your own house? It’s smart to weigh the pros and cons of new versus old construction—and the price you pay for construction costs versus an existing home is only the beginning. Here we lay out everything a home buyer needs to know about buying an existing home compared with building one from scratch or having it built by a general contractor.

There are actually two things to consider: the upfront costs of buying verses building, and the ongoing maintenance costs.

The upfront costs

If you buy an existing home: According to the latest figures, the median cost of buying an existing single-family house is $223,000. For the average 1,500-square-foot home built before the 1960s, that comes to about $148 per square foot. That said, the exact price can vary widely based on where you live. (Go to realtor.com/local to see the price per square foot in your area.)

If you build a new home: Building a house will set you back an average of $289,415. That’s $66,415 more than the cost of an existing home!

Still, you’ll get a lot more for your money. For one, new construction is usually more spacious, with a median size of 2,467 square feet—so the cost to build per square foot, $103, is actually lower than that of existing homes.

Another advantage of having a builder construct a custom home is you pay for only what you want, whereas an existing home may have interior and exterior features (e.g., a finished basement or a basketball court) you’ll pay a premium for, even if you don’t want them. But if an older house happens to be your dream home the way it is, that may be the more bargain-friendly route.

Maintenance

If you buy an existing home: Older homes have more wear and tear, which means certain things may need more maintenance—or, if they’re on their last legs, replacement, points out Michael Schaffer, a broker associate at Colorado’s LIV Sotheby’s International Realty.

Naturally, the cost of this upkeep isn’t cheap, so make sure you know the age of the main items. For example, the average furnace is expected to last 20 years and will cost $4,000 to replace. The typical HVAC system lasts 15 years and costs $5,000 and more to replace. Another biggie is the roof: The average shingled roof holds up for about 25 years. If you need to replace roofing, you’re looking at a bill of at least $5,000. Plumbing and septic systems can go for some time without a problem, but when something goes wrong, it’s an emergency.

With an existing home, unless you step into a high-end home with everything you want, you may want to start changing things, even if they are still functional. Home improvement shows make it seem simple to change countertops and flooring, or even overhaul floor plans. When you’re paying for material and labor costs for plumbing and drywall work, you may start to think your total cost might have been less paying a builder for a custom home in the first place.

If you build a new home: Considerably less upkeep is one of the primary reasons to build your own single-family home, because everything from major appliances to the HVAC system is new and under warranty. In fact, sometimes the entire home is protected for up to 10 years because a builder generally offers a construction warranty “for any problems that arise,” says Schaffer. Your interior and exterior maintenance outlay for a decade is potentially zero dollars. That can make up for some home construction costs per square foot that you paid by opting for a custom home.

Landscaping

If you buy an existing home: A major perk of older homes is mature landscaping with large trees and established plantings. That may not seem like a big deal until you consider that the U.S. Forest Service estimates that strategically placed mature trees can add tens of thousands of dollars to a property’s value and save up to 56% on annual air-conditioning costs.

If you build a new home: Builders often do little or no landscaping to new construction. It may take thousands of dollars—and many years—to get the yard you want. For instance, one 6- to 7-foot-tall red maple will cost about $120 (if you plant it yourself), which will then grow 2 to 3 feet a year. According to HomeAdvisor, the average cost of adding complete landscaping is $3,219.

Energy efficiency

If you buy an existing home: The latest U.S. Census found the median age of American houses to be 36 years. Older construction means dated windows and appliances—dollars flying out the window on wasted energy expense.

If you build your own home: Recent construction almost always beats older homes in energy efficiency, says Kyle Alfriend of the Alfriend Real Estate Group Re/Max, in Ohio. Homes built after 2000 consume on average 21% less energy for heating than older homes, mainly because of their increased efficiency of heating equipment and building materials. This translates into reduced energy expense every month, even with the higher square footage in many newer homes.

Appreciation

If you buy an existing home: The nice thing about old homes is that there’s context to your purchase: You can research the home’s previous sale prices, as well as prices of similar homes in the area (known as comparables, or comps) to get a feel for whether prices are rising or falling in your area. If the prices for your home and others in the area have been steadily rising, odds are decent that the trend will continue, which bodes well for you if you decide to sell later on.

If you build a new home: New house construction, particularly in up-and-coming neighborhoods, can be more of a gamble. Without a proven track record of lots of comps, there just aren’t enough data points to really know what could happen down the line. This is also true for all of the latest amenities you might ask the builder to install in your home (think self-cleaning toilets).

“Some trends die quickly, dating the home, and can negate any appreciation,” says Alfriend. So when in doubt, try to steer clear of anything that screams it’s a passing fad.

That said, if you pay reasonable home costs when you build a home, and your local community is thriving, you should be able to get a good sales price for your home down the line.