skip navigation

Search Help
Navigation Help

Tax Map Index
ABCDEFGHI
JKLMNOPQR
STUVWXYZ#

International
Tax Topic Index

Affordable Care Act
Tax Topic Index

FAQs
Forms
Publications
Tax Topics

Comments
About Tax Map

IRS.gov Website
Publication 523
taxmap/pubs/p523-001.htm#en_us_publink1000200611

Does Your Home Sale Qualify for Maximum Exclusion(p2)

rule
The tax code recognizes the importance of home ownership by providing certain tax breaks when you sell your home. To qualify for these breaks, your home must meet the Eligibility Test, later.
The type of home involved is less important. A single-family home, condominium, cooperative apartment, mobile home, or houseboat can all count as a residence.
taxmap/pubs/p523-001.htm#en_us_publink10008935

How your sale qualifies.(p2)

rule
Your sale qualifies for exclusion of $250,000 gain ($500,000 if married filing jointly) if the following is true:
If all of these are true, skip to Figuring Gain or Loss, later.
If one or more of these are not true, you might still be eligible. Keep reading to find out.
taxmap/pubs/p523-001.htm#en_us_publink10008936

Transfer of your home.(p3)

rule
If you transferred your home (or share of a jointly owned home) to a spouse or ex-spouse as part of a divorce settlement, you are considered to have no gain or loss. You have nothing to report on your tax forms and this entire publication does not apply to you.
taxmap/pubs/p523-001.htm#en_us_publink100025053

Main Home(p3)

rule
If you own or live in more than one home, the test for determining which one is your main home is a "facts and circumstances" test.
The most important factor is where you spend the most time. However, other factors can enter the picture as well. The more of these that are true of a home, the more likely it is your main home:
taxmap/pubs/p523-001.htm#en_us_publink10008937

Eligibility Test(p3)

rule
You can exclude up to $250,000 of gain ($500,000 if married filing jointly) on the sale of your home if you meet the Eligibility test.
taxmap/pubs/p523-001.htm#en_us_publink10008938

Eligibility Step 1—Automatic Disqualification(p3)

rule
taxmap/pubs/p523-001.htm#en_us_publink10008939

Determine whether any of the automatic disqualifications apply.(p3)

rule
Your home sale is not eligible for the exclusion if ANY of the following are true:
If any of these are true, skip to Figuring Gain or Loss, later.
taxmap/pubs/p523-001.htm#en_us_publink10008996

Eligibility Step 2—Ownership(p3)

rule
taxmap/pubs/p523-001.htm#en_us_publink10008952

Determine whether you meet the ownership requirement.(p3)

rule
If you owned the home for at least 24 months (2 years) during the last 5 years leading up to the date of sale (date of the closing), you meet the ownership requirement.
taxmap/pubs/p523-001.htm#en_us_publink10008954
If you received Form 1099-S, Proceeds From Real Estate Transactions,(p3)
the date of sale appears in box 1 of Form 1099-S.
taxmap/pubs/p523-001.htm#en_us_publink10008955
If you did not receive Form 1099-S,(p3)
the date of sale is either the date the title transferred or the date the economic burdens and benefits of ownership shifted to the buyer, whichever date is earlier. (In most cases, these dates are the same.)
taxmap/pubs/p523-001.htm#en_us_publink10008997

Eligibility Step 3—Residence(p3)

rule
taxmap/pubs/p523-001.htm#en_us_publink10008956

Determine whether you meet the residence requirement.(p3)

rule
If your home was your residence for at least 24 of the months you owned the home during the 5 years leading up to the date of sale, you meet the residence requirement. The 24 months of residence can fall anywhere within the 5-year period. It doesn't even have to be a single block of time. All you need is a total of 24 months (730 days) of residence during the 5-year period.
taxmap/pubs/p523-001.htm#en_us_publink10008957
If you were ever away from home,(p3)
you need to determine whether that counts as time living at home or not. A vacation or other short absence counts as time you lived at home (even if you rented out your home while you were gone).
taxmap/pubs/p523-001.htm#en_us_publink10008958
If you have a disability,(p3)
and are physically or mentally unable to care for yourself, you only need to show that your home was your residence for at least 12 months out of the 5 years leading up to the date of sale. In addition, any time you spend living in a care facility (such as a nursing home) counts toward your residence requirement, so long as the facility has a license from a state or other political entity to care for people with your condition.
taxmap/pubs/p523-001.htm#en_us_publink10008959
If you have more than one home,(p3)
see Main Home, earlier.
taxmap/pubs/p523-001.htm#en_us_publink10008960
If your home was destroyed or condemned,(p3)
see Home Destroyed or Condemned—Considerations for Benefits, later.
taxmap/pubs/p523-001.htm#en_us_publink10008961
If you work for the government as uniformed or intelligence personnel, or are with the Peace Corps,(p3)
see Service, Intelligence, and Peace Corps Personnel, later.
taxmap/pubs/p523-001.htm#en_us_publink10008998

Eligibility Step 4—Look-Back(p3)

rule
taxmap/pubs/p523-001.htm#en_us_publink10008962

Determine whether you meet the look-back requirement.(p3)

rule
If you did not exclude gain for selling a home on your tax returns for the previous two years (and you do not intend to do so on any returns or amended returns for the past two years that are not yet filed), you meet the look-back requirement.
taxmap/pubs/p523-001.htm#en_us_publink10008999

Eligibility Step 5—Exceptions(p4)

rule
taxmap/pubs/p523-001.htm#en_us_publink10008963

Check to see if there is anything about your situation that could affect your answer to Eligibility Step 2—Ownership through Eligibility Step 4—Look-Back.(p4)

rule
You'll need to review Does Your Home Qualify—Details and Exceptions, later, if any of the following are true:
taxmap/pubs/p523-001.htm#en_us_publink10009000

Eligibility Step 6—Review(p4)

rule
taxmap/pubs/p523-001.htm#en_us_publink10009001

Review your eligibility.(p4)

rule
If you meet the ownership, residence, and look-back requirements, your home sale qualifies for exclusion, skip to Figuring Gain or Loss, later.
taxmap/pubs/p523-001.htm#en_us_publink10009002
If you did not meet all the tests in Eligibility Step 1 through Eligibility Step 5,(p4)
earlier, your home is not eligible for the full maximum exclusion. However, you may still be eligible for partial exclusion if you can show the main reason you sold your home was because of a change in workplace location, for health reasons, or because of an unforeseeable event. See Does Your Home Qualify—Details and Exceptions, later.
taxmap/pubs/p523-001.htm#en_us_publink10009003

Does Your Home Qualify—Details and Exceptions(p4)

rule
taxmap/pubs/p523-001.htm#en_us_publink10009004

Partial Exclusion May Be Available(p4)

rule
If you don't meet the eligibility test, you may still qualify for partial exclusion if you moved because of work, health, or an unforeseeable event.
You can qualify either by meeting a set of standard requirements (the "safe harbor" provisions) or by showing enough facts and circumstances to validate your claim.
taxmap/pubs/p523-001.htm#en_us_publink10009005

Work-related move.(p4)

rule
You meet the standard requirements if any of the following happened during the time you owned and lived in the home you sold:
taxmap/pubs/p523-001.htm#en_us_publink10009006

Health-related move.(p4)

rule
You meet the standard requirements if any of the following happened during the time you owned and lived in the home you sold:
taxmap/pubs/p523-001.htm#en_us_publink10009007

Unforeseeable events.(p4)

rule
You meet the standard requirements if any of the following happened during the time you owned and lived in the home you sold:
taxmap/pubs/p523-001.htm#en_us_publink10009008

Showing facts and circumstances.(p4)

rule
If your circumstances do not match any of the standard requirements described above but based on facts and circumstances the primary reason for sale is work-related, health-related, or unforeseeable. Important factors are:
taxmap/pubs/p523-001.htm#en_us_publink10009748

Married, Divorced, Widowed(p5)

rule
taxmap/pubs/p523-001.htm#en_us_publink10009749

Marriage.(p5)

rule
Married individuals may exclude up to $500,000 of gain if they file a joint return and neither spouse excluded gain on the sale of another home within a previous 2-year period. If one spouse meets the ownership requirement, both are considered to have met the requirement. See Eligibility Step 2—Ownership, earlier. However, each spouse must individually meet the residence requirement. See Eligibility Step 3—Residence, earlier.
taxmap/pubs/p523-001.htm#en_us_publink10009750

Separation or divorce.(p5)

rule
You can count a home as your residence during any period when ALL of the following are true:
taxmap/pubs/p523-001.htm#en_us_publink10009751

Home acquired through transfer from spouse.(p5)

rule
If your home was transferred to you by a spouse or ex-spouse (whether in connection with a divorce or not), you can count any time when your spouse owned the home as time when you owned it. However, you must meet the residence requirement on your own.
taxmap/pubs/p523-001.htm#en_us_publink10009752

Death of spouse.(p5)

rule
If you sell your home after your spouse dies (within 2 years after your spouse dies), and you have not remarried as of the sale date, you can count any time when your spouse owned the home as time you owned it, and any time when the home was your spouse's residence as time when it was your residence.
taxmap/pubs/p523-001.htm#en_us_publink10009753

Vacant Land Next to Home(p5)

rule
If you have vacant land adjacent to the land on which your home sits, you can only claim the sale of that land as part of a sale of your home if ALL of the following are true:
If your sale of vacant land meets all these requirements, you must treat that sale and the sale of your home as a single transaction for tax purposes.
taxmap/pubs/p523-001.htm#en_us_publink10009754

Home Moved to New Location(p5)

rule
If you move your home from the land it was on, that land no longer counts as part of your home. For example, if you move a mobile home to a new lot and sell the old lot, you cannot treat the sale of the old lot as the sale of your home.
taxmap/pubs/p523-001.htm#en_us_publink10009820

Home Destroyed or Condemned—Considerations for Benefits(p5)

rule
If an earlier home of yours was destroyed or condemned, you may be able to count your time there towards the ownership and residence test.
If your home was destroyed, see Publication 547, Casualties, Disasters, or Thefts. If your home was condemned, see Publication 544.
taxmap/pubs/p523-001.htm#en_us_publink10009821

Remainder Interest(p5)

rule
If you sell a remainder interest in your home, the sale is eligible for tax benefits as long as the buyer is not a "related person" (which can mean not only a relative but also a corporation, trust, or other organization that is closely connected to you).
If you take advantage of tax benefits when you sell a remainder interest, you cannot receive tax benefits if you later sell any other type of interest in the same home.
taxmap/pubs/p523-001.htm#en_us_publink10009822

Like-Kind/1031 Exchange(p5)

rule
taxmap/pubs/p523-001.htm#en_us_publink100025058

Sale of home acquired in a like-kind exchange.(p5)

rule
You cannot claim the exclusion if:Gain from a like-kind exchange is not taxable at the time of the exchange. This means that gain will not be taxed until you sell or otherwise dispose of the property you receive. To defer gain from a like-kind exchange, you must have exchanged business or investment property for business or investment property of a like kind. For more information about like-kind exchanges, see Publication 544.
taxmap/pubs/p523-001.htm#en_us_publink100025059

Home relinquished in a like-kind exchange.(p5)

rule
The same tests that apply to determine if you qualify to exclude gain from the sale of your main home (discussed earlier) also apply to determine if you qualify to exclude gain from the exchange of your main home for another property. Under certain circumstances, you may meet the requirements for both the exclusion of gain from the exchange of a main home and the nonrecognition of gain from a like-kind exchange (discussed above under Sale of home acquired in a like-kind exchange). This can occur if you used your property as your main home for a period before the exchange that meets the use test, but at the time of the exchange, you used your home for business or investment (e.g., rental) purposes. This can also occur if you used your main home partly for business or investment (e.g., rental) purposes and then exchanged the home. In these situations, you would first exclude the gain from the sale of your main home to the extent allowable, and then apply the nonrecognition of gain provisions of section 1031 for like-kind exchanges to defer any remaining gain. For more information, see Revenue Procedure 2005-14, 2005-7 I.R.B. 528, available at www.irs.gov/irb/2005-07_IRB/ar10.html.
taxmap/pubs/p523-001.htm#en_us_publink10009823

Service, Intelligence, and Peace Corps Personnel(p6)

rule
If you are a member of Uniformed Services, Foreign Service, or an employee of the intelligence community in the Unites States, you may choose to suspend the 5-year test period for ownership and use if you are on qualified official extended duty. This means you may be able to meet the 2-year residence test even if, because of your service, you did not actually live in your home for at least the 2 years during the 5-year period ending on the date of sale.
taxmap/pubs/p523-001.htm#en_us_publink100025060

Example.(p6)

John bought and moved into a home in 2005. 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 2013. 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-001.htm#en_us_publink10009824

Qualified extended duty.(p6)

rule
You are on qualified extended duty if:
taxmap/pubs/p523-001.htm#en_us_publink10009825

Intelligence personnel.(p6)

rule
The extension also applies to the intelligence community. You are an employee of the intelligence community if you are an employee of the following:
taxmap/pubs/p523-001.htm#en_us_publink100025063

Period of suspension.(p6)

rule
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-001.htm#en_us_publink100025064

Example.(p6)

Mary bought a home on April 1, 1998. She used it as her main home until August 27, 2001. On August 28, 2001, she went on qualified official extended duty with the Navy. She did not live in the house again before selling it on July 31, 2014. Mary chooses to use the entire 10-year suspension period. Therefore, the suspension period would extend back from July 31, 2014, to August 1, 2004, and the 5-year test period would extend back to August 1, 1999. During that period, Mary owned the house all 5 years and lived in it as her main home from August 1, 1999, until August 28, 2001, 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.