Many of us dream of the day we’re entirely debt-free and paying off the mortgage can be at the top of the list. Saving for retirement, planning for children’s college education, and maintaining a cash cushion for emergencies are just a few items competing for your hard-earned dollars. If you’re thinking of paying off your mortgage, understanding recent changes in the tax law, specifically the changes to the “standard deduction,” can be a key deciding factor.

It’s important to understand whether it makes more sense to prepay your mortgage or invest the extra money elsewhere. For example, take a home with a $300,000 balance and 20 years remaining on a 30-year mortgage at 6.25 percent. Let’s assume you begin paying an additional $400 per month toward your mortgage. In the end, you’d have saved yourself $62,000 in interest and have the loan paid off six years earlier. This may sound like a great plan initially, but you won’t really know until you compare this option against other investment vehicles and the rate of return they can provide.

If you are looking to prepay your mortgage, it’s important that you know what your after-tax rate would be. This is what your mortgage is really costing you. For example, if you were in the 24 percent tax bracket and were able to deduct the mortgage interest on your federal income tax return, the after-tax cost of a 6.25 percent mortgage would be approximately 4.75 percent. You would then compare this rate to what other low-risk investments are earning. If they are returning less, say 3 percent, then paying down or paying off your mortgage may make financial sense. However, make sure that you are not at the risk of depleting your emergency fund, which is typically six months of living expenses.

“Suddenly you can guarantee yourself almost a 5 percent return on your investment. Pay down your non-deductible home mortgage and then keep a home-equity credit line handy for a rainy day,” said Brian George, Managing Partner of the locally based accounting firm CALAS Group.

Being able to deduct the interest from your mortgage has been a strong incentive for home ownership over the years. However, recent changes in the tax law, more specifically the “standard deduction,” have virtually eliminated this benefit for millions of Americans. The majority of filers will see that it nearly doubled to $12,000 for those filing as single and $24,000 for those filing as married. Additionally, state and local income, sales and property tax deductions – aka SALT – are capped at total of $10,000 per tax return. This is another factor to consider and may tip the scales against itemizing.

Many will simply not have enough dollars in mortgage interest, charitable donations, medical and dental expenses, etc., to exceed the threshold and itemize their write-offs. Also adding to the issue is the limitation of the mortgage interest deduction up to $750,000 for two homes, which was previously $1 million. However, properties purchased prior to 2018 are grandfathered in under the $1 million threshold. Home-equity loans have also been affected, allowing for the interest deduction only if the proceeds were used to buy, build or improve a home.

There’s a lot to consider when thinking of paying down or off your mortgage. Your personal financial adviser and accountant can provide you with the valuable tools and information needed to make a smart and informed decision.