Buying a home can be expensive before even walking through the front door - closing costs, insurance, moving expenses and real estate agent fees must be paid before the first mortgage bill arrives. But every home has its problems, and repairs can send new homebuyers looking for more money, along with their toolbelts or a contractor to fix them.

If a buyer was smart, many of the problems with an aging roof, electrical system or old appliances were discovered by a home inspector during the buying process. The buyer may have received credit for the upcoming repair, or at least knows to start saving for it now.

Home systems or components, such as roofs and appliances, can be marked in a home inspection as "nearing or exceeding serviceable life," meaning the item isn't likely to fail immediately but is statistically nearing the end of its design lifespan, says Welmoed Sisson, who owns a home inspection business with her husband in central Maryland.

Most components have an expected lifespan of 17 to 30 years, Sisson says, with installation, maintenance, how it's used and the quality of the component among the factors affecting how long it will last. A high-quality item that's used constantly and not maintained may die sooner than a cheaper item that's well maintained and used infrequently, for example.

Common repairs

Here are some of the most common home repairs to expect, with the life expectancy of the item:

Roof: A standard grade roof has a warrantied life of 20 years, and a better grade roof has an expected useful life of 30 years or more. Things that can cause a roof to wear out faster include having a shallow angle, being under trees that shed lots of leaves, and the north sides of roofs wear out faster than the south sides.

Electric water heater: 10 years. A gas water heater should last longer - 15 to 30 years - but one of the main problems is that unlike most things in a home, regular maintenance won't extend its life, says John Wilder, a contractor for 10 years. Draining it once a year will help, but there isn't much else to do.

"There's not really a whole lot of maintenance you can do on an electric water heater, for example," Wilder says.

Refrigerator: 15-20 years. Ice makers can be a problem if the fill tubes freeze up, Wilder says, and dust under the condenser can make a refrigerator run hotter.

Washer/dryer: 10-15 years. A gas dryer is more efficient and "they don't really break down," Wilder says. The heating element in an electric dryer can break down often, he says. To extend the life of a clothes washer, he recommends using liquid detergent because dry often clogs up a washer.

Garbage disposal: 10 years. They're powerful, but not meant for potato peelings. Bones will also seize them up, says Wilder, who recommends putting lemon rinds down one occasionally to degrease and deodorize it.

Air conditioner. 15-20 years for an HVAC unit. A wall unit should last about 10 years. Leaky air ducts can waste up to 30% of the electric bill for an air conditioner, Wilder says. If the ducts are installed with duct tape, the adhesive lets go over time, and should instead be sealed with mastic.

Furnace: 17 years if clean, while one that isn't maintained may need major repairs in less than 10 years, says Sisson, the home inspector. A manufacturer's label and date codes can tell how old a furnace or other item is, she says, but they can be misleading. "It's not unheard of for an older furnace to have a new label on it," Sisson says.

How to check a lifespan

Major fixtures such as a heat pump and air conditioner should have an Energy Star label with the date of manufacture. Smaller appliances can be dated by the serial number or a bar code, which can be looked up with a smartphone bar code scanner, says Philip Georgiades, a chief loan steward at VA Home Loan Centers. Home inspectors can also use an item's serial number to track manufacturer recalls.

Checking city permits is another way to determine how old something is, Sisson says, since replacing a gas-fired furnace usually requires a permit. Such records can be difficult to decipher, for example, or a permit may not have been filed.

If the property is newer, the builder may have records and warranties, Georgiades says.

People buying a condo or who live in a homeowners' association can ask for a reserve study, which details how expected repairs and maintenance are being saved for, says Brian Kim, a broker associate at Group BK, a real estate brokerage firm.

Protecting your home

Getting homeowner's insurance is the first step to protecting your home from major disasters that can destroy a roof or flood a basement.

Repair costs can range from $50 for a small item to tens of thousands of dollars for new plumbing or electrical. If manufacturers' warranties are about to expire on certain appliances, a home warranty can be a good investment.

Most home sellers will pay for the first year of a home warranty, Georgiades says. A small deductible of $50 to $75 is usually needed if an item breaks, no matter how big the total repair or replacement cost is.