While there are tax deductions you can take when selling a home, the new Tax Cuts and Jobs Act has created some confusion this filing season.

But rest assured that if you sold your home last year (or are planning to in the future), the tax deductions still may amount to sizable savings when you file with the IRS. Here, realtor.com offers a rundown of all the tax deductions (as well as tax exemptions or other write-offs) at your disposal.

 

1. Selling costs

These deductions are still allowed under the new tax law as long as they are directly tied to the sale of the home and a married couple—or a single taxpayer—lived in the home for at least two out of the five years preceding the sale. Note: The home must be a principal residence and not an investment property.

Among the deductions are any costs associated with selling the home, including legal, escrow and home-staging fees, as well as advertising costs and real estate agent commissions.

Just remember that you can’t deduct these costs in the same way as mortgage interest. Instead, you subtract them from the sales price of your home, which in turn positively affects your capital-gains tax.

 

2. Home improvements and repairs

If you renovated a few rooms to make your home more marketable (and to can snag a heftier sale price), now you can deduct those upgrade costs as well. This includes painting the house or repairing the roof or water heater.

But there’s a catch, and it all boils down to timing. If improvements were necessary to sell your home, 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 still allowed, but your total deductions are capped at $10,000. If you were 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

You are allowed to deduct the interest on your mortgage for the portion of the year you owned your home. However, the rules have changed slightly from last year. Under the new tax code, new homeowners (and home sellers) can deduct the interest on up to only $750,000 of mortgage debt, although homeowners who got their mortgage before Dec. 15, 2017, can continue deducting up to the original amount up to $1 million.

Note: The mortgage interest and property taxes are itemized deductions, which means that all of your itemized deductions need to be greater than the new standard deduction that the Tax Cuts and Jobs Act nearly doubled to $12,200 for individuals, $18,350 for heads of household and $24,400 for married couples filing jointly. (For comparison, it used to be $12,700 for married couples filing jointly.)

 

5. What about with capital-gains tax for sellers?

Home sellers can still use the capital-gains rule. Technically, however, it’s an exclusion rather than a deduction. Capital gains are your profits from selling your home—including whatever cash is left after paying off your expenses, plus any outstanding mortgage debt—and these profits are taxed as income.

The good news is that you can exclude up to $250,000 of the capital gains from the sale if you’re single and $500,000 if married. Note: You must have lived in your home at least two of the past five years.