Contributed by: JanaA, FreeTaxUSA Agent, Tax Pro
Selling your home can be a significant financial event, and in many cases, homeowners may qualify to exclude a portion of the gain from their taxable income. The IRS provides a home sale exclusion if certain ownership and use tests are met.
Under IRS Publication 523, you may exclude a gain up to $250,000 ($500,000 if Married Filing Jointly) if you meet all of the requirements.
Partial Home Exclusion
If you are unable to meet the full two-year residency requirement due to certain qualifying circumstances—such as job relocation, health issues, or other unforeseen events—you may still qualify for a partial exclusion. Additionally, if the property was converted to or used as a rental, you may also be eligible for a partial exclusion.
Handling mixed-use situations
Selling a property that has served both as your personal residence and as a rental can create unique tax considerations. While the IRS allows a home sale exclusion, the rules become more complex when the property has also been used as a rental. In this situation there are a couple of things you need to consider:
1. Depreciation Recapture: When you own rental property, the IRS allows you to deduct the allowed or allowable depreciation each year to account for wear and tear, deterioration, or obsolescence. These deductions reduce your taxable income during the years you own the property. Whether you claim the deductions or not, the IRS assumes you have. That’s what is meant by the ‘allowable’ amount.
However, if you later sell the property for more than you paid for it, the IRS will "recapture" the depreciation you claimed by taxing that portion of your gain — even if you qualify for the home sale exclusion.
2. Nonqualified Use: Nonqualified use refers to any period after 2008 when the home is not used as your primary residence. Depending on the timing and length of nonqualified use, the associated gain may or may not be taxable.
You pay tax on the portion of gain attributable to nonqualified use if:
- The nonqualified use period occurs before you lived in the home as your main residence, or
- The nonqualified use period occurs after 2008 and is more than 3 years after you moved out before selling.
Example #1
You purchased a property in 2015 for $200,000. You rented it out for 4 years (2015–2019).In 2019, you moved in and used it as your main residence for 2 years (2019–2021). You sold the home in 2021 for a $300,000 gain.
- The 4 years of rental before you lived in the home are nonqualified use.
- You must pay tax on the portion of gain attributable to those 4 years.
Only the portion of gain from the 2 years of qualified use can be excluded (up to the limit). You do not pay tax on the portion of gain attributable to nonqualified use if:
- You lived in the home for at least 2 years (meeting the ownership and use tests) and then moved out, renting it for up to 3 years before selling. In this case, that rental period is not considered nonqualified use.
- In that case, you can exclude the gain (up to the limit).
Example #2
You bought a home in 2015 for $250,000 and lived in it until 2022. You then rented it out for 2 years and sold it in 2024 for a $300,000 gain.
- Because the rental period was after your main residence use and the sale was within 3 years, it is not treated as nonqualified use.
You can exclude the gain (up to the limit), but you must pay tax on the allowed or allowable depreciation claimed during the rental period.
Calculating the partial home exclusion for a mixed-use property is a multistep process.
Let’s break it down together using the following example:
Steve and Sally purchased their first home in January 2015 for $250,000. In July of 2023, Sally was offered a promotion that required relocating to another state. Rather than selling immediately, they chose to convert their home into a rental property.
To make the property more appealing to potential tenants, they invested in a kitchen remodel and replaced the carpeting, spending a total of $35,000 on these improvements.
During the years the home was rented, they claimed $13,337 in depreciation. In December 2024, Steve and Sally decided to sell the home for $650,000. The sale incurred total selling expenses of $39,000.
Step 1 – Gather the Facts
- Purchase Date: January 2015
- Purchase Price: $250,000
- Home Improvements: $35,000
- Depreciation Claimed During Rental Period: $13,337
- Sale Date: December 2024
- Sale Price: $650,000
- Selling Expenses: $39,000
- Reason for Sale: Job relocation (qualifying event)
- Ownership Period: Jan 2015 – Dec 2024 = 9 years, 11 months
- Primary Residence Period: Jan 2015 – July 2023 = 8 years, 6 months
- Rental Period: Aug 2023 – Dec 2024 = 1 year, 5 months
Step 2 – Calculate Adjusted Basis
Original Basis: $250,000 + Improvements: $35,000 = $285,000 – Depreciation: $13,337 = $271,663 (Adjusted Basis)
Step 3 – Calculate Total Gain
Sales Price $650,000 – Sales Expenses $39,000 = $611,000Total Gain: Net Sales Price $611,000 – Adjusted Basis $271,663 = $339,337 Step 4 – Depreciation Recapture
The $13,337 in depreciation claimed during the rental period is always taxable at a maximum federal rate of 25% and cannot be excluded under the home sale exclusion rules.
Step 5 – Maximum Exclusion
Married Filing Jointly → $500,000 maximum exclusion.
Step 6 – Apply Nonqualified Use Rules
Because the rental period occurred after Steve and Sally used the home as their primary residence and the sale took place within 3 years of moving out, this rental period is not considered nonqualified use under IRS rules.
Step 7 – Determine Excludable Gain
Subtract depreciation recapture from total gain:$339,337 – $13,337 = $326,000 (potentially excludable gain)
Since $326,000 is less than the $500,000 maximum exclusion, they can exclude the entire amount.
Step 8 – Final Taxable Gain
- Depreciation Recapture (taxable): $13,337
- Excludable Gain: $326,000
FreeTaxUSA’s software will automatically determine and apply the home exclusion for you, based on your specific circumstances, for 2024 and future tax years.
Currently, FreeTaxUSA only supports mixed-use home sale situations when the home that is sold is at the end of a rental period or has a depreciation expense during the tax year when it was sold. If the mixed-use home is sold during a period of personal use and has no depreciation expense from being a rental during the year it is sold, then our software does not support this situation.
If your home meets the above criteria, there are two steps to report the sale of a mixed-use property.
1. Enter the sale in the Rental Income section
2. Enter the sale in the Sale of Main Home section
As each step has many important variables, let’s walk through the steps together.
You will begin by first reporting the sale of the asset in the Rental Income section using the following menu path:
Income >Business Income > Rental Income > Basic Rental Information
On the rental information page, you will need to indicate that you disposed of the property entirely. Once completed, select to continue until you reach the Rental Overview page.
Select to edit the Depreciable Asset section and then select to edit the property asset. On the information screen, you will be prompted to enter the sales information.
Click Continue to be guided through entering details about the sale of this asset. When reporting how you disposed of this property, be sure to indicate that the home sale involves a rental that was also your personal residence.
This will prompt the software to ask you for additional information about the home on the next screens to determine if you qualify for the exclusion of gain.
As you continue with the software, you’ll be guided through entering details about prior-year depreciation and related land costs. After completing this section, the software will generate a depreciation summary for you.
Next, you will report the sale in the Home Sale section using the following menu path: Income > Uncommon Income > Sale of Main Home
If you select that you sold your home, you will be prompted to enter information regarding the sale of the home to see if you qualify for the exclusion of gain.
You will then be prompted to enter details about the sale. This process is similar to the Depreciable Asset information screen. Provide information covering the entire period you owned the home.
Depending on your personal situation, you may be prompted to enter information regarding the nonqualified use. For this example, Steve and Sally do not need to account for the gain from the nonqualified use as they sold their property within three years of moving out.
If you have gains from before your residence or the rental period exceeds the 3-year maximum, the software will ask you about this usage to correctly calculate your taxable gain.
Once you have completed the sale information, the software will provide you with a summary outlining your excluded amount.
When reviewing the tax forms, you’ll notice that the home gain exclusion, depreciation, and total gain are accurately reported on Form 4797, with the taxable depreciation appropriately carried over to Schedule D.
Key takeaways
Selling a home—especially one with mixed personal and rental use—can involve complex tax rules that impact how much of your gain is excluded from taxable income. Understanding the IRS home sale exclusion, partial exclusion provisions, and special considerations such as depreciation recapture and nonqualified use are essential to accurately determine your tax liability. By carefully reviewing your ownership and use history, and applying the IRS guidelines, you can maximize your exclusion and avoid unexpected tax consequences. FreeTaxUSA effectively handles many home exclusion situations and will calculate and generate the forms needed to report the sale. Our support team is here to help you with any questions you may have.