Pomegra Wiki

Form 4797 and the Sale of Rental Property

When a landlord sells a residential or commercial rental property, the transaction triggers two potential tax events: ordinary gain or loss on the sale itself, and a second layer of taxation called depreciation recapture, which “claws back” some of the tax deductions the owner claimed in prior years. Form 4797, filed with the federal tax return, is where both are reported and reconciled.

Why rental property sales are complex

A residential rental house or a commercial strip mall is not a simple asset. When you buy it for $400,000 and sell it ten years later for $550,000, the $150,000 gain is only half the story. Over those ten years, you probably claimed depreciation deductions on your Schedule E or as part of business income—maybe $120,000 in cumulative depreciation because the IRS allows you to write off the building (not the land) gradually over 27.5 years for residential or 39 years for commercial property. Those deductions lowered your taxable income year after year. But when you sell, the IRS wants some of that back: the depreciation recapture tax.

Form 4797, “Sales of Business Property,” is the IRS’s way of forcing that reconciliation. It says: “You took $120,000 in depreciation deductions. Now that you’ve sold the property, we’re recapturing that benefit at a 25% rate.” That 25% tax is in addition to the long-term capital gains tax (which may be 0%, 15%, or 20% depending on your tax bracket) on the unrecaptured portion of the gain.

The three-step calculation

The Form 4797 process unfolds in three steps: calculate your adjusted basis, determine your total gain, then split that gain into recapture (ordinary income) and capital gain.

Step 1: adjusted basis. You paid $400,000 for the house. You spent $30,000 on a new roof and $20,000 renovating the kitchen—those are capital improvements, so they add to your basis: now $450,000. You claimed $120,000 in depreciation over ten years. Your adjusted basis is $450,000 − $120,000 = $330,000.

Step 2: total gain. You sold for $550,000. Gain = $550,000 − $330,000 = $220,000.

Step 3: split the gain. Of that $220,000, the first $120,000 is depreciation recapture (ordinary income, taxed at your marginal rate, up to 25% tax). The remaining $100,000 ($220,000 − $120,000) is Section 1231 gain—if you held it over a year, it is treated as long-term capital gain and taxed at the favorable long-term capital gains rate (0%, 15%, or 20%).

Form 4797 is where you document all of this for the IRS.

Section 1231 treatment

Real estate held as a rental for more than one year is “Section 1231 property,” a special category of asset that receives capital gains treatment. This is a big break: if you sell at a gain, you pay capital gains tax (lower rates). If you sell at a loss, it counts as an ordinary loss (which you can deduct against other income without the usual capital loss limitations).

However, depreciation recapture overrides this advantage. Even though the overall gain may qualify for long-term capital gains treatment, the portion attributable to depreciation deductions is taxed as ordinary income (Section 1250 recapture, at 25% for real property). This is the IRS’s way of ensuring that taxpayers do not get the “free lunch” of deducting depreciation in high-bracket years and then paying only capital gains tax on the recapture.

Form 4797 Part II is specifically designed to handle this. You list the property, enter its basis, sale price, and the accumulated depreciation. The form calculates the recapture amount and feeds it into your ordinary income total.

Practical example: a duplex sale

Suppose you bought a duplex in 2010 for $300,000. You paid with a 20% down payment; the remaining $240,000 was financed with a mortgage. Over twelve years, you claimed $110,000 in total depreciation deductions. You made $40,000 in capital improvements (new HVAC, roof repair, kitchen updates). Your cost basis is now $340,000 ($300,000 + $40,000 improvements). Your adjusted basis is $230,000 ($340,000 − $110,000 depreciation).

You sell the duplex for $480,000. Gain = $480,000 − $230,000 = $250,000.

Of that $250,000:

  • $110,000 is depreciation recapture (ordinary income, taxed at up to 25%).
  • $140,000 is Section 1231 gain (long-term capital gain, taxed at 0%, 15%, or 20%).

If you are in the 24% tax bracket, your total tax on this sale is:

  • $110,000 × 25% = $27,500 (depreciation recapture).
  • $140,000 × 15% = $21,000 (long-term capital gain, assuming 15% bracket).
  • Total: $48,500.

That $48,500 represents the tax cost of converting depreciation deductions into sales proceeds.

Basis adjustments and improvements

Many landlords forget or mistrack capital improvements. Replacing carpet, painting, or patching a roof does not add to basis—those are repairs (deductible in the year incurred). But a new roof (replacement of the entire system), a room addition, or a major renovation is a capital improvement and does increase basis. Keeping a detailed record of these over the holding period is essential. When you sell, the IRS will scrutinize basis claims, especially if the accumulated depreciation seems inconsistent with the property’s condition or age.

Form 4797 asks for “adjusted basis,” which is always cost basis minus accumulated depreciation. If you skipped depreciation deductions in some years (a mistake some do to reduce tax hassle), you cannot simply omit that depreciation from the recapture. The IRS deems “allowable depreciation”—the depreciation you should have claimed—as part of the recapture calculation, whether you claimed it or not.

Multiple properties and Form 4797 complexity

If you sold more than one rental property in the same year, you list each one separately on Form 4797. The form totals them, and if you have a net loss across all Section 1231 properties, it can be deducted against other income (up to $3,000 per year, with unlimited carryforward of excess loss). Conversely, if you have a large net Section 1231 gain, it is all treated as long-term capital gain and flows to Schedule D on your Form 1040.

This layering is also why real estate investors must keep meticulous records. One property might have large recapture; another might have a loss (if you sold for less than adjusted basis). The two can offset on Form 4797, reducing your overall tax liability.

State and local tax implications

Form 4797 is a federal form. However, most states tax real estate gains as ordinary income (no preferential long-term capital gains rate on real property in some states), and some states impose separate recapture taxes on real estate sales. A few states (like California) exempt out-of-state property from capital gains taxes but tax in-state sales harshly. If you sold a rental property in a different state or country, consult a local tax professional; the federal Form 4797 treatment may differ substantially from state treatment, and you could face unexpected state liability.

Planning around recapture

Because depreciation recapture is mandatory, landlords cannot avoid it through timing or structuring choices once the sale is locked. However, some landlords use a 1031 exchange (Section 1031 like-kind exchange) to defer the sale indefinitely by rolling the proceeds into another qualifying real property. In that scenario, Form 4797 is not filed because there is no taxable sale—the exchange is deferred until a future sale (or another 1031 exchange).

This is a specialized strategy and requires meeting strict timing and identification rules, but it illustrates that recapture tax planning begins long before the sale itself.

See also

  • Depreciation recapture — the tax on previously claimed depreciation deductions when a rental property is sold
  • Cost basis — the starting point for calculating gain or loss on any asset sale
  • Long-term capital gains tax — the favorable tax rate on Section 1231 property held over one year
  • Schedule D — where Form 4797 capital gains feed into your overall capital gains and losses
  • Section 179 deduction — an alternative write-off strategy for business property (less relevant for real estate)

Wider context