Skip to main content

Home Sale Exclusion After Renting It Out

§ 121(b)(5) · reviewed September 6, 2026

Shows how much of the profit on your home is still tax-free when the home was rented out before you lived in it. About

In plain words. Selling your main home lets you skip tax on a large chunk of the profit. But if the home was a rental before you moved in, the share of the profit that belongs to those rental years is taxed anyway, and the depreciation you took while renting is taxed at its own rate. Renting the home out after you move out does not have the same effect, as long as you sell within a few years. This tool takes the sale, the years owned and rented, and the depreciation, and splits the profit into what is excluded and what is taxed.

Why it matters. People who retire into a former rental, a lake house or a condo they once let out, are surprised at closing. The years before they moved in count against them, and nothing done later changes that.

An example. Bought for $400,000, rented four of ten years before you moved in, $40,000 of depreciation, sold for $900,000 on a joint return: about $200,000 of the gain is taxable because of the rental years, the depreciation is taxed at 25 percent, and the rest is excluded. About $40,000 of tax, against $10,000 had it never been rented.

Where it stops. It counts whole years and treats the rental years as after 2008. It does not handle a home office, a partial rental, a sale at a loss, or state tax, and the depreciation figure should come from the returns or a CPA. Everything it leaves out.

$

What you got for the home minus commissions and closing costs.

$

What you paid for it plus what you spent on improvements. This is your basis, the figure the gain is measured from.

$

The total depreciation from your tax returns for the rental years. It counts whether or not you actually claimed it.

The federal rate on long-term gains at your income. For most people it is 15 percent.

Only rental years before you moved in count against you. Renting it out after you move out, within five years of the sale, does not.

Filing status

This assumes you lived in the home for at least two of the five years before the sale.

Federal tax on the sale
$40,000
Of your $540,000 gain, $300,000 is excluded from tax. The rest is taxed in two parts. $200,000, or 40% of the gain apart from depreciation, belongs to the rental years before you moved in and is taxed at 15%. The $40,000 of depreciation is taxed at 25%. Had the home never been rented out, the tax would have been $10,000.
Your $540,000 gain, split by how each part is taxedThree parts. $300,000 excluded, $200,000 taxed at the gains rate, $40,000 of depreciation taxed at 25 percent.ExcludedTaxed at 15%Depreciation at 25%
Gain tied to the rental years
$200,000
4 of your 10 years of ownership, before you moved in
Depreciation taxed back
$40,000
$10,000 of tax at the 25% rate
Extra tax because of the rental years
$30,000
Compared with a home you never rented out

The gain is split by time. The rental years before you moved in, as a share of all the years you owned the home, fall outside the exclusion. Renting the home out after you move out, within the five years before the sale, does not cost you any of the exclusion. Depreciation is handled separately. It is never excluded and is taxed at its own 25 percent rate, so the rental years leave a tax bill even when everything else fits under the exclusion.

This follows the federal home sale exclusion rules, with the $500,000 limit for a joint return and $250,000 for a single filer. It assumes whole years, that the rental years came after 2008, and that you lived in the home two of the last five years. It leaves out a home office, renting out part of the home, a sale at a loss, the 3.8 percent investment surtax, and state tax. Take the depreciation figure from your tax returns. Educational, not advice.

This is a simplified model, not your actual tax return or plan. It only knows what you type in, leaves out rules that may apply to you, and cannot weigh the other facts and trade-offs a real decision depends on. Before you act, talk with a professional who knows your whole situation.

Educational only, not investment, tax, or legal advice. Results are hypothetical estimates that vary with each use and over time and are not guaranteed accurate or complete. Using this tool creates no client relationship with Considerate Capital, and the site that linked here is not affiliated with it. By using it you agree to the tool terms.