Selling your main home usually doesn’t affect your taxes. If you have a loss on the sale, you can't deduct it from income. And if you make a profit, you can often exclude it.
However, to exclude the profit -- which is a capital gain -- you must pass these tests:
Ownership test -- You must own the home for at least 2 of the last 5 years, ending on the date of sale.
Use test -- You must live in the home for at least 2 of the last 5 years, ending on the date of sale. For sales of homes after Dec. 31, 2008, periods of nonqualified use might reduce your exclusion amount. A period of nonqualified use is any period when you, your spouse, or your former spouse doesn’t use the home as a main home.
You can’t have used this exclusion for any residence sold during the 2-year period ending on the date of the current sale.
The ownership and use periods don't have to be continuous. You pass the tests if you show that you owned and lived in the home for either 24 full months or 730 days during the last 5 years.
You can count short, temporary absences for vacations or other seasonal absences as periods of use. This applies even if you rent out the home during your absences.
Amount of Exclusion
The income from the sale of your home is tax-free if all of these apply:
You and your spouse, if married, meet the above tests.
If married, you and your spouse file married filing jointly or married filing separately.
You have a gain of:
$500,000 if married filing jointly
If your gain is more than the exclusion amount for your filing status, only the excess amount is taxable. Ex: If you and your spouse make a profit of $562,000, only $62,000 is taxable.
You can claim the $500,000 exclusion on a joint return if all of these apply:
You and your spouse are married and file a joint return.
Either you or your spouse meets the ownership test.
Both spouses meet the use test.
During the 2-year period ending on the date of the sale, neither you nor your spouse excluded gain from the sale of another home.
Don’t report the sale of your main home on your return unless 1 of these applies:
You have a gain and you don’t qualify to exclude all of it.
You have a gain and choose not to exclude it.
You have a loss and received Form 1099-S.
If you have a taxable gain on the sale of your main home that you can’t exclude, report the entire gain on Form 8949.
If you have a loss on the sale of your main home and received a Form 1099-S, you must report the loss on Form 8949. You'll do this even though the loss isn’t deductible.
You can use your HUD-1 settlement statements from both the home’s sale and the home’s purchase to help determine:
Your adjusted basis in the home
Amount of gain or loss on the sale
You can also use documentation about home improvements to help determine your adjusted basis in the home.
Getting a Reduced Exclusion
You might qualify for a reduced exclusion if the living conditions of a qualified individual change even if you:
Don't pass the use and ownership tests
Have used the exclusion within 2 years of selling your current home
A qualified individual is 1 of these:
You can usually claim a reduced exclusion if the sale of your main home occurs for 1 of these reasons:
You relocated because you changed employment and both of these apply:
The new job is at least 50 miles farther from the new home than the previous job -- or previous home if there was no previous employer.
The change of employment occurred while you owned and used the property as your main home.
A qualified person living in your home has a disease, illness, or injury. So, the sale of the main home is mainly to:
Get, provide, or facilitate 1 of these for the qualified person:
Get or provide medical or personal care for the suffering person
Change homes if a doctor recommends a change of residence due to an issue in getting or providing medical or personal care for the suffering person
A move isn’t considered to be due to health if the move simply benefits general health and well-being.
Unforeseen circumstances arose. These can include:
Natural or man-made disasters
Multiple births from the same pregnancy
Periods of nonqualified use occurring after Dec. 31, 2008, will also reduce the amount you might be eligible to exclude.
To learn more, see IRS Publication 523.
Can Exclude 1 Sale Every 2 Years
You’re only allowed to exclude gain on the sale of a home once every 2 years. This is true unless the reduced gain exclusion rules apply. You usually can't exclude the gain on the sale of a home if both of these apply:
You sold another home at a gain in the past 2 years.
You excluded all or part of that gain during the 2-year period ending on the date of the sale.
If you can't exclude the gain, include the entire amount in your taxable income.
Business or Rental Use
If you meet the ownership and use tests, you might be able to exclude gain from the sale of a home you rented or used for business. Also, if you use part of your home to conduct business, you don't need to allocate the gain to the business portion of the home.
A full exclusion applies when you sell the home. This is true except for allowed and allowable depreciation you claim since May 6, 1997. You can't exclude the gain that’s equal to depreciation deductions you claimed for periods after May 6, 1997. This applies if you claimed depreciation deductions for:
Renting out your home
Using your home for business
If the property is rental property at the time of the sale, report the sale on Form 4797: Sales of Business Property.
Part-Business / Rental and Part-Personal Residence
You might use part of your property as a home and part of it for business or to produce income.
Apartment building where you live in 1 unit and rent out the other units
Store building with upstairs apartment where you live
If you sell the entire property, the IRS considers this a sale of 2 properties. Report the business portion on Form 4797. Report any taxable personal portion on Schedule D. You can exclude the gain only on the portion used as a home.
Allocate these items between the personal portion and the business portion of the sale:
Adjusted basis of property you sold
Attach a statement to your return showing:
Total selling price of the property
Method you used to allocate the amounts between Form 4797 and Schedule D
You don’t need to allocate the sale’s gain between the property’s business portion and its personal portion. This is true if either of these apply to your home:
You used only a small part of your property for business, like a home office.
You used part of your property to produce rental income, like renting out your basement.
You also don’t need to report the sale of the business or rental part on Form 4797. However, you can’t exclude the part of the gain equal to any depreciation allowed or allowable after May 6, 1997.
Modification of the Exclusion
For sales after Dec. 31, 2008, different rules might apply when determining the gain that’s excludable.
Under these rules, you might not be able to exclude gain on the sale of a main home that qualifies for the exclusion. This applies if that gain is allocated to a period of nonqualified use. A period of nonqualified use is any period when you, your spouse, or your former spouse doesn’t use the home as a main home.
However, a period of nonqualified use doesn’t include:
Any period before Jan. 1, 2009
Any period during the 5-year period following the last period when you or your spouse used the home as your main home
A period of temporary absence of up to 2 years for reasons of health, employment, and certain unforeseen circumstances
Any period when you or your spouse served on qualified official extended duty. This period can’t be more than 10 years.
Ex: The Reilly family buys a vacation home on Jan. 1, 2009, for $400,000. On Jan. 1, 2011, they convert the home to their main home. On Jan. 1, 2013, they sell the home for $700,000. Of the $300,000 gain, only $150,000 qualifies for the exclusion:
$300,000 (gain) x 24 (months of qualified use) / 48 (months of total ownership / use) = $150,000
The remaining $150,000 is taxable in the year of sale.
To learn more, see IRS Publication 523: Selling Your Home.