When you convert a rental into your primary residence, the §121 home-sale exclusion no longer shelters the whole gain. Nonqualified rental years after 2008 are carved out. This tool prorates your maximum exclusion and shows exactly how much gain stays taxable.
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).
| Rental Yrs | Residence Yrs | Gain | Exclusion Share | Max Exclusion (MFJ) | Taxable Gain |
|---|---|---|---|---|---|
| 5 | 5 | $300,000 | 50.0% | $250,000 | $50,000 |
| 8 | 3 | $400,000 | 27.3% | $136,364 | $263,636 |
| 2 | 2 | $300,000 | 50.0% | $250,000 | $50,000 |
| 10 | 2 | $600,000 | 16.7% | $83,333 | $516,667 |
| 3 | 7 | $250,000 | 70.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.
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.
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.
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 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.
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.
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.
⚠️ 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.