It can be tempting to withdraw the equity that’s built up in your home. Let’s take a look at when home equity becomes taxable, how to tap into the equity you have, and available tax deductions when using your home equity.

When Home Equity Becomes Taxable

Home equity isn’t taxed when you haven’t tapped it. However, if you’re looking to take advantage of the equity you’ve built, you’re probably wondering when it becomes taxable. The only time you’ll have to pay tax on your home equity is when you sell your property. In this case, the total tax that will be due will vary depending on a variety of situations.

For a Primary Home

If your home meets the eligibility requirements for a primary residence, you’ll be able to exclude a certain amount of equity from being taxed as a gain. The exclusion limit differs whether you’re single or married:

Married filing jointly: $500,000Single, head of household: $250,000

For Other Properties

The amount of tax you’ll need to pay in the sale of other types of properties will differ based on your situation. As tax laws are complicated, you’ll want to consult professional help when calculating the tax burden of your gain. Short-term capital gains tax may be charged on an investment property that you’ve owned less than a year, while long-term capital gains tax—which can be cheaper—falls into place after you’ve held the property for a year. You may also encounter situations such as an inheritance. Choosing to sell a property you’ve inherited results in tax—but only on the difference in the value of the home when you inherited it versus when you sold it.

How To Tap Home Equity Without Taxable Income

What happens if you’d like to tap into your home equity without being hit with taxes or needing to sell your home? There are a couple of different options available to you, including home equity loans, refinancing, or home equity lines of credit.

Home Equity Loan

If you already have a loan on your home but you’d like to withdraw equity without refinancing, you can do so. Home equity loans are one option for this. A type of second mortgage, these allow you to obtain a loan against the equity currently in your property. Like your first mortgage, you’ll receive the funds in a lump sum, and you’ll have to pay back the loan in installments.

Refinancing

Refinancing is another way of getting a hold of that equity without being subject to taxes. There are multiple types of refinances, but a cash-out refinance will deposit a lump sum of funds into your account. Refinances pay off your existing mortgage for a new one, but be aware that using a cash-out refinance may change your mortgage payment if you’re taking on additional debt. Refinancing also has additional costs; you may need to pay fees and closing costs for a refinance just as you did when you first purchased your home.

Home Equity Line of Credit

A home equity line of credit (HELOC) operates like a credit card: You have a revolving line of credit against which you can make purchases. Unlike a home equity loan, you’ll only pay interest on the amount you actually use. However, be aware that HELOCs have a specific draw period. During the draw period, you’ll usually make interest-only payments. Once that draw period ends, you’ll need to pay back both the principal you borrowed and any interest that has accrued.

Tax Deductions for Home Equity Financing

There’s another benefit to choosing home equity financing over selling, aside from avoiding taxes. Depending on how you’re using the money, you may be able to deduct the interest you pay on your HELOC or home equity loan from your taxable income. In order for the interest to be deductible, you’ll need to have used the money from your financing to “buy, build, or substantially improve the taxpayer’s home that secures the loan.” This means that if you use the funds to replace your roof, the interest you’ve paid may be tax-deductible. If you take a nice family vacation with the money instead, your interest costs won’t be deductible. Refinancing, meanwhile, maintains a single mortgage loan on your property. This means that no matter what you do with the money, the mortgage interest will be tax-deductible—up to the threshold. The amount of loan interest you can deduct is determined by your filing status and when you acquired your mortgage. If your loan closed after Dec. 16, 2017, and you are:

Married filing jointly, single, head of household: The first $750,000 of indebtednessMarried filing separately: The first $375,000 of indebtedness

If your loan closed before Dec. 16, 2017, and you are:

Married filing jointly, single, head of household: The first $1,000,000 of indebtednessMarried filing separately: The first $500,000 of indebtedness

In order to claim the deduction for the interest you’ve paid, whether it’s for a HELOC, your mortgage, or a home equity loan, you’ll need to file the 1040 or 1040-SR. Then, using Schedule A, you’ll itemize the amount of interest you paid for the year. Want to read more content like this? Sign up for The Balance’s newsletter for daily insights, analysis, and financial tips, all delivered straight to your inbox every morning!