skip navigation

Search Help
Navigation Help

Topic Index
ABCDEFGHI
JKLMNOPQR
STUVWXYZ#

FAQs
Forms
Publications
Tax Topics

Comments
About Tax Map

IRS.gov Website
Publication 523
taxmap/pubs/p523-003.htm#en_us_publink1000200709

Excluding the Gain(p10)

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. This choice can be made (or revoked) at any time before the expiration of a 3-year period beginning on the due date of your return (not including extensions) for the year of the sale.
You can use Worksheet 2 (near the end of this publication) 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/pubs/p523-003.htm#en_us_publink1000200711

Maximum Exclusion(p10)

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 Nonqualified Use, later.
If you and another person owned the home jointly but file separate returns, each of you can exclude up to $250,000 of gain from the sale of your interest in the home if each of you meets the three conditions just listed.
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/pubs/p523-003.htm#en_us_publink1000200713

Ownership and Use Tests(p10)

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/pubs/p523-003.htm#en_us_publink1000200714

Exception.(p10)

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/pubs/p523-003.htm#en_us_publink1000200716

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

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, 2009 – September 15, 2012), she owned and lived in the home for more than 2 years. She meets the ownership and use tests.
taxmap/pubs/p523-003.htm#en_us_publink1000200717

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

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/pubs/p523-003.htm#en_us_publink1000200719

Period of Ownership and Use(p10)

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/pubs/p523-003.htm#en_us_publink1000200720

Example.(p10)

Naomi bought and moved into a house in July 2008. She lived there for 13 months and then moved in with a friend. She moved back into her own house in 2011 and lived there for 12 months until she sold it in July 2012. Naomi meets the ownership and use tests because, during the 5-year period ending on the date of sale, she owned the house for more than 2 years and lived in it for a total of 25 (13 + 12) months.
taxmap/pubs/p523-003.htm#en_us_publink1000200721

Temporary absence.(p11)

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/pubs/p523-003.htm#en_us_publink1000200722

Example 1.(p11)

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 lived in his home is less than 2 years (21 months), he meets the use 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/pubs/p523-003.htm#en_us_publink1000200723

Example 2.(p11)

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 his 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/pubs/p523-003.htm#en_us_publink1000200724

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

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/pubs/p523-003.htm#en_us_publink1000200725

Example.(p11)

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/pubs/p523-003.htm#en_us_publink1000200726

Cooperative apartment.(p11)

rule
If you sold stock as a tenant-shareholder 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/pubs/p523-003.htm#en_us_publink1000200727

Exceptions to Ownership and Use Tests(p11)

rule
The following sections contain exceptions to the ownership and use tests for certain taxpayers.
taxmap/pubs/p523-003.htm#en_us_publink1000200728

Exception for individuals with a disability.(p11)

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/pubs/p523-003.htm#en_us_publink1000200729

Previous home destroyed or condemned.(p11)

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 (see Involuntary Conversions in Publication 551). 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/pubs/p523-003.htm#en_us_publink1000200730

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

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 (defined later) 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 (defined later) 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.
taxmap/pubs/p523-003.htm#en_us_publink1000200731

Example.(p12)

John bought and moved into a home in 2004. He lived in it as his main home for 21/2 years. For the next 6 years, he did not live in it because he was on qualified official extended duty with the Army. He then sold the home at a gain in 2012. To meet the use test, John chooses to suspend the 5-year test period for the 6 years he was on qualified official extended duty. This means he can disregard those 6 years. Therefore, John's 5-year test period consists of the 5 years before he went on qualified official extended duty. He meets the ownership and use tests because he owned and lived in the home for 21/2 years during this test period.
taxmap/pubs/p523-003.htm#en_us_publink1000200732
Period of suspension.(p12)
The period of suspension cannot last more than 10 years. Together, the 10-year suspension period and the 5-year test period can be as long as, but no more than, 15 years. You cannot suspend the 5-year period for more than one property at a time. You can revoke your choice to suspend the 5-year period at any time.
taxmap/pubs/p523-003.htm#en_us_publink1000200733

Example.(p12)

Mary bought a home on April 1, 1996. She used it as her main home until August 31, 1999. On September 1, 1999, she went on qualified official extended duty with the Navy. She did not live in the house again before selling it on July 31, 2012. Mary chooses to use the entire 10-year suspension period. Therefore, the suspension period would extend back from July 31, 2012, to August 1, 2002, and the 5-year test period would extend back to August 1, 1997. During that period, Mary owned the house all 5 years and lived in it as her main home from August 1, 1997, until August 31, 1999, a period of more than 24 months. She meets the ownership and use tests because she owned and lived in the home for at least 2 years during this test period.
taxmap/pubs/p523-003.htm#en_us_publink1000200734
Uniformed services.(p12)
The uniformed services are:
taxmap/pubs/p523-003.htm#en_us_publink1000200735
Foreign Service member.(p12)
For purposes of the choice to suspend the 5-year test period for ownership and use, you are a member of the Foreign Service if you are any of the following.
taxmap/pubs/p523-003.htm#en_us_publink1000200736
Employee of the intelligence community.(p12)
For purposes of the choice to suspend the 5-year test period for ownership and use, you are an employee of the intelligence community if you are an employee of any of the following.
taxmap/pubs/p523-003.htm#en_us_publink1000200737
Qualified official extended duty.(p12)
You are on qualified official extended duty if you are on extended duty while:
You are on extended duty when you are called or ordered to active duty for a period of more than 90 days or for an indefinite period.
taxmap/pubs/p523-003.htm#en_us_publink1000200739

Married Persons(p12)

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/pubs/p523-003.htm#en_us_publink1000200740

Special rules for joint returns.(p12)

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/pubs/p523-003.htm#en_us_publink1000200741

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

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/pubs/p523-003.htm#en_us_publink1000200742

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

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/pubs/p523-003.htm#en_us_publink1000200743

Sale of main home by surviving spouse.(p13)

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. The ownership and use tests were described earlier.
taxmap/pubs/p523-003.htm#en_us_publink1000200744

Example.(p13)

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 used Harry's house as their main home. Harry died on August 15, 2012, and Wilma inherited the property. Wilma sold the property on September 1, 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/pubs/p523-003.htm#en_us_publink1000200745

Home transferred from spouse.(p13)

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/pubs/p523-003.htm#en_us_publink1000200746

Use of home after divorce.(p13)

rule
You are considered to have used property as your main home during any period when:
taxmap/pubs/p523-003.htm#en_us_publink1000200747

Reduced Maximum Exclusion(p13)

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/pubs/p523-003.htm#en_us_publink1000200748

Qualified individual.(p13)

rule
For purposes of the reduced maximum exclusion, a qualified individual is any of the following.
taxmap/pubs/p523-003.htm#en_us_publink1000200749

Primary reason for sale.(p13)

rule
One of the three reasons above will be considered to be the primary reason you sold your home if either (1) or (2) is true.
  1. You qualify under a "safe harbor." This is a specific set of facts and circumstances that, if applicable, qualifies you to claim a reduced maximum exclusion. Safe harbors corresponding to the reasons listed above are described later.
  2. A safe harbor does not apply, but you can establish, based on facts and circumstances, that the primary reason for the sale is a change in place of employment, health, or unforeseen circumstances.
     Factors that may be relevant in determining your primary reason for sale include whether:
    1. Your sale and the circumstances causing it were close in time,
    2. The circumstances causing your sale occurred during the time you owned and used the property as your main home,
    3. The circumstances causing your sale were not reasonably foreseeable when you began using the property as your main home,
    4. Your financial ability to maintain the property became materially impaired,
    5. The suitability of the property as your main home materially changed, and
    6. During the time you owned the property, you used it as your home.
taxmap/pubs/p523-003.htm#en_us_publink1000200750

Change in Place of Employment(p14)

rule
You may qualify for a reduced exclusion if the primary reason for the sale of your main home is a change in the location of employment of a qualified individual.
taxmap/pubs/p523-003.htm#en_us_publink1000200751

Employment.(p14)

rule
For this purpose, employment includes the start of work with a new employer or continuation of work with the same employer. It also includes the start or continuation of self-employment.
taxmap/pubs/p523-003.htm#en_us_publink1000200752

Distance safe harbor.(p14)

rule
A change in place of employment is considered to be the reason you sold your home if:
taxmap/pubs/p523-003.htm#en_us_publink1000200753

Example.(p14)

Justin was unemployed and living in a townhouse in Florida he had owned and used as his main home since 2011. He got a job in North Carolina and sold his townhouse in 2012. Because the distance between Justin's new place of employment and the home he sold is at least 50 miles, the sale satisfies the conditions of the distance safe harbor. Justin's sale of his home is considered to be because of a change in place of employment, and he is entitled to claim a reduced maximum exclusion of gain from the sale.
taxmap/pubs/p523-003.htm#en_us_publink1000200754

Health(p14)

rule
The sale of your main home is because of health if your primary reason for the sale is:
The sale of your home is not because of health if the sale merely benefits a qualified individual's general health or well-being.
For purposes of this reason, a qualified individual includes, in addition to the individuals listed earlier under Qualified individual, any of the following family members of these individuals.
taxmap/pubs/p523-003.htm#en_us_publink1000200756

Example.(p14)

In 2011, Chase and Lauren, husband and wife, bought a house that they used as their main home. Lauren's father has a chronic disease and is unable to care for himself. In 2012, Chase and Lauren sold their home in order to move into Lauren's father's house to provide care for him. Because the primary reason for the sale of their home was to provide care for Lauren's father, Chase and Lauren are entitled to a reduced maximum exclusion.
taxmap/pubs/p523-003.htm#en_us_publink1000200757

Doctor's recommendation safe harbor.(p14)

rule
Health is considered to be the reason you sold your home if, for one or more of the reasons listed at the beginning of this discussion, a doctor recommends a change of residence.
taxmap/pubs/p523-003.htm#en_us_publink1000200758

Unforeseen Circumstances(p14)

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 that home. You are not considered to have an unforeseen circumstance if the primary reason you sold your home was that you preferred to get a different home or because your finances improved.
taxmap/pubs/p523-003.htm#en_us_publink1000200759

Specific event safe harbors.(p14)

rule
Unforeseen circumstances are considered to be the reason for selling your home if any of the following events occurred while you owned and used the property as your main home.
  1. An involuntary conversion of your home, such as when your home is destroyed or condemned.
  2. Natural or man-made disasters or acts of war or terrorism resulting in a casualty to your home, whether or not your loss is deductible.
  3. In the case of qualified individuals (listed earlier under Qualified individual):
    1. Death,
    2. Unemployment (if the individual is eligible for unemployment compensation),
    3. A change in employment or self-employment status that results in the individual's inability to pay reasonable basic living expenses (listed under Reasonable basic living expenses, below) for his or her household,
    4. Divorce or legal separation under a decree of divorce or separate maintenance, or
    5. Multiple births resulting from the same pregnancy.
  4. An event the IRS determined to be an unforeseen circumstance in published guidance of general applicability. For example, the IRS determined the September 11, 2001, terrorist attacks to be an unforeseen circumstance.
taxmap/pubs/p523-003.htm#en_us_publink1000200762
Reasonable basic living expenses.(p15)
Reasonable basic living expenses for your household include the following.
Any of these amounts spent to maintain an affluent or luxurious standard of living are not reasonable basic living expenses.
taxmap/pubs/p523-003.htm#en_us_publink1000240774

Nonqualified Use(p15)

rule
Gain from the sale or exchange of the main home is not excludable from income if it is allocable to periods of nonqualified use. Nonqualified use means any period in 2009 or later where neither you nor your spouse (or your former spouse) used the property as a main home, with certain exceptions (see next).
taxmap/pubs/p523-003.htm#en_us_publink1000240775

Exceptions.(p15)

rule
A period of nonqualified use does not include:
  1. Any portion of the 5-year period ending on the date of the sale or exchange after the last date you (or your spouse) use the property as a main home;
  2. Any period (not to exceed an aggregate period of 10 years) during which you (or your spouse) are serving on qualified official extended duty:
    1. As a member of the uniformed services;
    2. As a member of the Foreign Service of the United States; or
    3. As an employee of the intelligence community; and
  3. Any other period of temporary absence (not to exceed an aggregate period of 2 years) due to change of employment, health conditions, or such other unforeseen circumstances as may be specified by the IRS.
taxmap/pubs/p523-003.htm#en_us_publink1000240776

Calculation.(p15)

rule
To figure the portion of the gain allocated to the period of nonqualified use, multiply the gain by the following fraction:
 Total nonqualified use during the period of ownership in 2009 or later 
 Total period of ownership 
This calculation can be found in Worksheet 2, line 10, later in this publication.
For examples of this calculation, see Business Use or Rental of Home, below.