Homeownership is expensive, but it does offer a variety of ways to save money on your tax bill. While mortgage interest deductions and property tax deductions are the most common ones, there are a number of others as well, including home improvements, the home office deduction, energy credits and more.

There are tax breaks you can get when you buy the home, deductions you can take while you own it and other tax advantages when you finally sell it. Note that in most cases, you need to itemize deductions to take advantage of most home ownership tax breaks.

Major changes to the federal tax code enacted at the end of 2017 have upended many of the longstanding deductions homeowners have been accustomed to and will mean some big changes in the rules for your 2018 tax return. But the following rules still apply for the 2017 tax year.

Here are some of the major home ownership tax deductions you can still take for 2017:

Mortgage interest deductions

The granddaddy of all homeowner tax benefits is the mortgage interest deduction. For most homeowners, this will be the biggest tax benefit they realize from home ownership.

You can take a deduction for every cent of mortgage interest you pay each year, up to certain limits. This can be a substantial amount, particularly during the early years of a mortgage when interest charges make up the vast majority of your monthly mortgage payments.

The mortgage interest deduction is often what makes it worthwhile for homeowners to itemize deductions in the first place. The 2017 standard federal tax deduction is $6,350 for individual filers, $12,700 for couples and $9,350 for the head of a household. Many homeowners easily pay that much in mortgage interest annually, so it's to their advantage to itemize.

Once you're itemizing tax deductions for mortgage interest, you can also take a lot of other deductions that wouldn't be available to you with just the standard deduction – like state and local taxes, charitable donations, job-hunting costs, moving expenses, union and professional dues and the like.

Current law (2017) sets the mortgage interest deduction limit at $1,000,000 in home acquisition debt for couples filing jointly and $500,000 for individual filers. That is, you can deduct the interest paid on that much debt. That debt can also be divided among two homes, such as a $750,000 primary residence and a $250,000 vacation home.

Home equity loans and home improvement tax deductions

You can also deduct the interest paid on a home equity loan secured by a primary and/or second residence. Here, the deduction limit is the interest paid on $100,000 in home equity debt for a couple filing jointly, $50,000 for an individual filer. That's deductible regardless of what you use the money for.

There is an exception to these limits and that's tax deductions for home improvement loans. You can deduct an unlimited amount of interest paid for home improvement loans used for capital improvements – upgrades that increase the value of the home or extend its life, like building an addition, putting on a new roof, adding a deck, replacing heating and cooling systems, etc.

More routine repairs and improvements like painting, minor plumbing, patching a leaky roof, etc. don't qualify for this tax break, but they're modest enough they aren't likely to exceed the regular mortgage interest deduction limits on a home equity loan anyway.

You should also keep track of your expenditures in making home improvements. You can't take a deduction for those on your current year's taxes, but when it eventually comes time to sell the home, you can deduct them from any capital gains you might realize (See below).


Property tax deductions

State and local property taxes, sometimes called real estate taxes, are fully deductible on your federal return. As with nearly all other homeownership tax breaks, you do need to itemize deductions to take advantage of it.

Home purchase tax deductions

Most of the tax breaks you get when buying a home are the same home ownership tax deductions you'll be taking each year you have the property – in other words, any pro-rated property taxes and mortgage interest you pay up front. The other closing costs, including title fees, commissions, inspection, assessment, etc. are simply considered part of the transaction and cannot be deducted.

The one big deduction you can take though, are for discount points paid as part of the settlement. Discount points are a way of buying a lower mortgage rate by paying an extra fee up front. They're actually a form of prepaid mortgage interest, so they're still basically a mortgage interest deduction.

You can deduct the entire amount paid for points on your tax return for the year you bought the home. On a refinance, though, the deduction for points must be spread out across each year of the loan.

Tax deductions for a home office

If you have a business you run from your home, you can take a tax deduction for a home office used for that purpose. You can deduct whatever percentage of your general home expenses – mortgage interest, homeowner's insurance, utilities, etc. – equal to the proportion of your home the home office occupies. So if your home office takes up 10 percent of the square footage of your home, you can deduct 10 percent of the expenses associated with home ownership.

You can also take a work at home tax deduction for a basement workshop or any other space used to generate income. However, the space must be used exclusively for that purpose. You can't set up a desk and computer in a spare bedroom and claim the whole space as a home office if you also have workout equipment in there and use it as a home gym.

Home energy credits

Most of the federal home energy efficiency and renewable energy credits that were formerly available for such things as insulation upgrades, high efficiency heating and cooling systems and energy efficient windows expired with the 2016 tax year and are no longer available to homeowners. However, there is one remaining.

The renewable energy credit for solar energy technology installed in a primary or secondary residence is still available through 2019, but will then be reduced and phased out through 2021. It allows you to take a tax credit of up to 30 percent of the cost of purchasing and installing either solar panels for generating electricity in the home or a solar-powered water heater. There is no maximum limit on the solar credit.

Capital gains benefits

There's a big tax benefit you can get when you eventually sell your home. If your home has grown in value over the years, you can avoid paying capital gains taxes on up to $250,000 in increased value for a single homeowner and $500,000 for a couple. That makes for a pretty nice nest egg.

The exemption only applies to your primary residence and you must have lived in the home for at least two of the last five years.

About the PMI/mortgage insurance deduction

PMI/mortgage insurance was tax-deductible for most homebuyers who purchased a home from 2007 to 2016. The program was due to expire several times but Congress renewed it; however, there has been no indication that Congress will renew it again for 2017 or beyond as of this writing.

What you can't deduct

Finally, there are several things you can't take a home ownership tax deduction for, although it may seem reasonable to do so. The cost of homeowner's insurance is not deductable, nor are homeowners' association or condominium fees.

As noted above, the cost of home improvements or repairs are not deductable, though you may be able to deduct them from any capital gains realized once you sell the home. Maintenance costs are not deductible either, except for that portion that may be attributed to supporting a home office.