The Waterfall Strategy

Home / Articles

Form 4797 Instructions: Reporting a Rental or Business Sale

By Hans Goldstein · Updated 2026-09-27

Form 4797, Sales of Business Property, is the IRS form for reporting the sale of rental real estate, business buildings, equipment and other property used in a trade or business. It does two jobs: it figures how much of your gain is depreciation recapture, and it sorts the rest into Section 1231 gain (usually taxed as long-term capital gain) or ordinary gain. Most rental property sales go through Form 4797, not directly on Schedule D.

This guide walks through each part of the form using the IRS Instructions for Form 4797, then works a rental sale line by line.

Who files Form 4797

Use Form 4797 for the sale or exchange of:

It is also where you report Section 179 or listed-property recapture when business use of an asset drops to 50% or less (Part IV).

Depreciable property held for investment, rather than used in a trade or business, is different. The instructions say its gain is generally capital gain reported on Form 8949 and Schedule D, but Part III of Form 4797 is still used to figure any ordinary recapture, and only the excess goes to Form 8949 marked "From Form 4797."

The four parts of Form 4797

Part What goes there Result
Part I Section 1231 transactions: property used in a trade or business and held more than 1 year, not required to go in Part III (for example, land); plus gains carried from Part III, Form 6252 and Form 8824 Net §1231 gain goes to Schedule D as long-term capital gain; net loss is ordinary
Part II Ordinary gains and losses: property held 1 year or less, ordinary recapture from Part III, ordinary installment gain Flows to Schedule 1 (Form 1040), line 4
Part III Depreciable property held more than 1 year: §1245, §1250, §1252, §1254 and §1255 property Splits each gain into ordinary recapture and the rest
Part IV §179 and §280F(b)(2) recapture when business use drops to 50% or less Reported as other income where the deduction was taken

Line 1a asks for gross proceeds reported to you on Form 1099-S (real estate) that you include on lines 2, 10 or 20, so the IRS can match your 1099-S.

Part III, line by line

Part III is the heart of a rental or equipment sale. Each property gets its own column (A to D).

Line What to enter
19 Description, date acquired, date sold
20 Gross sales price: cash, fair market value of other property received, and any debt the buyer assumes or takes subject to
21 Cost or other basis plus expense of sale
22 Depreciation (or depletion) allowed or allowable, including bonus and Section 179
23 Adjusted basis (line 21 minus line 22)
24 Total gain (line 20 minus line 23)
25a, 25b For §1245 property: depreciation from line 22, and the smaller of line 24 or 25a. That smaller amount is ordinary recapture
26a to 26g For §1250 property: additional depreciation above straight-line. If straight-line was used, line 26g is zero (except for corporations under §291)
30 Total gains for all properties (line 24)
31 Total ordinary recapture (lines 25b, 26g, 27c, 28b, 29b). Goes to line 13 in Part II
32 Line 30 minus line 31. Goes to line 6 in Part I as §1231 gain

The instructions confirm that 27.5-year residential rental and 39-year nonresidential buildings placed in service after 1986 under MACRS do not require the additional depreciation calculation. For those, line 26g is zero and the building's depreciation becomes unrecaptured Section 1250 gain on the Schedule D worksheet instead. See unrecaptured Section 1250 gain.

"Allowed or allowable." Line 22 uses depreciation allowed or allowable. If you skipped depreciation, you still enter what you could have taken. Ask your CPA about a Form 3115 catch-up before the sale.

Land and building are reported separately

When you sell land and a building together at a gain, the instructions require you to allocate the amount realized between them by fair market value. Report the building in Part III and the land in Part I (line 2), because land is not depreciable and has no recapture. Allocate selling expenses the same way.

Worked example: selling a rental on Form 4797

Simple example. You bought a rental in 2015 for $400,000: $80,000 land and $320,000 building. You took $110,000 of straight-line depreciation. In 2026 you sell for $650,000 and pay $39,000 in selling costs. Fair market value at sale is $150,000 for the land and $500,000 for the building. No cost segregation, no prior §1231 losses.

Allocate the selling costs by value: $9,000 to the land (150/650 of $39,000) and $30,000 to the building.

Part III, building (column A):

Line Amount
20 Gross sales price $500,000
21 Cost plus expense of sale $350,000 ($320,000 + $30,000)
22 Depreciation allowed or allowable $110,000
23 Adjusted basis $240,000
24 Total gain $260,000
26g §1250 ordinary recapture $0 (straight-line)
31 Ordinary recapture to line 13 $0
32 To Part I, line 6 $260,000

Part I, land (line 2): gross sales price $150,000 in column (d), depreciation $0 in (e), cost plus expense of sale $89,000 in (f), gain $61,000 in (g).

Line 7: $61,000 + $260,000 = $321,000 net §1231 gain. With no prior §1231 losses, it goes to Schedule D, line 11 as long-term capital gain.

Schedule D worksheet for line 19: the smaller of line 22 ($110,000) or line 24 ($260,000), minus line 26g ($0) = $110,000 of unrecaptured Section 1250 gain, taxed at up to 25%. The other $211,000 is taxed at 0%, 15% or 20%.

Check: $650,000 - $39,000 - ($400,000 - $110,000) = $321,000. The form lands on the same total gain, just sorted into rate layers.

If a cost segregation study had put some of the depreciation on 5- or 7-year components, those components would get their own Part III column as §1245 property, and line 25b would put their recapture into Part II as ordinary income. Bonus depreciation on 15-year land improvements would show up as §1250 additional depreciation on lines 26a to 26g, also ordinary. The depreciation recapture guide shows how that changes the tax.

Part I: the Section 1231 netting and the five-year lookback

Line 7 combines all Part I gains and losses. If the net is a loss, it is ordinary (line 11). If it is a gain, check line 8: nonrecaptured net §1231 losses from the prior five years. Your net §1231 gain is treated as ordinary income to the extent of those prior losses (§1231(c)). Only the excess (line 9) goes to Schedule D as long-term gain.

Ask for your last five years of Forms 4797 before you sell. A §1231 loss from a prior sale can quietly turn part of this year's gain into ordinary income.

Form 4797 with installment sales and 1031 exchanges

Installment sale (Form 6252). You report the sale on Form 6252 and use Form 4797, Part III to figure recapture. Ordinary recapture is recognized in the year of sale regardless of payments (§453(i)): the Form 6252 instructions say to take it from Form 4797, line 31, report it on Form 4797, line 13, and also enter it on Form 6252, line 12 so it is not taxed again as payments arrive. Section 1231 gain from installment payments goes to Form 4797, line 4; ordinary gain to line 15. The instructions suggest separate Forms 4797, Part III for installment and non-installment sales. See the ISC guide to Form 6252.

Like-kind exchange (Form 8824). Recognized gain from exchanging business or rental property is reported on Form 4797, line 5 (§1231) or line 16 (ordinary recapture from Form 8824, line 21). See the Form 8824 guide.

Former home. If you sell a property that was once your main home and is now a rental, the instructions say to figure the gain in Part III without the exclusion, then enter the §121 exclusion as a loss on Part I, line 2, labeled "Section 121 exclusion." Depreciation after May 6, 1997 cannot be excluded.

Passive losses and Form 4797

If you have an overall loss from passive activities and report a loss on a passive asset, the instructions say to run it through Form 8582 first to see how much loss is allowed before entering it on Form 4797. A gain on a passive rental is passive income, and a full taxable disposition frees the property's suspended losses under §469(g). See the Form 8582 guide.

Common Form 4797 mistakes

Bottom line

Form 4797 is where a rental or business sale gets sorted into tax layers: ordinary recapture in Part II, Section 1231 gain in Part I, and the building's straight-line depreciation carved out on the Schedule D worksheet at up to 25%. Separate land from building, use depreciation allowed or allowable, and check the five-year §1231 lookback. If you are selling on a note, pair it with Form 6252; if exchanging, with Form 8824. The free book shows how the layers interact with suspended passive losses.

Questions to ask your CPA

Get the full playbook. The Waterfall Strategy, the 20-minute version and the one-page Cliff Notes, free.

Send me the books Try the calculator

Educational only, not tax, legal or investment advice. Examples are illustrative. Have your CPA or tax attorney review your facts before you act. Hans Goldstein is a licensed insurance agent (CA Insurance License #4273294) and is not a CPA or attorney. He is paid a commission only if a structured installment sale is funded; seller financing pays him nothing. Disclosures.