How to Apply the Primary Residence Sale Exclusion (IRC §121): A CPA's Guide

The §121 exclusion is one of the most valuable tax benefits in the Code: a single homeowner can exclude up to $250,000 of gain on the sale of a principal residence from federal income tax; a married couple filing jointly can exclude up to $500,000. With home values elevated across most U.S. markets, accurately applying this exclusion — and identifying when it is unavailable or only partially available — is a routine and high-stakes task for CPAs advising individual clients. Miss the non-qualifying use calculation, overlook home office depreciation recapture, or misapply the ownership test to a recently divorced client, and the return is wrong.

This guide walks through every step of the §121 analysis: establishing the ownership and use tests, applying the look-back rule, calculating partial exclusions, handling gain from non-qualifying use periods, managing depreciation recapture the exclusion cannot cover, and determining reporting requirements.

Prerequisites

Before beginning the §121 analysis, confirm:

  • The property being sold was used as the client's principal residence — the primary place where the taxpayer actually lives, determined by facts and circumstances including place of employment, mailing address, location of family members, and where the taxpayer votes (Treas. Reg. §1.121-1(b))
  • The client's filing status and whether they are filing jointly, as this controls the exclusion ceiling
  • Whether the property had any rental or home office use during the ownership period, which affects both the non-qualifying use calculation and depreciation recapture
  • Whether the client excluded gain on a prior home sale within the last two years (look-back rule)
  • Any prior-year Forms 8829 (home office) or Schedule E (rental) filed for this property, and total depreciation claimed

A taxpayer can have only one principal residence at a time. Where a client owns multiple properties, only one qualifies for §121 at the time of sale.

Step 1: Verify the Ownership Test

The taxpayer must have owned the property for at least 2 years during the 5-year period ending on the date of sale (IRC §121(a)).

Key rules:

  • Ownership periods do not need to be continuous. Intermittent periods add together, provided the total reaches 24 months (730 days).
  • For married couples claiming the $500,000 exclusion, only one spouse needs to satisfy the ownership test. Both spouses must independently satisfy the use test (Step 2).
  • Surviving spouse exception: Under IRC §121(b)(4), a surviving spouse who sells the home within 2 years of the date of the spouse's death may use the full $500,000 exclusion — provided both spouses met the use test before death. This window closes exactly 2 years after the date of death.
  • Trust ownership: A taxpayer who holds title through a grantor trust (revocable living trust) satisfies the ownership test if treated as the trust's owner under IRC §§671–678. Corporate or partnership ownership does not transfer the §121 benefit to individuals.
  • Inherited property: Heirs receive a stepped-up basis under IRC §1014 as of the date of death. The appreciation before death is eliminated; the §121 analysis applies only to appreciation after the heir takes title — and the heir's ownership period begins on the inheritance date. Confirm whether §121 is needed before the inherited property has appreciated above the stepped-up basis.

Step 2: Apply the Use Test

The taxpayer must have used the property as a principal residence for at least 2 years during the 5-year period ending on the date of sale (IRC §121(a)).

Key rules:

  • The 2 years of ownership and 2 years of use do not need to overlap. A taxpayer who rented a home for 2 years, purchased it, then lived in it for 2 years satisfies both tests using different periods.
  • Use need not be continuous. Short absences — vacations, temporary work assignments, medical treatment — count toward use as long as the taxpayer intends to return and the home remains their principal residence. Extended absences inconsistent with maintaining the home as a principal residence do not count (Treas. Reg. §1.121-1(c)).
  • Disability exception (IRC §121(d)(9)): If the taxpayer becomes physically or mentally incapable of self-care, time spent in a licensed care facility (including a nursing home) counts toward the use requirement, even if the taxpayer is not physically present at the home. This allows a client who must enter memory care after living in the home for 1 year to still satisfy the 2-year use test if they have spent at least 1 year in care.
  • Uniformed services and Foreign Service extension (IRC §121(d)(9)): Active-duty military, intelligence community officers, and Foreign Service employees may elect to suspend the 5-year look-back period for up to 10 years while stationed away on qualified official extended duty. This effectively extends the window to satisfy the ownership and use tests.
  • For a married couple, both spouses must independently satisfy the use test to claim the full $500,000 exclusion. If only one spouse meets it, the exclusion is limited to $250,000.

Step 3: Check the Look-Back Rule

A taxpayer cannot use the §121 exclusion if they excluded gain on the sale of another principal residence within the 2-year period ending on the date of the current sale (IRC §121(b)(3)).

This rule is frequently missed when clients:

  • Sell a vacation property that was briefly converted to a primary residence
  • Relocate and sell again within two years of the prior exclusion
  • Downsize in rapid succession

There is no lifetime cap on how many times a client can use the §121 exclusion — only the 2-year frequency limitation. Document the date the prior exclusion was applied and confirm it falls outside the 2-year window before proceeding.

Step 4: Calculate the Maximum Exclusion Amount

For taxpayers who satisfy the ownership test, use test, and look-back rule:

Filing Status Maximum Exclusion
Single $250,000
Married Filing Jointly $500,000
Married Filing Separately $250,000 per spouse (each must independently meet ownership and use tests)
Qualifying Surviving Spouse (within 2 years of death) $500,000

MFJ qualification checklist for the full $500,000:

  1. At least one spouse satisfies the ownership test
  2. Both spouses independently satisfy the use test
  3. Neither spouse is disqualified by the look-back rule for a prior exclusion (IRC §121(b)(2)(C))

If condition 3 fails because one spouse used the exclusion on a prior residence within 2 years, the available exclusion is limited to the amount that would apply to the qualifying spouse alone — typically $250,000.

Step 5: Calculate the Partial Exclusion (If Tests Are Not Fully Met)

If the client fails the 2-of-5-year ownership test, use test, or look-back rule due to a qualifying reason, a partial exclusion is available instead of no exclusion (IRC §121(c); Treas. Reg. §1.121-3).

Qualifying reasons:

  1. Change in place of employment — The primary reason for the sale must be a job change, and the new job location must be at least 50 miles farther from the sold home than the old job location. If the taxpayer had no prior job, the new job must be at least 50 miles from the sold home. Distance is measured between the sold residence and the new place of work, not from the old residence. Under Treas. Reg. §1.121-3(c), this is a safe harbor; a facts-and-circumstances analysis also applies where distance falls short.

  2. Health — The sale must be primarily because a physician recommends that the taxpayer (or a spouse, co-owner, or family member residing in the household) change residences for health reasons. A doctor's written recommendation is the key documentation item.

  3. Unforeseen circumstances — Events the taxpayer could not reasonably have anticipated before purchasing and occupying the home. Per Treas. Reg. §1.121-3(d), safe harbors include: death of a qualifying family member, divorce or legal separation, multiple births from the same pregnancy, damage from disaster or condemnation, involuntary conversion, acts of war or terrorism. Job loss or a significant change in financial circumstances may also qualify under a facts-and-circumstances analysis.

Calculating the partial exclusion amount:

Partial Exclusion = Maximum Exclusion × (Qualifying Period ÷ 730 Days)

Where "qualifying period" is the shorter of:

  • The period the taxpayer owned the home during the 5-year look-back
  • The period the taxpayer used the home as a principal residence during the 5-year look-back

Example: A single taxpayer purchases a home and lives in it for 14 months before selling due to a job relocation 60 miles away. Maximum exclusion: $250,000.

Partial exclusion = $250,000 × (14 months ÷ 24 months) = $250,000 × 58.3% = $145,833

If realized gain is $120,000, the partial exclusion fully covers it. If realized gain is $175,000, $29,167 remains taxable — reported on Form 8949 and taxed at applicable long-term capital gains rates.

Step 6: Exclude Gain From Non-Qualifying Use Periods

For sales on or after January 1, 2009, gain allocable to non-qualifying use is not excludable, even when the taxpayer otherwise fully satisfies the ownership and use tests (IRC §121(b)(5)).

Non-qualifying use is any period after December 31, 2008, when the property was not the taxpayer's principal residence — most commonly:

  • Rental use
  • Extended vacancy while the home is listed
  • A period before the taxpayer moved in after purchase

Important exception: The 5 years immediately before the sale date during which the property was not a principal residence do not count as non-qualifying use. Only periods at the beginning of ownership (before the home became the taxpayer's primary residence) trigger this rule, not periods at the end. A client who moved out and rented the home for 2 years before selling has those 2 trailing years excluded from the non-qualifying use calculation.

Calculating excluded gain from non-qualifying use:

Gain From Non-Qualifying Use = Total Realized Gain × (Non-Qualifying Use Period ÷ Total Ownership Period)

This portion is not excludable and is reported on Form 8949/Schedule D.

Example: A client purchases a condo in January 2019 as a rental property and converts it to their principal residence in January 2022. They sell in January 2026, having lived in it for 4 years. Total ownership: 7 years. Non-qualifying use (rental period, 2019–2022): 3 years. Total realized gain: $210,000.

Gain from non-qualifying use = $210,000 × (3 ÷ 7) = $90,000 — taxable as capital gain. Remaining gain = $120,000 — excludable under §121 (ownership and use tests met).

This calculation is particularly important for clients who converted rental properties to primary residences or who acquired properties as investment rentals and later moved in.

Step 7: Identify and Account for Depreciation Recapture

Even when the §121 exclusion fully covers all remaining gain, depreciation recapture is not excludable under §121 (IRC §121(d)(6)).

Any depreciation taken on the property — whether during a rental period (Schedule E) or for a home office (Form 8829) — is treated as unrecaptured §1250 gain when the home is sold. This amount is taxed at a maximum federal rate of 25%, regardless of whether the remaining gain is excluded.

Home office depreciation: A client who used the regular method on Form 8829 for any year has accumulated depreciation that is fully taxable at sale. The §121 exclusion shelters the capital appreciation — but not the depreciation deductions previously claimed. For the mechanics of how home office depreciation is computed, see Home Office Deduction for Self-Employed Clients.

Rental period depreciation: When a home was previously rented, all depreciation claimed during the rental period creates unrecaptured §1250 gain. This is true even if the property was later converted back to a principal residence and the client satisfies the full ownership and use tests. The §121 exclusion does not reach this amount.

How to calculate the recapture exposure before the sale:

  1. Pull all prior Forms 4562, 8829, and Schedule E filed for this property
  2. Sum all depreciation deductions claimed (not allowable — actually claimed)
  3. This amount is the recapture floor; it will be taxed at up to 25% regardless of the §121 exclusion
  4. Confirm the adjusted basis has been reduced accordingly

For the complete mechanics of how unrecaptured §1250 gain is computed and reported, including interaction with the Net Investment Income Tax, see Depreciation Recapture: How to Calculate and Explain It to Clients.

Planning note for clients using the regular home office method: Switching to the simplified method in later years does not retroactively eliminate prior depreciation — and the simplified method cannot be elected retroactively. Clients should understand before year one that the regular method creates an exit tax at sale.

Step 8: Determine Reporting Requirements

When no reporting is required: If the §121 exclusion covers the entire gain, and no Form 1099-S was issued for the sale, the sale can be omitted from the return entirely. The IRS does not require reporting of a fully excluded sale when no information return was generated (IRS Publication 523; Treas. Reg. §1.121-5(b)).

When reporting is required on Form 8949 / Schedule D:

  • A Form 1099-S (Proceeds from Real Estate Transactions) was issued, regardless of exclusion amount
  • Any portion of the gain is taxable (partial exclusion, depreciation recapture, non-qualifying use gain)
  • The gain cannot be excluded because the look-back, ownership, or use test fails

Form 8949 coding:

  • Report the sale on Form 8949, Part II (long-term if held more than 1 year)
  • Enter "H" in column (f) to indicate the §121 exclusion
  • In column (g), enter the excluded amount as a negative adjustment

Depreciation recapture reporting:

  • Recapture from rental-period depreciation is reported on Form 4797, Part I, and separately tracked on the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions
  • Home office recapture follows the same path through Form 4797

The §121/§1031 combination: For properties with both a residential component (eligible for §121) and a business/rental component (eligible for §1031), Rev. Proc. 2005-14 allows the taxpayer to apply §121 to the residential portion of gain and defer the business/rental portion through a §1031 exchange executed simultaneously. This is an advanced technique — see How to Execute a 1031 Like-Kind Exchange for Real Estate Clients for the exchange mechanics before attempting the combined procedure.

Common Mistakes

Assuming both spouses automatically satisfy the use test. For a couple who bought and moved into the home together, both spouses clearly satisfy the test. But when one spouse owned the home before the marriage — and the couple has not lived there together for 2 years — only one spouse may qualify. The exclusion is limited to $250,000 in that case, not $500,000.

Forgetting the non-qualifying use reduction. The most commonly missed step. A client who rented the home for any period after 2008 before living in it has gain allocable to that period that is not excludable. The computation is required even when the ownership and use tests are fully satisfied.

Treating the full $500,000 as available after a prior exclusion. If either spouse used the §121 exclusion on another home within the prior 2 years, the MFJ exclusion is reduced. Run the look-back check on both spouses.

Omitting depreciation recapture from the gain calculation. Every tax return software will compute the §121 exclusion as a reduction of gain — but if the gain computation doesn't include the recaptured depreciation as a separate taxable item, the return understates income. The §121 exclusion does not override the Form 4797 recapture computation; they are parallel calculations.

Skipping §1031 because "the house is a personal residence." Where the property was previously used for business or rental purposes and has a business/rental component at the time of sale, the §1031 rules may apply to that portion. Coordinate §121 and §1031 analysis before closing on any mixed-use property.

FAQ

Can a client claim the §121 exclusion on a second home or vacation property?

Not as a vacation home. §121 applies only to the taxpayer's principal residence. However, if a client converts a second home to their principal residence and lives there for at least 2 years in the 5-year period before sale, the exclusion is available — reduced by any gain attributable to non-qualifying use periods under IRC §121(b)(5). The conversion strategy requires planning: the client must actually move in and make it their primary home, not simply designate it on a tax return.

What if the client owned the home jointly with a non-spouse?

Each co-owner applies the §121 exclusion independently. A single co-owner can exclude up to $250,000 of their proportionate share of gain, provided they individually satisfy the ownership and use tests. The exclusion is not transferable to a co-owner who doesn't meet the tests.

Does the §121 exclusion apply to state income taxes?

Most states conform to the federal §121 exclusion. Notable considerations: California conforms to the $250,000/$500,000 limits but taxes all remaining gain as ordinary income (no preferential LTCG rate). Pennsylvania does not conform and taxes the gain, subject to its own exclusion. Verify state treatment for each client, particularly in high-cost markets where gains regularly exceed the federal exclusion.

Can a client claim §121 and §1031 on the same sale?

Yes — through Rev. Proc. 2005-14. Where the property includes both a residential portion and a business/rental portion, the taxpayer applies §121 to the residential gain first, then defers the remaining business/rental gain through a §1031 exchange executed with a qualified intermediary. The two provisions operate on separate portions of the gain and are not mutually exclusive. This is most commonly used for client-owned mixed-use properties (e.g., a duplex where one unit is the primary residence) or homes converted from rental to primary use where non-qualifying use gain remains.

What if the home was received in a divorce?

Under IRC §1041, property transfers between spouses incident to divorce are non-recognition events — no gain or loss is recognized by either party. The receiving spouse takes over the transferring spouse's adjusted basis and ownership period for §121 purposes (Treas. Reg. §1.121-4(b)). The receiving spouse must independently satisfy the use test on their own — they do not inherit the transferring spouse's use history. Divorce agreements often specify who retains the home; the tax planning opportunity is ensuring the receiving spouse maintains the use period before selling.

How does the $250,000/$500,000 threshold interact with the NIIT?

The §121 exclusion applies before the Net Investment Income Tax calculation. Gain excluded under §121 is not investment income for NIIT purposes. Only the gain that remains taxable after applying the exclusion — including any depreciation recapture and non-qualifying use gain — is included in net investment income under IRC §1411. For a client with $300,000 of total gain, $250,000 excluded, and $50,000 taxable, only the $50,000 enters the NIIT base.

What form documents the §121 exclusion in my workpapers?

IRS Publication 523 (Selling Your Home) provides the complete analytical framework. For audit documentation, workpapers should include: dates of ownership and use (with supporting records like utility bills, bank statements, and voter registration), the exclusion calculation, the non-qualifying use computation if applicable, cumulative depreciation amounts, and the Form 8949 reporting determination. If the sale is not reported because the exclusion covers the full gain and no 1099-S was issued, document that determination explicitly.

When you're ready to streamline how your firm identifies §121 eligibility, calculates depreciation recapture exposure, and communicates gain analyses to selling clients, Arvori helps CPA practices automate the advisory workflow from intake through closing. Learn more at arvori.app.