You may be wondering if there are tax deductions you can take when selling a home. The answer is: You bet!

Sure, you may remember that 2018’s new tax code—aka the Tax Cuts and Jobs Act—changed some rules for homeowners. Rest assured that if you sold your home last year (or are planning to in the future), your tax deductions when you file with the IRS can still amount to sizable savings.

Here are five different tax deductions you can take as a home seller:

1. Selling costs. These deductions are allowed as long as they are directly tied to the sale of the home and you lived in the home for at least two out of the five years preceding the sale. Another caveat: The home must be a principal residence and not an investment property. These costs can include legal fees, title fees, advertising costs, commissions, and perhaps even staging costs. Just remember that you can’t deduct these costs in the same way as, say, mortgage interest. Instead, you subtract them from the sale price of your home, which in turn positively affects your capital gains tax.

“I recommend consulting with your tax advisor for further clarification.”

2. Home improvements and repairs. If you renovated a few rooms to make your home more marketable (so you could fetch a higher sale price), you can deduct those upgrade costs as well. This includes painting the house or repairing the roof or water heater. There’s a catch, and it all boils down to timing: You can deduct those expenses as selling costs as long as they were made within 90 days of the closing.

3. Property taxes. This deduction is capped at $10,000. So, if you were dutifully paying your property taxes up to the point when you sold your home, you can deduct the amount you paid in property taxes this year up to $10,000.

4. Mortgage interest. As with property taxes, you can deduct the interest on your mortgage for the portion of the year you owned your home. Just remember that under the 2018 tax code, new homeowners (and home sellers) can deduct the interest on up to only $750,000 of mortgage debt. That is, unless you obtained your mortgage prior to December 15, 2017. If you did, you can deduct up to $1,000,000.

Note that the mortgage interest and property taxes are itemized deductions. This means that, in order for it to work in your favor, all of your itemized deductions need to be greater than the new standard deduction.

5. Capital gains tax for sellers. The rule isn’t technically a deduction (it’s an exclusion), but you’re still going to like it. As a reminder, capital gains are your profits from selling your home—whatever cash is left after paying off your expenses, plus any outstanding mortgage debt. These profits are taxed as income, but here’s the good news: You can exclude up to $250,000 of the capital gains from the sale if you’re single, and $500,000 if married. The only big catch is that you must have lived in your home at least two of the past five years.

If you want further clarification on these five sweet tax deductions, I recommend you consult with your tax advisor. If you have any real estate-related questions for me in the meantime, don’t hesitate to reach out via phone or email. I’d love to hear from you.