Converting a Rental to a Primary Residence, or a Home to a Rental
By Hans Goldstein, EA, founder, Retirement Literacy Foundation · Updated
Admitted to practice before the IRS.
Rental first, then your home
- You need 2 years of ownership and use as your main home within the 5 years before the sale.
- Nonqualified use: years after 2008 when it was a rental (before you moved in) reduce the exclusion proportionally. Example: 10 years of ownership with 6 rental years after 2008 means only 40% of the gain can be excluded.
- Depreciation taken after May 6, 1997 cannot be excluded; it is taxed as unrecaptured section 1250 gain.
- From a 1031 exchange: if the home was acquired in a like-kind exchange, you must hold it at least 5 years before the exclusion is available (IRC 121(d)(10)).
Your home first, then a rental
- Renting it out after you move out does not count as nonqualified use if you sell within the 5-year window, so you can rent for up to 3 years and still exclude the full gain (other than depreciation).
- After 3 years of renting, you fail the 2-out-of-5-years test and lose the exclusion.
- A former home that is now a rental can sometimes use both section 121 and a 1031 exchange on the same sale (Rev. Proc. 2005-14): exclude up to the limit and exchange the rest.
Get the free Social Security guide.
If “Converting a Rental to a Primary Residence, or a Home to a Rental” was useful, the same plain-English treatment of Social Security is yours free. It covers the taxable-benefit thresholds, the survivor-benefit trap and the claiming-age math. We’ll also let you know when the next free class is. Nothing to buy.
The Retirement Literacy Foundation is a 501(c)(3) public charity (EIN 41-5062266). This is free public education. We don’t sell financial products and we don’t give individualized advice. We’ll email it to you. Unsubscribe any time.
Planning points
- Track the dates you moved in and out and any depreciation claimed.
- A large remaining gain above the exclusion can still be spread with an installment sale. See selling a home with a large gain.
- Selling the year after a spouse dies: a surviving spouse can still use the $500,000 exclusion if the sale is within 2 years of the death.
Common questions
Can I move into my rental property to avoid capital gains tax?
Partly. Living there 2 of 5 years lets you claim the exclusion, but rental years after 2008 reduce it proportionally and depreciation is still taxed.
How long must I live in a 1031 property before selling it tax-free?
You must own it at least 5 years from the 1031 exchange, and live in it as your main home for at least 2 of the 5 years before the sale.
Can I do a 1031 exchange on my former home?
If it has become a rental or investment property, yes, and you may be able to combine the home sale exclusion with a 1031 exchange on the same sale.
Related
- Selling a home with a large gain
- 1031 vs installment sale
- Unrecaptured section 1250 gain
- Capital gains tax calculator
- Free Big Sale Tax Worksheet
More for sellers: Suspended Passive Losses When You Sell a Rental Property · Capital Loss Carryover · Real Estate Professional Status Explained · Unrecaptured Section 1250 Gain Explained · QSBS
Sources: IRS Publication 523, Selling Your Home; IRS Topic 701; IRC 121. The $250,000 and $500,000 limits are set in the law and are not indexed. Checked October 10, 2026.
Education only; nothing is sold here. The Retirement Literacy Foundation is a 501(c)(3) nonprofit. Tax rules depend on your facts; check with a CPA or tax attorney before you sell.
Want to run these numbers for your own situation?
The Retirement Literacy Foundation runs free retirement classes on Social Security timing, taxes in retirement, and how to turn savings into income. No products are sold at our classes.
Hans Goldstein, EA
Founder & Executive Director · Retirement Literacy Foundation, a 501(c)(3) non-profit
Admitted to practice before the IRS
Want more information on this? Put your name below and I’ll send it over in plain English, at no cost. If your situation has a wrinkle, reply to the email and tell me what it is; I read them.
You’re reading: Converting a Rental to a Primary Residence, or a Home to a Rental
Free education. The Foundation sells nothing. By submitting you agree to receive free educational emails. We never sell or share your information and you can unsubscribe from any email.