Here’s the scoop on what’s tax deductible when buying a house.

Are closing costs tax deductible? What about mortgage interest? Or property taxes? The answer is, maddeningly, “It depends.”

Basically, you’ll want to itemize if you have deductions totaling more than the standard deduction, which is $12,000 for single people and $24,000 for married couples filing jointly. Every taxpayer gets this deduction, homeowner or not. And most people take it because their actual itemized deductions are less than the standard amount.

But should you take it?

To decide, you need to know what’s tax deductible when buying or owning a house. Here’s the list of possible deductions:

Closing Costs

The one-time home purchase costs that are tax deductible are mortgage interest paid, real estate taxes, and some loan origination fees (a.k.a. points) applicable to a mortgage of $750,000 or less.

But you’ll only want to itemize them if all your deductions total more than the standard deduction.

Costs of closing on a home that aren’t tax deductible include:

  • Real estate commissions
  • Appraisals
  • Home inspections
  • Attorney fees
  • Title fees
  • Transfer taxes
  • Mortgage refi fees

Mortgage interest and property taxes are annual expenses of owning a home that may or may not be deductible. Continue reading to learn more about those.

Mortgage Interest

Yearly, you can write off the interest you pay on up to $750,000 of mortgage debt. Most homeowners don’t have mortgages large enough to hit the cap, says Evan Liddiard, CPA, director of federal tax policy for the National Association of REALTORS®. But people who live in pricey places like San Francisco and Manhattan, or homeowners anywhere with hefty mortgages, will likely maximize the mortgage interest deduction.

Note: The $750,000 cap affects loans taken out after Dec. 17, 2017. If you have an loan older than that and you itemize, you can keep deducting your mortgage interest debt up to $1 million. But if you re-fi that loan, you can only deduct the interest on the amount up to the balance on the day you refinanced – you can’t take extra cash and deduct the interest on the excess.

Home Equity Loan Interest

You can deduct the interest on a home equity loan or a second mortgage. But — and this is a big but — only if you use the proceeds to substantially improve your house, and only if the loan, combined with your first mortgage, doesn’t add up to more than the magic number of $750,000 (or $1 million if the loans were existing as of Dec. 15, 2017).

If you use a home equity loan to pay medical bills, go to Paris, or for anything but home improvement, you can’t write off the interest on your taxes.

State and Local Taxes

You can deduct state and local taxes you paid, including property, sales, and income taxes, up to $10,000. That’s a low cap for people who live in places where state and local taxes are high, says Liddiard. To give you an idea of how low: The average New Yorker has taken $21,000 in state and local tax deductions in past years.

Loss From a Disaster

You can write off the cost of damage to your home if it’s caused by an event in a federally declared disaster zone, like areas in Florida after Hurricane Michael or Shasta County, Calif., after a rash of wildfires.

This means standard-variety disasters like a busted water pipe while you’re on vacation or a fire caused because you left the toaster on aren’t deductible.

Moving Expenses

This deduction is also only for some. You can deduct moving expenses if you’re an active member of the armed forces moving to a new station.

And by the way, no matter who you are, if your employer pays your moving expenses, you’ll have to pay taxes on the reimbursement. “This will be a real hardship to many because it’s non-cash income,” says Liddiard.  Some employers may up the gross to provide cash to pay the tax, but many likely will not.

Home Office

This is a deduction you don’t have to itemize. You can take it on top of the standard deduction, but only if you’re self-employed. If you are an employee and your boss lets you telecommute a day or two a week, you can’t write off home office expenses. You claim it on Schedule C.

Related: 2 Ways to Claim Home Office Expenses

Student Loans

Anyone paying a mortgage and a student loan payment will be happy to hear that the interest on your education loan is tax-deductible on top of the standard deduction (no need to itemize). And you can deduct as much as $2,500 in interest per year, depending on your modified adjusted gross income.

Ways to Increase Your Eligible Deductions

There are some other itemize-able costs not related to being a homeowner that could bump you up over the standard deduction. This might allow you to write off your mortgage interest. Charitable contributions and some medical expenses are itemize-able, although medical expenses must exceed 7.5% of your adjusted gross income.

So if you’ve have had a hospital stay or are generous, you could be in itemized-deduction land.

Also, if you’re a single homeowner, it could be easier for you to exceed the standard deduction, Liddiard says. The itemized deductions on your house will probably more quickly break the $12,000 standard deduction threshold than a couple’s similar house will break their $24,000 threshold.

Tax-Savvy Home-Buying Ideas

If you’re a prospective homeowner with an eye to making the most efficient use of your tax benefits, here are a few ways to buy smart:

  • Especially in expensive areas, buy a less expensive home so you don’t hit the cap on mortgage debt and local and property taxes, says Lisa Greene-Lewis, a CPA and tax expert for TurboTax.
  • If you’re buying a higher price home, make a bigger down payment so your original mortgage doesn’t exceed the $750,000 cap.

How to Decide If You Should Itemize

To see whether you should consider itemizing, plug your numbers into this clever tool from TurboTax, and you’ll get their recommendation in just a few seconds.

Though every homeowner’s tax benefits will be a little different, in the end, you’re building equity, you’ll likely make money when you sell, and you have the freedom to paint your walls any color you want and get a dog.

Copyright 2018 NATIONAL ASSOCIATION OF REALTORS®