Home Converted to Rental Then Sold at a Gain: Section 121 and 1031

When you sell a home you had converted into a rental, the gain doesn’t get taxed at a single rate. The tax on the sale of a home converted to rental property splits the gain into up to three pieces: depreciation recapture taxed at a federal rate as high as 25%, a share allocated to non-qualified (rental) use taxed at long-term capital gains rates of 0%, 15%, or 20%, and a remaining share that may qualify for the Section 121 exclusion of up to $250,000 (or $500,000 if married filing jointly). A 3.8% net investment income surtax can sit on top of the taxable portions. How much falls into each bucket depends on your basis, how long you rented versus lived in the home, and how much depreciation was claimed or allowable during the rental years.

Figuring the Total Gain First

Before allocating anything, you need one number: total gain. That’s your amount realized minus your adjusted basis.

Amount realized is the sale price reduced by selling expenses you paid or that came out of proceeds, including real estate commissions, advertising, legal fees, title insurance, and loan charges you agreed to cover for the buyer.1Internal Revenue Service. Publication 523 (2025), Selling Your Home On a $500,000 sale with $35,000 in commissions and closing costs, your amount realized is $465,000.

Adjusted basis starts with what you paid, plus settlement charges at purchase and any capital improvements made over the years. Then you subtract depreciation. Residential rental property is depreciated straight-line over 27.5 years under MACRS, and the IRS reduces your basis by depreciation “allowed or allowable,” whichever is greater.2Internal Revenue Service. Publication 946 (2025), How To Depreciate Property If you rented the home for eight years and never claimed depreciation, the IRS still subtracts eight years of allowable depreciation from your basis at sale. You lose the annual deduction and still take the basis hit. If you skipped depreciation in prior years, amending returns before selling is worth considering.

How the Section 121 Exclusion Works on a Converted Rental

If you lived in the property as your principal residence for at least two of the five years ending on the sale date, up to $250,000 of gain can be excluded, or $500,000 for a joint return where both spouses meet the use test.3Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence Only one spouse needs to meet the ownership test.

Two limits pull the exclusion back on a converted rental.

Non-Qualified Use Shrinks the Exclusion

Any period after December 31, 2008, during which the home was not your principal residence is “non-qualified use,” and the gain allocated to those periods cannot be excluded.3Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence The non-excludable share equals total non-qualified use time divided by total ownership time. Own for ten years and rent for the last four? Forty percent of the gain (after removing depreciation recapture) cannot be excluded, regardless of how much of your $250,000 or $500,000 room is unused.

Two narrow carve-outs exist. Temporary absences of up to two years total for job changes, health, or unforeseeable circumstances aren’t counted as non-qualified use. And up to ten years of qualified extended military duty, Foreign Service duty, or intelligence assignments for you or your spouse are excluded from the non-qualified use calculation.4Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence

Depreciation Recapture Is Carved Out First

Gain equal to depreciation claimed or allowable during the rental years can never be excluded under Section 121. That slice comes off the top and is taxed at a federal rate of up to 25%, no matter how comfortably the rest of your gain fits inside the exclusion.

The Three Tax Buckets

Once total gain is set, allocate it in this order:

  • Unrecaptured Section 1250 gain, equal to total depreciation claimed or allowable, taxed at a maximum federal rate of 25%.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses
  • Non-excludable capital gain, the share of remaining gain allocated to non-qualified use, taxed at long-term capital gains rates of 0%, 15%, or 20% depending on taxable income.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses
  • Excluded gain, whatever’s left up to the $250,000 or $500,000 ceiling, taxed at 0% federally.

A Worked Example

You bought a home for $300,000, lived in it for five years, then rented it for five years before selling. No capital improvements. You claimed $30,000 in depreciation during the rental period. After commissions and closing costs, your amount realized is $500,000.

Adjusted basis: $300,000 minus $30,000 depreciation = $270,000. Total gain: $500,000 minus $270,000 = $230,000.

Carve out depreciation recapture first. The $30,000 in unrecaptured Section 1250 gain is taxed at up to 25%. That leaves $200,000.

Non-qualified use ratio: 5 rental years divided by 10 total ownership years = 50%. So $100,000 of the remaining $200,000 is non-excludable capital gain, taxed at your long-term rate.

The other $100,000 falls under the Section 121 exclusion and owes no federal tax. Final picture on $230,000: $100,000 excluded, $30,000 taxed up to 25%, $100,000 taxed at 0%, 15%, or 20%.

The 3.8% Net Investment Income Tax

An additional 3.8% surtax applies to net investment income when modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married filing jointly, or $125,000 for married filing separately.6Internal Revenue Service. Topic No. 559, Net Investment Income Tax These thresholds aren’t indexed for inflation.

The surtax hits the lesser of your net investment income or the amount your MAGI exceeds the threshold. Gain excluded under Section 121 doesn’t count as investment income, but every dollar of your taxable gain does.7Internal Revenue Service. Questions and Answers on the Net Investment Income Tax A married couple with $300,000 in MAGI and $130,000 in taxable gain owes the surtax on $50,000 (the excess over the $250,000 threshold), or $1,900. Sellers who plan only around capital gains rates often miss this.

Suspended Passive Losses Get Released

Selling the property in a fully taxable transaction releases any passive activity losses that were suspended during the rental years.8Office of the Law Revision Counsel. 26 U.S. Code 469 – Passive Activity Losses and Credits Limited Those losses become non-passive and offset ordinary income in the sale year without the usual limits. They don’t directly cancel your capital gain, but they reduce overall taxable income and can push part of your gain into a lower bracket. Pull your cumulative suspended loss balance from prior returns before you close.

Deferring the Tax With a 1031 Exchange

You can defer the entire gain, including depreciation recapture, by rolling the proceeds into another investment or business-use property through a like-kind exchange under Section 1031.9Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 The replacement must also be held for investment or business use.

The deadlines are strict. Replacement property must be identified in writing within 45 days of the sale, and the purchase must close within 180 days of the sale or by the due date (with extensions) of the tax return for that year, whichever is earlier.9Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Late-year closings often shorten that 180-day window.

You cannot touch the proceeds. A qualified intermediary must hold the funds between the sale and the purchase, and disqualified parties include anyone who has served as your agent, attorney, or accountant in the prior two years.9Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031

Combining the Section 121 Exclusion With a 1031 Exchange

You don’t have to pick one. If the property was your primary residence before it became a rental and you still meet the two-of-five-year use test at sale, you can apply the Section 121 exclusion to the portion of gain attributable to personal use and defer the rest through a 1031 exchange. Personal-use exclusion goes first; the exchange covers what’s left. Both sets of requirements have to be satisfied independently, and after the exchange, plan on holding the replacement as a rental for at least two years before any conversion to personal use.

Reporting the Sale

Because the rental was held longer than one year, it’s Section 1231 property. Report it on Form 4797, Sales of Business Property, Part I, and the net gain or loss flows to Schedule D.10Internal Revenue Service. 2025 Instructions for Form 8949

Unrecaptured Section 1250 gain isn’t calculated on Form 4797. Use the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions and put the result on Schedule D, line 19, where the 25% maximum rate is applied.11Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) The Section 121 excluded portion isn’t reported on either form; you simply subtract it before entering taxable amounts. If the net investment income tax applies, add Form 8960.

If You Sell at a Loss Instead

A converted rental sold at a loss is deductible as an ordinary loss under Section 1231 rather than a capital loss, so it offsets regular income without the $3,000 annual cap.12Internal Revenue Service. 2025 Instructions for Form 4797 But converted homes carry a dual basis rule that can wipe out the loss. For measuring a loss, your basis is the lower of your original adjusted basis or the property’s fair market value on the conversion date.13Internal Revenue Service. Publication 527 (2025), Residential Rental Property If the sale price falls between your original cost and that lower conversion-date value, the IRS recognizes neither a gain nor a deductible loss. It’s worth checking that gap before you assume a soft sale will produce a write-off.