✏️ Your Details

Only years after 2008 count as nonqualified use.

You must have lived here 2 of the last 5 years to qualify at all.

Sale price minus selling costs minus adjusted basis (use depreciated basis).

💰 Your Result

Total Years Owned—
Primary-Residence Share—
Your Maximum Exclusion—
Gain Actually Excluded—
Taxable Gain—
Tax at 15% (est.)—

📊 Worked Examples

Rental YrsResidence YrsGainExclusion ShareMax Exclusion (MFJ)Taxable Gain
55$300,00050.0%$250,000$50,000
83$400,00027.3%$136,364$263,636
22$300,00050.0%$250,000$50,000
102$600,00016.7%$83,333$516,667
37$250,00070.0%$350,000$0

All married-filing-jointly rows, generated by the calculator's own proration formula. The last row shows the cap working in your favour: a 70% share of $500,000 is $350,000, more than the $250,000 gain, so nothing is taxable.

📖 Why a Former Rental Gets a Smaller Exclusion

Section 121 lets you exclude up to $250,000 of gain ($500,000 married filing jointly) when you sell your principal residence, provided you owned and lived in it for at least two of the five years before the sale. That part is simple. The complication is nonqualified use.

What counts as nonqualified use

Nonqualified use is any period after January 1, 2009 during which the property was not your principal residence — most commonly, the years you rented it out before moving in. You then take the maximum exclusion and multiply it by a fraction:

Exclusion = $250k or $500k × (years as principal residence ÷ total years of ownership)

Rental years before 2009 are grandfathered and do not reduce your exclusion. Neither does a period of nonqualified use that comes after you move out and before you sell, provided the home was your principal residence for at least two of the last five years.

The five-year clock is separate

Two tests must both be satisfied. The use test requires two years of residence in the five years before the sale — renting for ten years and living there for two does pass this, because only the last five years are examined. The proration then looks at your entire ownership period, which is why long rental periods shrink the exclusion even when you qualify.

Depreciation is never forgiven

Depreciation you claimed while renting is unrecaptured §1250 gain taxed at up to 25%, and it is not eligible for the §121 exclusion. On a $300,000-basis rental depreciated $90,000 over ten years, that $90,000 is recaptured at 25% regardless of how the exclusion applies to the rest.

Rent It or Sell It: the Timing Decision

The proration formula creates a real incentive to move in sooner rather than later. Every additional rental year both increases the denominator and reduces the numerator's share. On a $400,000 gain with a $500,000 cap, converting after five rental years and living there five years shelters $250,000; converting after ten rental years and living there five shelters only $166,667 — a difference of $83,333, or roughly $12,500 of federal tax at 15%.

Waiting also carries risk the formula ignores. Five years of additional ownership exposes you to market declines, and the two-of-five use test means the clock on your residence period keeps running. If you rent the home for two years and then move in for two, you qualify — but if you rent it for four years and only live there for one, you fail the use test entirely and lose the exclusion.

Records You Need Before You Sell

Two sets of records decide the outcome. First, occupancy dates: the month you moved out, the month you moved back in, and any short-term rental periods. The IRS computes nonqualified use in months, and a partial year can shift the fraction by a percentage point or two. Second, depreciation records: every year of depreciation taken or allowable while the property was a rental, including the years you may have forgotten to claim it. Unclaimed depreciation is still recaptured.

Keep the closing statement from the original purchase, records of capital improvements made while it was a rental, and the depreciation schedule from each tax return. Improvements made while renting increase basis and therefore increase the gain — and the recapture — but also raise the amount that the exclusion can shelter.

Frequently Asked Questions

Does renting the home for one year before I moved in hurt me? ▼
Yes, but modestly. One rental year out of six total years gives you a 5/6 exclusion share, so a married couple can exclude about $416,667 instead of $500,000. The reduction is proportional, not a cliff.
Do rental years before 2009 count as nonqualified use? ▼
No. The nonqualified use rules apply only to periods after December 31, 2008. If you rented the property in the 1990s or early 2000s before moving in, those years are grandfathered and do not reduce your exclusion.
Is the depreciation I claimed while renting excluded too? ▼
No. Depreciation taken or allowable on a rental is unrecaptured §1250 gain, taxed at a maximum 25% rate, and it is never eligible for the §121 exclusion. It is reported on Form 4797 before the §121 exclusion is applied to the rest.
What if I never actually lived in the rental before selling? ▼
Then §121 does not apply at all — you need two years of use as a principal residence within the last five. The entire gain is a capital gain (with depreciation recapture at 25%), and no exclusion is available.
Can I use the exclusion again if I sold another home recently? ▼
Only if you did not use the §121 exclusion on another home sale in the two years before this sale. The exclusion is available once every two years, measured from the prior sale date.
What if my spouse and I file separately? ▼
Each spouse may claim a $250,000 exclusion on a separate return if both meet the ownership and use tests, for a combined $500,000. If only one spouse owns the home, the married-filing-separately rules limit the exclusion to $250,000 on a joint return.

⚠️ Important: This calculator applies the §121 nonqualified-use proration to a single property and assumes you meet the two-of-five-year ownership and use tests. It does not handle depreciation recapture, prior §121 exclusions within two years, or state-level exclusion rules, all of which can change the answer. Use it to plan the timing of a conversion, not to file a return.