Home Sale Exclusion: Tax Savings on Capital Gain of a Principal Residence

Section 121 of the Internal Revenue Code (https://www.irs.gov/pub/irs-drop/rr-14-02.pdf) allows the exclusion of a realized capital gain of up to $250,000 ($500,000, if married filing jointly) from income if it is the sale of the taxpayer's principal residence.

To qualify for the exclusion:

Grantor trusts and single-owner entities can also claim the exclusion. A gain on a conversion, such as when a home is destroyed or condemned, can also be excluded.

Diagram showing the 5-year lookback period for the home sale exclusion.
  • Use and Ownership Tests can be satisfied in different times.
  • Each 2-year period does not have to be continuous.

Form 1099-S, Proceeds from Real Estate Transactions is used to report the sale of a residence. If the gain is wholly excludable, then no Form 1099-S needs to be filed (IRS Revenue Procedure 2007-12). The settlement agent who closed the sale of your principal residence must report the sale to the IRS on Form 1099-S if the sales price exceeds $250,000, or $500,000 for married filing jointly. However, if the sales price is less than the gain-exclusion limits, and you know that your gain will be excluded, and you certify as such in writing to the settlement agent, then the agent may rely on that certification and not file Form 1099, though the agent is still free to do so. If the gain is not fully excludable, then Form 1099-S must be filed.

If the gain fully qualifies for the exclusion, then the sale may not even have to be reported on your tax return. However, the sale must be reported on Form 8949, Sales and Other Dispositions of Capital Assets if:

You may not want to claim the exclusion if you intend to sell another property with a larger excludable gain within a 2-year period of this sale.

Any amount above the exclusion amount is subject to the long-term capital gains tax that, since 2013, depends on income:

Lower Income Threshold for Long-Term Capital Gains Rate
Long-Term
Capital Gains Rate
Single
Head
of
Household
Married
Filing
Jointly
Estate,
Trust
2022
0% $0 $0 $0 $0
15% $41,676 $55,801 $83,351 $2800
20% $459,751 $488,501 $517,201 $13,701
2021  
0% $0 $0 $0 $0
15% $40,400 $54,100 $80,800 $2700
20% $445,850 $473,750 $501,600 $13,250
  • Qualifying Widow(er) is the same as Married Filing Jointly.
  • Married Filing Separately is ½ of the amount for Married Filing Jointly.
  • Threshold amounts are indexed for inflation.
 

Additionally, since 2013, any gains above the exclusion amount will also be subject to the new Net Investment Income Tax, which can add as much as 3.8% to the applicable gain for taxpayers who earn, both from work and from investments, at least the threshold amount (joint filers: $250,000, everyone else: $200,000).

The period of ownership and use can be discontinuous as long as they satisfy the 2- and 5-year test. Short absences, such as for vacations, are included in the time of use test.

If vacant land was owned and used as part of your principal residence, then the sale of the vacant land may qualify for the exclusion if it was sold within 2 years, either before or after, the sale of the principal residence. However, the sale of the vacant land and the principal residence is treated as 1 sale, so the exclusion applies to the combined sales. The exclusion limit applies 1st to the sale of the residence if the sale of the vacant land and the residence occurred in different tax years.

The gain on a sale of a remainder interest to an unrelated party may be excluded, but any gains on subsequent sales of remainder interests cannot be excluded. Gains on sales to related parties may not be excluded, which not only includes close relatives, but also business organizations in which you have a significant interest.

If your home is financed with the federal subsidy, such as a tax-exempt bond or a qualified mortgage credit certificate, then the subsidy cannot be excluded, which is calculated on Form 8828, Recapture of Federal Mortgage Subsidy.

Example: How to Maximize the Home Sale Exclusion with the Main Residence and Vacation Property

An involuntary conversion occurs if a property is destroyed or condemned. If a gain was postponed under §1033, because of an involuntary conversion of a principal residence, then the holding period of the replacement residence includes the holding period of the previous residence.

If a homeowner becomes incapacitated, and must spend time in a licensed care facility, then the homeowner can still exclude the gain if the principal residence was used at least 1 year during the 5 years preceding the sale. The 2-out-of-5 year ownership test still needs to be satisfied, however.

The years of ownership test can be suspended for up to 10 years by military and Foreign Service personnel, Peace Corps workers, and intelligence officers that are on official extended duty.

If the taxpayer has more than 1 home, then only the principal residence qualifies for the exclusion, which is generally determined by the length of occupancy of each residence, but the IRS may also consider the taxpayer's place of employment, addresses on driver's licenses, automobile and voter registrations, and the mailing address used in correspondence. Undeveloped land may also qualify for the exclusion if it is adjacent to the principal residence and was used as part of the residence, and both land and the residence are sold within a 2-year period. However, the exclusion limit applies to both the land and the principal residence, not to each independently.

The exclusion can also be applied to mobile homes, trailers, condominiums, and even houseboats if they were used as a principal residence. However, if the home is moved to a different location, then any sale of the vacant land does not qualify for the exclusion. However, an investment in a retirement community only qualifies if the taxpayer receives equity in the property. For the tenant stockholder of a cooperative, the ownership requirement requires the ownership of the stock and the use requirement applies to the unit that the stockholder owns.

The §121 exclusion can only be used once every 2 years. This is to prevent taxpayers from buying multiple residences to earn tax-free income.

Because of the 2-year exclusion period, a taxpayer may choose to not exclude the gain on a residence if he intends to sell another residence that will also qualify for the exclusion but would be within the 2-year period of the 1st sale. A taxpayer may do this if she expects the gain may be greater on the 2nd sale.

Joint owners may each claim the $250,000 exclusion for their share of the gain.

Married Couples Can Claim a $500,000 Exclusion

A married couple must satisfy the following requirements for the $500,000 exclusion:

If only one spouse lived in the house as a principal residence, then only that spouse can claim the $250,000 exclusion. If a married couple has separate residences, then each may claim a $250,000 exclusion on the sale of their residence, whether they file jointly or separately.

United States citizens who have renounced their citizenship or long-term residents who have ended their residency for the purpose of avoiding United States tax cannot claim the exclusion.

Death of Spouse If the spouse dies before the sale of the residence, then the surviving spouse can add the years that the decedent lived in the house as a principal residence, and can also still exclude a $500,000 gain. The surviving spouse is considered to have the property at least as long as the decedent unless the spouse remarries before the sale. The surviving spouse must file a joint return, however, in the year of the spouse's death. The surviving spouse will still qualify for the $500,000 exclusion if the property is sold within 2 years of the deceased spouse's death. Note also that the portion inherited from the deceased spouse will receive a stepped-up basis, which will further reduce any taxable gain. This stepped-up basis will equal the fair market value (FMV) of the portion of property on the date of death or, if the personal representative so chooses, the FMV of that portion 6 months afterward. A surviving spouse in a community property state will receive a stepped-up basis for the entire property. The $500,000 exclusion can also be applied if the residence is sold within 2 years of both spouses' death if the couple would have qualified otherwise.

Divorce If a spouse receives a residence under a divorce decree, then her time of ownership and time of use is added onto the ex-spouse's time of ownership and use. If one spouse moves out pursuant to a divorce or separation decree, then the relocating spouse can continue to claim use and ownership for as long as he maintains an ownership interest in the property, and as long as the remaining spouse continues to use the residence as a principal residence.

The home sale tax exclusion is more of a benefit to the wealthy, because they could buy more expensive homes, then resell them a few years later and claim most or all the exclusion. On the other hand, taxpayers with less expensive homes must own the home for many years, or even decades, to take advantage of the full exclusion.

Prorated Maximum Exclusion

If the taxpayer was forced to sell their home before qualifying for the exclusion because of a change of employment, health problems, or some other unforeseen circumstances, either for the taxpayer, a close family relative, or to other members of the house who have an ownership stake in the house, then the taxpayer can still qualify for an exclusion, but the maximum exclusion is reduced to a percentage, equal to the shortest time that the taxpayer did satisfy either the use or ownership test or the length of time since last claiming the exclusion divided by 730 days (2 years).

So if you are single and lived or owned your home for 1 year and it has been at least 1 year since you last claimed the exclusion, then you can claim 365/730 = ½ of the $250,000 limit. Therefore, the most that you can exclude is $125,000. Note that if your gain is less than this, then you can exclude the full gain.

A married couple filing jointly can add the 2 limits together.

So if you’re married filing jointly and you lived in the house for only 1 year, but your spouse lived in the house for 2 years, before selling your house because either you or your spouse accepted a new job that was at least 50 miles further away than the previous job, then the limit for you will be $125,000 (= 365/730 × $250,000), just as in the previous example, plus $250,000 (= 730/730 × $250,000), for your spouse, for a total limit of $375,000. If your gain is less than that, then you can claim the full exclusion.

Safe Harbor for a Prorated Exclusion

Generally, to satisfy the requirements for a prorated exclusion, the IRS considers the facts and circumstances of the situation to decide whether the applicable rules apply. However, the IRS does provide a bright line to distinguish whether the rules allow the prorated exclusion. The change of employment rule is satisfied if the taxpayer's new job location is at least 50 miles further than the old job location from the primary residence and the taxpayer was using the primary residence at the time of the job change. The change of employment includes working for the same employer but in a different location or a change in location for a self-employed worker. The safe harbor can also be satisfied if an unemployed taxpayer obtains a job that is more than 50 miles away from the sold residence.

When the IRS considers facts and circumstances, the most important factor will be the primary reason for the home sale. Thus, the primary reason for the sale must have been because of the change of employment, deteriorating health, or other unforeseen circumstances.

The health rule is satisfied if the change in location was to better manage the health problems of the taxpayer or a close relative, but not just because the taxpayer wanted to move to a healthier environment. However, a safe harbor exists if it was done on the recommendation of a doctor. So if the taxpayer sells his home to care for an ill parent, then the rule is satisfied.

Unforeseen circumstances includes any factor that would make the house unaffordable, or a change in financial status that would make it difficult to maintain the home, such as the involuntary conversion of a home, or damage from disasters; or death, divorce, or legal separation or even a change in employment with a reduced income making it hard for the taxpayer to afford the house. The unforeseen circumstance must not have been anticipated before the house was bought and occupied. So, for instance if a unmarried couple buy a residence so that they can live together, but later they break up, then this would be considered an unforeseen circumstance, especially if the remaining taxpayer is unable to afford the housing by herself.

Figuring Gain

The gain on the sale of the house is considered the sale price minus any selling costs, such as a real estate brokerage commission, minus the adjusted basis of the property. The adjusted basis of the property includes the purchase price plus expenditures for improving the property. It does not include expenditures for just repairing the property. Settlement fees and closing costs also add to the adjusted basis of the property. However fees associated with obtaining a mortgage do not affect the basis of the property, since those fees are charged for getting the loan, not for the purchase of the property.

Figuring Adjusted Basis

The capital gain or loss is calculated thus:

Sale Proceeds = Sale Price − Selling Costs (commissions, advertising, legal fees, etc.)

Total Gain or Loss = Sale Proceeds − Adjusted Tax Basis

Capital Gain or Loss = Total Gain or Loss − Depreciation

Anything that changes that taxpayer's basis in the property will affect the gain or loss realized. Expenditures that increase the adjusted basis include:

Factors decreasing the adjusted basis include:

Gains postponed under prior law rollover rules decrease the basis because taxes were not paid on the gains previously.

Improvements to a home only increase the basis if they are still part of the home. For instance, if you spent $4000 to paint your house 10 years ago, and then painted the house again just before the sale, then the previous cost of the painting is not added to the basis.

Long-term gains on a house are taxed at the long-term capital gains rate, but if you claimed a home office, then the depreciation is recaptured at a different tax rate, equal to the lower of your ordinary marginal tax rate or 25%. The rest of the gain will be subject to the capital gains tax rate.

Recordkeeping Records of all adjustments to the basis of the home, including any receipts of costs, should be kept for at least 3 years after the due date of filing for the tax year of the home sale.

Business Use Of The Home

If you have a home office that is part of the dwelling, then the gain on that part of the dwelling is also excludable along with the rest of the residence. However, any depreciation claimed on the property after May 6, 1997 is not excludable and must be reported on Schedule D, Capital Gains and Losses as unrecaptured §1250 gain, which is taxed at the lower of 25% or your marginal tax rate.

Example: Figuring Unrecaptured Gain on a Home Office

No loss on the sale of a personal residence is deductible. However if part of the home was rented out or used for business, then the allocable space reduced by the allocable time that it was used for business is deductible.

When a residence is converted to rental property, then the tax basis on the conversion date is the lower of the adjusted basis or the fair market value. Generally, if a residence was converted to rental property only a few months before the sale, then whether any losses are deductible depends on whether the rental returns a profit and whether the lease prevented the owner from reoccupying the house during the lease period.

If a house was bought for resale, then losses are deductible, even if the owner occupied the house for several months before the sale. In these cases, it is presumed that the owner does not intend to live in the house as a primary residence, but occupies the house to prevent vandalism and to keep the house in good shape to sell. Deductible losses can also be claimed for a residence that was acquired by gift or devisement, if the donee had no intention of living at the residence but sold it or rented it out shortly after acquiring it.

If the principal residence is owned by a partnership whose partners are married, then the gain on the sale cannot be excluded but must be recognized.

Nonqualified Use of a Residence

If a residence is not used as a primary residence, then it is a nonqualified use except:

Diagram showing the nonqualified use and qualified use periods for the home sale exclusion.

The gain on a residence that can be excluded is reduced proportionally by the amount of time of nonqualified use, including the nonqualified use before the 5-year lookback period, but after 2008. This is how nonqualified use modifies the excludable gain according to the worksheet in Publication 523, Selling Your Home :

Non-Use Days = Total Days after 2008, When Neither You nor Your Spouse or a Former Spouse Used the Home As a Main Residence

Total Days of Ownership = Total Days You Owned the Property (including before 2009)

Non-Residence Factor = Non-Use Days / Total Days of Ownership

Capital Gain = Total Gain – Depreciation

Nonqualified Gain = Capital Gain × Non-Residence Factor

Allocable Gain Qualified for Exclusion = Capital Gain − Nonqualified Gain

The nonqualified use provision prevents longtime owners of rental properties or vacation properties from moving into 1 of the properties to live in it for 2 years, then selling it to claim the home sale exclusion. Though the exclusion can still be claimed, it will be substantially less than it would be if there was no nonqualified use within the 5-year lookback period.

Calculating the Home Sale Exclusion for a Home with Nonqualified Use

You will only be able to claim 1/6 (= 1 − 10 years/12 years = 1 − 5/6) of the exclusion that you would otherwise be entitled to. If your capital gain was $240,000, then you would only be able to exclude $40,000, 1/6 of $240,000. Only by owning the property for an additional 3 years so that none of the nonqualified use is within the 5-year lookback period would you be able to claim the full exclusion.

Note, that you could rent the house for an additional 3 years after you have lived in it for 2 years and still be able to claim the full exclusion, because the rental period after your use as a primary residence is qualified, so it does not reduce your exclusion. Rental property will also have depreciation, which is not excludable and is taxed at a rate equal to the lower of your marginal rate or 25%. So if your tax bracket is higher than 25%, then the tax on the recaptured depreciation in the above example = $60,000 × 25% = $15,000.

Example:

Tax Analysis:

Out of a total gain of $220,000, you can exclude $119,978 from your income. Note that even though you did not live in the house in the last year of your ownership, it is still considered a qualified use since that was after you had used the house as a primary residence.

Allocable Gain on Separate Structure Used for Business Cannot Be Excluded

If the residence has a separate structure from the dwelling unit that was used for business or rental after 2008, then such use is considered a nonqualified use subject to the nonqualified use rules discussed above. Thus, the gain attributable to the nonqualified structure and allocable to the nonqualified use period will be taxable even if the 2-year use test is satisfied.

If a separate structure was used for business or rental for more than 3 years during the 5-year period previous to the sale, then the gain allocable to the separate part is not excludable since it does not satisfy the 2-year test. A taxable gain must be reported on Form 4797, Sales of Business Property.