Realized 1031 Blog Articles

How Do You Calculate Capital Gains with a Mortgage?

Written by The Realized Team | Sep 17, 2023

Most homes have a mortgage when they’re sold. Homeowners are able to deduct their mortgage interest annually. But how does a mortgage affect capital gains when the home is sold for a profit? This is what we’re going to dig into today.

Calculating Capital Gains on the Sale of a Home

Capital gains result from selling a home for a profit. There are no taxable gains if the home is sold for breakeven or a loss. Capital gains are the difference between the sale price and the adjusted cost basis. This calculation is similar to most any capital asset.

We can see how to arrive at the capital gains figure using a few examples.

 

Purchase price: $250,000

+ Improvements: $25,000

= Adjusted Basis: $275,000

 

Sales price: $350,000

- Closing cost: 8% ($28,000)

 

Capital gains: $47,000 ($322,000 - $275,000)

 

Homeowners who have lived in the home for at least 2 of the last 5 years can take advantage of the home exclusion. This exclusion is $250,000 for single filers and $500,000 for married filers.

A single filter in the 15% tax bracket who has lived in the home for four years will have long-term capital gains of $7,050.

Since the exclusion of $250,000 is more than the $7,050 of taxable gains, this filer will not owe taxes on the home.

 

Here’s an example that makes full use of the exclusion.

 

Purchase price: $500,000

Improvements: $50,000

Adjusted Basis: $550,000

 

Sales price: $900,000

Closing cost: 8% ($72,000)

 

Capital gains: $278,000

 

Without the exclusion, the filer would owe taxes on $278,000. Once the $250,000 exclusion is applied, they only owe taxes on $28,000.

If the homeowner sells the home for a loss, the exclusion does not apply because taxes are not owed on a loss. The homeowner will be able to deduct up to $3,000 of loss. Any remaining loss is carried over into future years.

How Does a Mortgage Impact Capital Gains?

A mortgage doesn’t directly impact capital gains. However, homeowners who have a qualified mortgage and itemize their deductions are able to deduct mortgage interest annually. 

Once the home is sold, there isn’t anything in the mortgage that impacts capital gains. The homeowner will use proceeds from the sale to pay off their mortgage.

Selling a home is a time-consuming and complex process, especially when you're trying to figure out the various components that may impact capital gains. Working with an experienced realtor and tax specialist can help ensure this process goes smoothly.