Skip to content

Seller Tax Guide

Section 1231 Gain: How the Sale of a Rental Building Is Taxed

Section 1231 gain is gain on the sale of depreciable property or real property used in a trade or business and held more than one year, and it gets the best of both worlds: net gains are taxed as long-term capital gain while net losses are ordinary. This guide is for owners selling a rental or apartment building who want to see how the gain splits into buckets, what each bucket costs at 2026 rates and how it lands on Form 4797.

  • Clear feedback on your deal, typically within 48 hours
  • 5 to 100+ units, stabilized or distressed, listed or off-market
  • Owners, agents, and brokers welcome; every conversation is confidential

We buy:Tired landlordsEstate & trust sales1031 exchangesDeferred maintenanceHigh vacancyPartnership splits

In This Guide: Rental buildings and land held over 1 year · Net gain taxed as long-term capital gain · Net loss deducted as ordinary · 5-year lookback can recharacterize gain · Unrecaptured 1250 gain capped at 25%

By Skyline Capital Investments · · 6 min read

What is section 1231 gain?

Section 1231 gain is the recognized gain from selling or exchanging business-use property that is depreciable or is real property, held for more than one year. For real estate investors, the classic example is a rental building and the land it sits on.

The section gives business owners a one-way benefit. If all your section 1231 transactions for the year net to a gain, the gain is treated as long-term capital gain. If they net to a loss, the loss is ordinary and can offset wages or other income without the $3,000 capital loss limit.

What counts as section 1231 property?

Section 1231 property is depreciable property and real property used in a trade or business and held more than one year, minus a few exclusions in section 1231(b)(1). For a landlord that usually means the building, the land and the building’s components.

  • Included: rental buildings, apartment complexes and the land they sit on, held over one year
  • Included: depreciable equipment and personal property used in the rental, held over one year
  • Excluded: inventory and property held primarily for sale to customers, such as a dealer’s or flipper’s homes
  • Excluded: copyrights, patents and similar created property in certain hands
  • Held one year or less: gain is ordinary and reported in Part II of Form 4797

How section 1231 netting works

Each year you combine every section 1231 gain and loss, and the net result decides the character of all of them. A net gain is long-term capital gain; a net loss is an ordinary loss.

That makes timing important if you own several properties. Selling a loser and a winner in the same year nets them together. Selling the loser one year and the winner the next can give you an ordinary loss first and capital gain later, but the lookback rule below limits that.

Year’s 1231 resultHow it is taxedWhere it goes
Net section 1231 gainLong-term capital gain, after any lookback recaptureForm 4797 line 9 to Schedule D
Net section 1231 lossOrdinary loss, no $3,000 capForm 4797 Part II
Gain recharacterized by the lookbackOrdinary incomeForm 4797 line 12

The five-year lookback: section 1231(c)

Section 1231(c) treats this year’s net section 1231 gain as ordinary income to the extent of net section 1231 losses you deducted in the five most recent preceding years and haven’t already recaptured. It is designed to stop owners from taking an ordinary loss one year and capital gain the next.

On Form 4797 the prior losses go on line 8, and the matching amount of gain moves to line 12 as ordinary income. Keep a running schedule of your 1231 losses by year, because the IRS instructions apply them oldest first and expect you to track what is left.

Unrecaptured section 1250 gain and the 25% rate

Unrecaptured section 1250 gain is the part of your gain on depreciable real property that equals the straight-line depreciation you took, and section 1(h)(6) taxes it at your ordinary rate but no more than 25%. On a rental building held for years, it is often the single biggest bucket after plain capital gain.

Because residential rental property placed in service after 1986 is depreciated straight-line over 27.5 years, there is usually no additional depreciation to recapture as fully ordinary income under section 1250. The whole depreciation amount, up to your gain, lands in the 25% bucket instead. The IRS also counts depreciation you were allowed but didn’t claim, so skipping it doesn’t avoid the tax. Our rental property depreciation guide and depreciation recapture calculator cover the basics; the rest of this page shows how the buckets interact.

Section 1245 recapture on cost segregation assets

Components a cost segregation study reclassified as personal property, such as appliances, carpeting, cabinetry and dedicated electrical, are section 1245 property, and their depreciation is recaptured as ordinary income up to the gain on those assets. That ordinary rate can reach 37%, not 25%.

The recapture is limited to the gain on each asset, which depends on the asset’s fair market value at the sale. If five-year property that cost $600,000 is fully depreciated but worth $150,000 when you sell, the 1245 recapture is $150,000, not $600,000. A defensible allocation of the price, backed by an appraisal or the cost segregation firm, is worth the effort.

Land improvements such as paving and fencing are generally section 1250 property, but the IRS instructions say section 1250 recapture applies when you claimed a special depreciation allowance. Bonus depreciation on them can create ordinary recapture of the excess over straight-line. Our cost segregation and bonus depreciation guides explain how those deductions were built.

How a sale flows through Form 4797

A rental building sale is reported on Form 4797, which separates the gain into recapture, section 1231 gain and ordinary items before anything reaches Schedule D. The order matters because each step feeds the next.

  • Part III, lines 19–32: list each asset (land, building, 1245 property) with price, basis and depreciation
  • Line 25: section 1245 recapture, ordinary
  • Line 26: any section 1250 additional depreciation, ordinary
  • Part I, line 7: net section 1231 gain or loss after recapture is pulled out
  • Line 8: nonrecaptured 1231 losses from the prior five years
  • Line 9: line 7 minus line 8, carried to Schedule D as long-term gain
  • Line 12 in Part II: the line 8 amount, taxed as ordinary income
  • Schedule D worksheet: unrecaptured 1250 gain, reduced by the line 8 amount

Worked example: selling an apartment building in 2026

A married couple bought an apartment building in 2019 for $8,000,000: $1,600,000 for land, $5,800,000 for the building and $600,000 of five-year property identified by cost segregation and fully expensed with 100% bonus depreciation. By the 2026 sale they have taken $1,460,000 of straight-line depreciation on the building. They had a $120,000 net section 1231 loss in 2023 that has not been recaptured.

They sell in 2026 for $11,000,000 and pay $440,000 of selling costs, for an amount realized of $10,560,000. They allocate $150,000 to the personal property, $2,400,000 to land and $8,010,000 to the building. Total gain is $10,560,000 minus an adjusted basis of $5,940,000, or $4,620,000.

Gain on the personal property is $150,000, all section 1245 recapture. The building gain is $3,670,000 and the land gain $800,000, so net section 1231 gain is $4,470,000. The lookback turns $120,000 of that into ordinary income, and the Schedule D worksheet removes it from the 25% bucket. That leaves $1,340,000 of unrecaptured section 1250 gain and $3,010,000 of regular long-term gain.

With $250,000 of other taxable income, the $270,000 of ordinary income adds $74,342.50 of tax at the 24%, 32% and 35% brackets. The 25% bucket costs $335,000, the 20% bucket $602,000, and the 3.8% net investment income tax on the full $4,620,000 is $175,560. Total federal tax is $1,186,902.50 before any state tax.

BucketAmount2026 federal rateTax
Section 1245 recapture$150,000Ordinary (24%–35% here)Included below
1231(c) lookback recapture$120,000Ordinary (24%–35% here)Included below
Ordinary income total$270,00024%, 32%, 35%$74,342.50
Unrecaptured section 1250 gain$1,340,00025%$335,000
Long-term capital gain$3,010,00020%$602,000
Net investment income tax$4,620,0003.8%$175,560
Total$4,620,000$1,186,902.50

Section 1231 gain in an installment sale or 1031 exchange

In an installment sale, all section 1245 and 1250 ordinary recapture is taxed in the year of sale under section 453(i), even if you collect most of the price in later years. Treas. Reg. 1.453-12 then treats the unrecaptured section 1250 gain as coming out of each payment first, before the 20% gain.

A 1031 exchange defers section 1231 gain, including unrecaptured section 1250 gain, as long as you trade real property for real property and take no boot. Since 2018 section 1031 covers only real property, so personal property components you sell with the building can trigger 1245 recapture even inside an exchange. Your qualified intermediary and CPA should agree on the allocation before closing.

How this works for a 5+ unit apartment building

For a 5+ unit apartment building, the price allocation in the purchase agreement drives the whole calculation. How much goes to land, building and personal property sets the 1245 recapture, the 25% bucket and the 20% bucket, and buyers and sellers often want different splits.

Owners who sold or wrote off another property at a loss in the last five years should check the lookback before they price the sale. If the building is held in a partnership, the K-1 reports your share of 1231 gain and unrecaptured 1250 gain separately, and the netting happens on your own return together with any other 1231 items you have that year.

Selling your apartment building to Skyline

Skyline Capital Investments buys apartment buildings with five or more units anywhere in the U.S. We are open to a reasonable allocation of the price among land, building and personal property that your CPA can support, and we work with seller-carry terms and 1031 exchange timelines when they fit.

Send the address and unit count through the form on this page or call (469) 660-2977. We typically respond within 48 hours.

Common Questions

What is the difference between section 1231 and section 1250?

Section 1231 decides the character of gain on business property held over a year: net gains are capital, net losses ordinary. Section 1250 deals with depreciation on real property, recapturing additional depreciation as ordinary income. The related unrecaptured section 1250 gain is the straight-line depreciation portion of a 1231 gain, taxed at up to 25% instead of 20%.

Is rental property section 1231 property?

Yes, a rental building and its land are generally section 1231 property if you held them more than one year, because rental real estate is treated as property used in a trade or business. Property held primarily for sale to customers, like a dealer’s inventory of homes, is excluded, and the gain on it is ordinary income.

What is the tax rate on unrecaptured section 1250 gain?

Unrecaptured section 1250 gain is taxed at your ordinary income rate but no higher than 25% under section 1(h)(6). So a seller in the 22% or 24% bracket pays those lower rates on it, while higher earners pay 25%. Passive owners above the income thresholds also pay the 3.8% net investment income tax on top.

What is the section 1231 lookback rule?

The lookback rule in section 1231(c) treats your net section 1231 gain this year as ordinary income to the extent of net 1231 losses you deducted in the five previous years and haven’t recaptured. You report the prior losses on Form 4797 line 8 and the recharacterized gain on line 12 as ordinary income.

Is section 1245 recapture taxed at 25%?

No, section 1245 recapture is ordinary income taxed at your regular rate, which can be as high as 37% in 2026. It applies to personal property such as the cost segregation components of a building. The 25% cap applies only to unrecaptured section 1250 gain on the building itself, not to 1245 property.

Where do I report section 1231 gain?

You report section 1231 gain on IRS Form 4797, Sales of Business Property. Part III computes the 1245 and 1250 recapture for each asset, Part I nets the section 1231 gains and losses, and the net gain after the lookback goes to Schedule D as long-term capital gain. Unrecaptured section 1250 gain is figured on the Schedule D worksheet.

Is a section 1231 loss deductible against ordinary income?

Yes, if your section 1231 transactions for the year net to a loss, the loss is ordinary and can offset wages and other income without the $3,000 capital loss limit. The catch is the five-year lookback: that loss will turn an equal amount of net 1231 gain in the next five years into ordinary income.

Does a 1031 exchange defer section 1231 gain?

Yes, a 1031 exchange of real property for like-kind real property defers section 1231 gain, including unrecaptured section 1250 gain, if you take no boot. Personal property sold with the building is not like-kind real property after 2017, so any 1245 recapture on it can still be taxed in the year of the exchange.

Two Ways To Work With Us

Bring Us A Deal, Or Invest In One

For Agents, Brokers & Owners

Have A Multifamily Property?

We buy apartment buildings and income-producing residential assets nationwide — listed or off-market, stabilized or value-add.

  1. 1
    Send the basicsAddress, units and asking price.
  2. 2
    We review itAgainst our buy box, confidentially.
  3. 3
    Clear answer in 48 hoursA yes, a no, or the questions we need answered.
See our buy box
Takes 60 seconds
For Investors

Looking To Invest In Multifamily?

Join our investor network to learn how we structure partnerships and to be notified when new opportunities are available to qualified investors.

  • Disciplined, conservative underwriting
  • Professionally managed, passive ownership
  • Clear reporting and direct access to the team
  • Education first — no pressure, no hype
Call Text Submit Deal Invest