skip navigation

Search Help
Navigation Help

Topic Index
ABCDEFGHI
JKLMNOPQR
STUVWXYZ#

FAQs
Forms
Publications
Tax Topics

Comments
About Tax Map

IRS.gov Website
Publication 17
taxmap/pub17/p17-082.htm#en_us_publink1000172428

Excluding the Gain(p110)

rule
You may qualify to exclude from your income all or part of any gain from the sale of your main home. This means that, if you qualify, you will not have to pay tax on the gain up to the limit described under Maximum Exclusion, next. To qualify, you must meet the ownership and use tests described later.
You can choose not to take the exclusion by including the gain from the sale in your gross income on your tax return for the year of the sale.
You can use Worksheet 2 in Publication 523 to figure the amount of your exclusion and your taxable gain, if any.
EIC
If you have any taxable gain from the sale of your home, you may have to increase your withholding or make estimated tax payments. See Publication 505, Tax Withholding and Estimated Tax.
taxmap/pub17/p17-082.htm#en_us_publink1000172431

Maximum Exclusion(p110)

rule
You can exclude up to $250,000 of the gain (other than gain allocated to periods of nonqualified use) on the sale of your main home if all of the following are true.
For details on gain allocated to periods of nonqualified use, see Periods of nonqualified use, later.
You may be able to exclude up to $500,000 of the gain (other than gain allocated to periods of nonqualified use) on the sale of your main home if you are married and file a joint return and meet the requirements listed in the discussion of the special rules for joint returns, later, under Married Persons.
taxmap/pub17/p17-082.htm#en_us_publink1000172432

Ownership and Use Tests(p110)

rule
To claim the exclusion, you must meet the ownership and use tests. This means that during the 5-year period ending on the date of the sale, you must have:
taxmap/pub17/p17-082.htm#en_us_publink1000172433

Exception.(p110)

rule
If you owned and lived in the property as your main home for less than 2 years, you can still claim an exclusion in some cases. However, the maximum amount you may be able to exclude will be reduced. See Reduced Maximum Exclusion, later.
taxmap/pub17/p17-082.htm#en_us_publink1000172435

Example 1—home owned and occupied for at least 2 years.(p110)

Mya bought and moved into her main home in September 2009. She sold the home at a gain on September 15, 2012. During the 5-year period ending on the date of sale (September 16, 2007–September 15, 2012), she owned and lived in the home for more than 2 years. She meets the ownership and use tests.
taxmap/pub17/p17-082.htm#en_us_publink1000172436

Example 2—ownership test met but use test not met.(p110)

Ayden bought a home in 2007. After living in it for 6 months, he moved out. He never lived in the home again and sold it at a gain on June 28, 2012. He owned the home during the entire 5-year period ending on the date of sale (June 29, 2007–June 28, 2012). However, he did not live in it for the required 2 years. He meets the ownership test but not the use test. He cannot exclude any part of his gain on the sale unless he qualified for a reduced maximum exclusion (explained later).
taxmap/pub17/p17-082.htm#en_us_publink1000172437

Period of Ownership and Use(p110)

rule
The required 2 years of ownership and use during the 5-year period ending on the date of the sale do not have to be continuous nor do they both have to occur at the same time.
You meet the tests if you can show that you owned and lived in the property as your main home for either 24 full months or 730 days (365 × 2) during the 5-year period ending on the date of sale.
taxmap/pub17/p17-082.htm#en_us_publink1000172438

Temporary absence.(p110)

rule
Short temporary absences for vacations or other seasonal absences, even if you rent out the property during the absences, are counted as periods of use. The following examples assume that the reduced maximum exclusion (discussed later) does not apply to the sales.
taxmap/pub17/p17-082.htm#en_us_publink1000172439

Example 1.(p110)

David Johnson, who is single, bought and moved into his home on February 1, 2010. Each year during 2010 and 2011, David left his home for a 2-month summer vacation. David sold the house on March 1, 2012. Although the total time David used his home is less than 2 years (21 months), he meets the requirement and may exclude gain. The 2-month vacations are short temporary absences and are counted as periods of use in determining whether David used the home for the required 2 years.
taxmap/pub17/p17-082.htm#en_us_publink1000172440

Example 2.(p110)

Professor Paul Beard, who is single, bought and moved into a house on August 28, 2009. He lived in it as his main home continuously until January 5, 2011, when he went abroad for a 1-year sabbatical leave. On February 6, 2012, 1 month after returning from the leave, Paul sold the house at a gain. Because his leave was not a short temporary absence, he cannot include the period of leave to meet the 2-year use test. He cannot exclude any part of his gain, because he did not use the residence for the required 2 years.
taxmap/pub17/p17-082.htm#en_us_publink1000172441

Ownership and use tests met at different times.(p110)

rule
You can meet the ownership and use tests during different 2-year periods. However, you must meet both tests during the 5-year period ending on the date of the sale.
taxmap/pub17/p17-082.htm#en_us_publink1000172442

Example.(p110)

Beginning in 2001, Helen Jones lived in a rented apartment. The apartment building was later converted to condominiums, and she bought her same apartment on December 3, 2009. In 2010, Helen became ill and on April 14 of that year she moved to her daughter's home. On July 12, 2012, while still living in her daughter's home, she sold her condominium.
Helen can exclude gain on the sale of her condominium because she met the ownership and use tests during the 5-year period from July 13, 2007, to July 12, 2012, the date she sold the condominium. She owned her condominium from December 3, 2009, to July 12, 2012 (more than 2 years). She lived in the property from July 13, 2007 (the beginning of the 5-year period), to April 14, 2010 (more than 2 years).
The time Helen lived in her daughter's home during the 5-year period can be counted toward her period of ownership, and the time she lived in her rented apartment during the 5-year period can be counted toward her period of use.
taxmap/pub17/p17-082.htm#en_us_publink1000172443

Cooperative apartment.(p111)

rule
If you sold stock as a tenant-stockholder in a cooperative housing corporation, the ownership and use tests are met if, during the 5-year period ending on the date of sale, you:
taxmap/pub17/p17-082.htm#en_us_publink1000172444

Exceptions to Ownership and Use Tests(p111)

rule
The following sections contain exceptions to the ownership and use tests for certain taxpayers.
taxmap/pub17/p17-082.htm#en_us_publink1000172445

Exception for individuals with a disability.(p111)

rule
There is an exception to the use test if: Under this exception, you are considered to live in your home during any time within the 5-year period that you own the home and live in a facility (including a nursing home) licensed by a state or political subdivision to care for persons in your condition.
If you meet this exception to the use test, you still have to meet the 2-out-of-5-year ownership test to claim the exclusion.
taxmap/pub17/p17-082.htm#en_us_publink1000172446

Previous home destroyed or condemned.(p111)

rule
For the ownership and use tests, you add the time you owned and lived in a previous home that was destroyed or condemned to the time you owned and lived in the replacement home on whose sale you wish to exclude gain. This rule applies if any part of the basis of the home you sold depended on the basis of the destroyed or condemned home. Otherwise, you must have owned and lived in the same home for 2 of the 5 years before the sale to qualify for the exclusion.
taxmap/pub17/p17-082.htm#en_us_publink1000172447

Members of the uniformed services or Foreign Service, employees of the intelligence community, or employees or volunteers of the Peace Corps.(p111)

rule
You can choose to have the 5-year test period for ownership and use suspended during any period you or your spouse serve on "qualified official extended duty" as a member of the uniformed services or Foreign Service of the United States, or as an employee of the intelligence community. You can choose to have the 5-year test period for ownership and use suspended during any period you or your spouse serve outside the United States either as an employee of the Peace Corps on "qualified official extended duty" or as an enrolled volunteer or volunteer leader of the Peace Corps. This means that you may be able to meet the 2-year use test even if, because of your service, you did not actually live in your home for at least the required 2 years during the 5-year period ending on the date of sale.
If this helps you qualify to exclude gain, you can choose to have the 5-year test period suspended by filing a return for the year of sale that does not include the gain.
For more information about the suspension of the 5-year test period, see Members of the uniformed services or Foreign Service, employees of the intelligence community, or employees or volunteers of the Peace Corps in Publication 523.
taxmap/pub17/p17-082.htm#en_us_publink1000172450

Married Persons(p111)

rule
If you and your spouse file a joint return for the year of sale and one spouse meets the ownership and use tests, you can exclude up to $250,000 of the gain. (But see Special rules for joint returns, next.)
taxmap/pub17/p17-082.htm#en_us_publink1000172452

Special rules for joint returns.(p111)

rule
You can exclude up to $500,000 of the gain on the sale of your main home if all of the following are true.If either spouse does not satisfy all these requirements, the maximum exclusion that can be claimed by the couple is the total of the maximum exclusions that each spouse would qualify for if not married and the amounts were figured separately. For this purpose, each spouse is treated as owning the property during the period that either spouse owned the property.
taxmap/pub17/p17-082.htm#en_us_publink1000172453

Example 1—one spouse sells a home.(p111)

Emily sells her home in June 2012 for a gain of $300,000. She marries Jamie later in the year. She meets the ownership and use tests, but Jamie does not. Emily can exclude up to $250,000 of gain on a separate or joint return for 2012. The $500,000 maximum exclusion for certain joint returns does not apply because Jamie does not meet the use test.
taxmap/pub17/p17-082.htm#en_us_publink1000172454

Example 2—each spouse sells a home.(p111)

The facts are the same as in Example 1 except that Jamie also sells a home in 2012 for a gain of $200,000 before he marries Emily. He meets the ownership and use tests on his home, but Emily does not. Emily can exclude $250,000 of gain and Jamie can exclude $200,000 of gain on the respective sales of their individual homes. However, Emily cannot use Jamie's unused exclusion to exclude more than $250,000 of gain. Therefore, Emily and Jamie must recognize $50,000 of gain on the sale of Emily's home. The $500,000 maximum exclusion for certain joint returns does not apply because Emily and Jamie do not both meet the use test for the same home.
taxmap/pub17/p17-082.htm#en_us_publink1000172455

Sale of main home by surviving spouse.(p111)

rule
If your spouse died and you did not remarry before the date of sale, you are considered to have owned and lived in the property as your main home during any period of time when your spouse owned and lived in it as a main home.
If you meet all of the following requirements, you may qualify to exclude up to $500,000 of any gain from the sale or exchange of your main home.
taxmap/pub17/p17-082.htm#en_us_publink1000172456
Example.(p111)
Harry owned and used a house as his main home since 2008. Harry and Wilma married on July 1, 2012, and from that date they use Harry's house as their main home. Harry died on August 15, 2012, and Wilma inherited the property. Wilma sold the property on September 3, 2012, at which time she had not remarried. Although Wilma owned and used the house for less than 2 years, Wilma is considered to have satisfied the ownership and use tests because her period of ownership and use includes the period that Harry owned and used the property before death.
taxmap/pub17/p17-082.htm#en_us_publink1000172457

Home transferred from spouse.(p111)

rule
If your home was transferred to you by your spouse (or former spouse if the transfer was incident to divorce), you are considered to have owned it during any period of time when your spouse owned it.
taxmap/pub17/p17-082.htm#en_us_publink1000172458

Use of home after divorce.(p111)

rule
You are considered to have used property as your main home during any period when:
taxmap/pub17/p17-082.htm#en_us_publink1000172459

Reduced Maximum Exclusion(p112)

rule
If you fail to meet the requirements to qualify for the $250,000 or $500,000 exclusion, you may still qualify for a reduced exclusion. This applies to those who:
In both cases, to qualify for a reduced exclusion, the sale of your main home must be due to one of the following reasons.
taxmap/pub17/p17-082.htm#en_us_publink1000172460

Unforeseen circumstances.(p112)

rule
The sale of your main home is because of an unforeseen circumstance if your primary reason for the sale is the occurrence of an event that you could not reasonably have anticipated before buying and occupying your main home.
See Publication 523 for more information and to use Worksheet 3 to figure your reduced maximum exclusion.