To report the sale of a rental property on your tax return, you file Form 4797 (Sales of Business Property), carry the resulting long-term gain to Schedule D, and then to line 7 of Form 1040 for the year the closing occurred. Form 4797 is where the work happens: it separates the portion of your profit that gets recaptured as ordinary income from depreciation, from the portion that qualifies for long-term capital gains treatment. Before you touch either form, you need three numbers: your adjusted basis, your amount realized, and the total depreciation you claimed or should have claimed while the property was a rental.
Calculate Your Adjusted Basis First
Your adjusted basis is what the whole return hinges on. Start with the original purchase price. Add the closing costs you paid when you bought the property — title insurance, recording fees, legal fees, transfer taxes. Add every capital improvement you made over the years of ownership: a new roof, HVAC replacement, a room addition, a full kitchen renovation. Routine repairs and maintenance do not count; improvements add lasting value, repairs just keep things working.
Then subtract the total depreciation deducted, or that should have been deducted, over the entire period the property was available for rent. That final number is your adjusted basis.
Depreciation Reduces Basis Whether You Claimed It or Not
Residential rental buildings depreciate over 27.5 years using the straight-line method.1Internal Revenue Service. Publication 946 (2024), How To Depreciate Property Only the building is depreciable — land never depreciates. A property bought for $330,000 with land worth $55,000 produces $10,000 of annual depreciation on the $275,000 building. After ten rental years, $100,000 of accumulated depreciation has reduced your basis.
Here is the trap: even if you never claimed depreciation on your returns, the IRS still reduces your basis by the amount you were entitled to deduct. This is the “allowed or allowable” rule, and the IRS uses whichever number is greater.1Internal Revenue Service. Publication 946 (2024), How To Depreciate Property Skipping depreciation in prior years does not save you at sale.
Amount Realized and the Gain
On the other side of the calculation is the amount realized: your sale price minus selling expenses. Deductible selling expenses include real estate commissions, attorney fees, title insurance premiums, and transfer taxes paid at closing. Subtract adjusted basis from amount realized. A positive number is your taxable gain; a negative number is a deductible loss.
Errors in basis are one of the most common triggers for IRS notices on real estate sales, so this is worth double-checking. Overstate your basis and you have underreported the gain.
How the Gain Is Taxed in Layers
The profit from a rental sale does not get taxed at a single rate. It splits into layers, and the layer each dollar falls into determines the rate.
Depreciation Recapture at Up to 25%
The first layer is unrecaptured Section 1250 gain. Every dollar of depreciation that reduced your basis is now recaptured at a maximum federal rate of 25%.2Office of the Law Revision Counsel. 26 USC 1250 – Gain From Dispositions of Certain Depreciable Realty The recapture amount is capped at the lesser of your total gain or your total depreciation. If your ordinary rate is below 25%, you pay that lower rate on this portion.
Long-Term Capital Gain on the Rest
Any gain above the recapture amount is taxed at long-term capital gains rates of 0%, 15%, or 20%, depending on your total taxable income, provided you held the property more than one year.3Internal Revenue Service. Topic No. 409, Capital Gains and Losses Hold it a year or less and the entire gain is ordinary income at your regular rates, with no favorable treatment.
The 3.8% Net Investment Income Tax
Higher-income sellers owe an additional 3.8% surtax. It applies to the lesser of your net investment income or the amount your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).4Office of the Law Revision Counsel. 26 U.S. Code 1411 – Imposition of Tax Gain from a rental sale counts as net investment income, and that includes both the capital gain portion and the depreciation recapture.5Internal Revenue Service. Questions and Answers on the Net Investment Income Tax Those thresholds are not indexed for inflation.
Stacked, a high-income seller can face a combined federal rate of 28.8% on the recapture and up to 23.8% on the remaining long-term gain. State tax, where applicable, comes on top.
Release Any Suspended Passive Losses
If your rental produced losses in prior years that were disallowed because your income was too high, those suspended losses have been accumulating on Form 8582 worksheets. Selling the property in a fully taxable transaction to an unrelated buyer releases them all at once.6Internal Revenue Service. Topic No. 425, Passive Activities – Losses and Credits
In the year of sale those losses become fully deductible and can offset the gain, or other income. Report them on Form 8582 in the year of disposition.6Internal Revenue Service. Topic No. 425, Passive Activities – Losses and Credits If you are not sure whether you have any, pull returns from years the rental showed a net loss and look for Form 8582 carryover amounts. The savings can be substantial.
Filling Out Form 4797
Form 4797 is the central document.7Internal Revenue Service. About Form 4797, Sales of Business Property Start in Part III, which handles depreciation recapture. Enter the gross sale price on Line 20, cost basis on Line 21, and total depreciation allowed or allowable on Line 22.8Internal Revenue Service. Instructions for Form 4797 (2025) Part III isolates the portion of the gain treated as ordinary income due to recapture, and that amount carries to Part II.
The remaining gain, treated as a Section 1231 gain because the property was held more than one year, goes in Part I.8Internal Revenue Service. Instructions for Form 4797 (2025) If your Section 1231 gains exceed Section 1231 losses for the year, the net gain flows to Schedule D as a long-term capital gain.
Schedule D, Form 1040, and the 1099-S
Schedule D collects your capital gains and losses for the year, including the Section 1231 gain from Form 4797, and the net result carries to line 7 of Form 1040.9Internal Revenue Service. 2025 Schedule D (Form 1040) Schedule D also determines whether the 0%, 15%, or 20% rate applies to the long-term portion.
The closing agent typically issues a Form 1099-S reporting the gross proceeds from the sale.10Internal Revenue Service. Instructions for Form 1099-S (Rev. April 2025) The IRS gets a copy and matches it against your return, so the numbers must reconcile.
If Your Situation Is Not a Straight Rental Sale
Three situations change what and how you report. If any of them fits, the general path above is not the whole story.
The Property Was Once Your Primary Home
Section 121 lets you exclude up to $250,000 of gain, or $500,000 if married filing jointly, on the sale of a principal residence you owned and lived in as your main home for at least two of the five years before sale.11Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence The exclusion only covers gain attributable to personal use, not the rental period, and depreciation claimed after May 6, 1997 stays subject to the 25% recapture regardless. The allocation gets complicated and deserves careful attention.
You Are Doing a 1031 Exchange
A Section 1031 like-kind exchange defers the entire gain, including depreciation recapture, if you reinvest into another real property held for business or investment use. The deadlines are strict: 45 days from sale to identify replacement property in writing, and 180 days from sale (or the tax return due date with extensions, whichever comes first) to close. A qualified intermediary must hold the funds; you cannot touch them. Any cash or non-like-kind property you receive (boot) is immediately taxable.12Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031
The Buyer Is Paying You Over Time
Seller financing, a promissory note, or a land contract makes this an installment sale, meaning you received at least one payment after the tax year of the sale. Report the gain proportionally as payments come in using Form 6252. Interest is reported separately as ordinary income. Important limit: depreciation recapture must be reported in full in the year of sale. Only the capital gain portion can be spread out. If your total outstanding installment obligations exceed $5 million at year end, Section 453A may charge interest on the deferred tax.13Internal Revenue Service. Publication 537 (2025), Installment Sales
Filing, Estimated Tax, and Records
Filing electronically links Form 4797, Schedule D, and any supplemental forms to your Form 1040 automatically and gives you confirmation of receipt. Paper returns take longer and need schedules attached in the order shown by the attachment sequence number.
If the sale creates a large liability, consider making an estimated tax payment by the next quarterly deadline. Underpayment penalties apply if you owe more than $1,000 at filing and have not paid enough through withholding or estimated payments during the year.
Keep every document related to the sale — closing statements, depreciation schedules, improvement receipts, prior-year Form 8582 worksheets — until the statute of limitations for the sale year has run. The general assessment period is three years from filing. Underreport income by more than 25% and the window extends to six years. There is no time limit at all if you fail to file or file fraudulently.14Internal Revenue Service. Topic No. 305, Recordkeeping Six years after filing is a reasonable floor.