One of the biggest surprises that homebuyers face when house hunting is how much it costs to actually buy a house.

The cost is on the upswing. In March, the median sale price of an existing single-family home jumped 18.4% to $334,500, according to the National Association of Realtors.

Nationally, it takes 14 years to save for a home down payment, according to Unison’s 2019 Home Affordability Report.

“As a general rule of thumb, experts say you should not be spending more than 30% of your income on housing expenses,” says USA TODAY Housing and Economy reporter Swapna Venugopal. “Aside from the mortgage payment, this includes costs like mortgage interest, property taxes and maintenance.”

To make saving toward that goal easier, here are some financial guidelines and upfront costs to keep in mind once you’re ready to buy:

►Buying a house when you have student debt:What to know

Ones to watch in the real estate market in 2021.Start with savings, income, good credit

Before you click on the first listing or call a real estate agent, take a good look at your finances and your readiness to buy.

“You should have secure employment, some savings set aside, and be able to secure a good mortgage with an excellent credit score,” says Omer Reiner, a licensed Realtor and President of FL Cash Home Buyers LLC in Florida.

Get your free credit report from annualcreditreport.com. A “good score” is 670 to 739, according to major credit reporting bureau Equifax. “It depends on the lender, but a score closer to 700 is ideal if you’re thinking about getting preapproved for a mortgage,” Venugopal says.

“How much you can afford depends on your income, how much money you’ve set aside for a down payment, the mortgage you qualify for, and the local real estate market,” Reiner says.

Include living expenses and the costs associated with owning a house such as taxes and maintenance. Online calculators from bankrate.com can help crunch the numbers.

The down payment

A down payment is a percentage of your home's purchase price that you pay upfront at the closing. Lenders often view the down payment amount as your investment in the home.

Story continues

“Some experts suggest putting a 20% down payment so you don’t incur the additional cost of private mortgage insurance (PMI),” Venugopal says. “Also, when a seller sees that a buyer is putting down 20%, he or she may feel like your mortgage will get approved faster.”

However, Reiner says, you can buy a home for as little as 3.5% down or no down payment by using government-backed loans from FHA or USDA, respectively. “Keep in mind, not everyone or every house qualifies for these types of loans,” he says. “Lenders typically require buyers to pay for PMI to qualify for low down payment mortgages, which will increase your monthly expenses.”

Mortgage terms

“One of the best ways to shop for a mortgage is by asking what the rate and closing costs are and by obtaining a preapproval where the lender verifies income and credit,” says Jason Gelios of Community Choice Realty in Michigan. “It can be a waste of time when a homebuyer is told they can get a certain rate only to find out the rate will be higher based on credit being reviewed.”

Venugopal advises homebuyers to get mortgage quotes from several lenders.

Closing costs

Beyond the down payment, homebuyers are required to pay closing costs, or fees and expenses such as the title insurance, attorney fees, appraisals and taxes.

Closing costs tend to represent 1% to 5% of the sale price, Reiner says.

When buying a house, make sure you have enough money in your coffers to cover not only those upfront costs but also maintenance, repairs and upgrades after you settle into your new place.

This article originally appeared on USA TODAY: Homes near me: Prices for houses are up so how much should you save?