To calculate the capital gains tax on an investment property, subtract your adjusted basis from the net amount you received at sale, tax the portion equal to depreciation you claimed at up to 25 percent, and apply the long-term capital gains rate of 0, 15, or 20 percent to whatever gain is left. A 3.8 percent surtax may apply on top if your income is high enough. The number depends on five pieces working together: your adjusted basis, your net sale proceeds, how long you owned the property, how much depreciation you took, and your total taxable income for the year.
Step 1: Figure Out Your Adjusted Basis
Your adjusted basis is what the IRS compares against your sale proceeds to find your gain. Start with the original purchase price from your closing disclosure, then adjust it up and down for things that happened during ownership.
Add settlement and closing costs you paid when you bought the property. Title search fees, recording fees, transfer taxes, survey costs, owner’s title insurance, and legal fees for preparing the deed and sales contract all count.1Internal Revenue Service. Publication 551 – Basis of Assets Your closing disclosure itemizes most of these.
Add capital improvements. An improvement is any project with a useful life of more than one year that adds value: a new roof, a kitchen remodel, an addition, central air, a paved driveway.1Internal Revenue Service. Publication 551 – Basis of Assets Routine maintenance and minor repairs do not qualify. Keep the invoices; every dollar you can document here reduces your taxable gain later.
Add legal costs you paid to defend or perfect your title, such as fees to resolve a boundary dispute or clear a lien.1Internal Revenue Service. Publication 551 – Basis of Assets
Now subtract depreciation. The IRS requires you to depreciate residential rental property over 27.5 years on a straight-line basis.2Internal Revenue Service. Publication 527 – Residential Rental Property Every dollar you deducted (or were entitled to deduct even if you didn’t) comes off your basis.3Office of the Law Revision Counsel. 26 U.S.C. 1016 – Adjustments to Basis A lower basis means a larger reported gain, which is why depreciation feels like a free deduction during ownership and a bill at sale.
A quick example. You bought a rental for $300,000, with $60,000 allocated to land (land is not depreciable). You held it ten full years and claimed roughly $87,273 in depreciation on the $240,000 building. Before counting any improvements, your adjusted basis is $300,000 minus $87,273, or about $212,727.
If you inherited the property rather than bought it, your starting basis is generally the fair market value on the date the prior owner died, not what that owner originally paid.4Internal Revenue Service. Gifts and Inheritances That stepped-up basis can wipe out decades of prior appreciation for tax purposes.
Step 2: Figure Out Your Amount Realized
Start with the gross sale price from your settlement statement, which also appears in Box 2 of the Form 1099-S the closing agent files with the IRS.5Internal Revenue Service. Form 1099-S – Proceeds From Real Estate Transactions That figure already includes cash, buyer-assumed debt, and payoffs at closing.
Then subtract the costs of selling:
- Real estate commissions paid to listing and buyer agents, which nationally run roughly 5 to 6 percent of the sale price
- Legal and escrow fees for the sale contract, title work, and closing services
- Advertising, professional photography, and staging
- Transfer taxes and recording fees the seller is responsible for at closing
Credits you gave the buyer toward their closing costs also reduce your amount realized. Keep every invoice and the final closing disclosure so each subtraction is documented.
Step 3: Check Your Holding Period
The holding period decides which rate schedule applies. The dividing line is one year, measured from the day after you acquired the property to the date you sold it.6Office of the Law Revision Counsel. 26 U.S.C. 1222 – Other Terms Relating to Capital Gains and Losses
Sell at 12 months or less and the gain is short-term, added to your ordinary income and taxed at your regular federal bracket, which can reach 37 percent. Sell after more than 12 months and the gain qualifies for the long-term rates below.
Step 4: Apply the Long-Term Rate
For tax year 2026, the IRS has set these taxable-income thresholds for the three long-term capital gains rates:7Internal Revenue Service. Rev. Proc. 2025-32 – 2026 Inflation-Adjusted Items
- 0 percent on taxable income up to $98,900 for married filing jointly, $66,200 for head of household, and $49,450 for single filers
- 15 percent on income above those thresholds up to $613,700 (joint), $579,600 (head of household), or $545,500 (single)
- 20 percent on income above the 15 percent ceiling
The thresholds apply to your total taxable income, including the gain itself. A married couple with $80,000 of ordinary income and a $50,000 long-term gain would pay 0 percent on the slice of the gain that fits under $98,900 and 15 percent on the rest.
Step 5: Tax the Depreciation Portion Separately
Even when the rest of your gain qualifies for the favorable long-term rates, the portion equal to the depreciation you claimed is taxed at its own rate. This is unrecaptured Section 1250 gain, taxed at a maximum federal rate of 25 percent.8Office of the Law Revision Counsel. 26 U.S.C. 1(h) – Maximum Capital Gains Rate
The idea is straightforward. Depreciation deductions reduced your ordinary income taxes year after year. When you sell, the IRS recaptures that benefit by taxing the depreciation slice of the gain first, at up to 25 percent, before the lower long-term rate reaches whatever is left. Recapture is reported on Form 4797, and the remaining gain flows to Schedule D through Form 8949.9Internal Revenue Service. Instructions for Form 4797 (2025)
Back to the earlier example. If you claimed $87,273 in depreciation and your total gain on the sale works out to $150,000, the first $87,273 is taxed at up to 25 percent. The remaining $62,727 is taxed at 0, 15, or 20 percent depending on your income.
Step 6: Add the 3.8 Percent Surtax If It Applies
Higher-income taxpayers owe an additional 3.8 percent Net Investment Income Tax on capital gains from real estate. It kicks in when modified adjusted gross income exceeds $250,000 for married couples filing jointly or $200,000 for single filers.10Internal Revenue Service. Topic No. 559 – Net Investment Income Tax You pay 3.8 percent on the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds the threshold. A single filer with $230,000 in modified AGI and a $100,000 gain owes the surtax on $30,000, which adds $1,140.
Running the Full Calculation
With each piece established, the full sequence looks like this:
- Find the gain. Amount realized (sale price minus selling costs) minus adjusted basis (purchase price plus closing costs plus improvements minus depreciation). Positive is a gain; negative is a loss.
- Offset with losses. Subtract capital losses carried forward from prior years and any capital losses on other investments from the same year.
- Separate the depreciation recapture. Up to 25 percent on the portion equal to total depreciation taken.
- Tax the balance at the long-term rate. 0, 15, or 20 percent based on your taxable income.
- Add the 3.8 percent surtax if your modified AGI crosses the threshold.
If the calculation produces a loss instead of a gain, use it to offset other capital gains for the year. Any remaining loss can offset up to $3,000 of ordinary income per year ($1,500 if married filing separately), with the rest carried forward.11Office of the Law Revision Counsel. 26 U.S.C. 1211 – Limitation on Capital Losses
Before you finish, check for suspended passive losses. Rental properties are generally passive activities, so losses that exceeded your passive income in earlier years may have been suspended rather than deducted. When you sell your entire interest in a fully taxable transaction, those accumulated losses are released and can offset the gain or your other income in the year of sale.12Internal Revenue Service. Publication 925 – Passive Activity and At-Risk Rules For some sellers this release eliminates the tax entirely, so pull your prior returns before you file.
If You Plan to Reinvest: The 1031 Exchange
Rolling the proceeds into another investment property through a Section 1031 like-kind exchange defers the entire capital gains tax. The replacement property must also be held for investment or business use; personal residences and properties held for resale (such as a flip) do not qualify.13Office of the Law Revision Counsel. 26 U.S.C. 1031 – Exchange of Real Property Held for Productive Use or Investment
Two deadlines are strict. You have 45 days from closing on the sold property to identify the replacement in writing, and 180 days (or your return’s due date, whichever comes first) to complete the purchase.13Office of the Law Revision Counsel. 26 U.S.C. 1031 – Exchange of Real Property Held for Productive Use or Investment Miss either and the full gain becomes taxable. You also cannot touch the proceeds between the two closings; a qualified intermediary has to hold the funds.
State Tax Is On Top
The federal calculation above is only part of the bill. Most states also tax capital gains, usually at the same rate as ordinary state income, with rates on investment property gains ranging from zero in states with no income tax up to roughly 14 percent in the highest-tax states. A few states offer partial deductions or exclusions for capital gains, so check your state’s rules before you plan around a final number.
Reporting and Penalties
You will need multiple IRS forms. Depreciation recapture goes on Form 4797 (Part III), which calculates the amount taxed at the 25 percent rate.9Internal Revenue Service. Instructions for Form 4797 (2025) Gain beyond the recapture flows to Form 8949 and then to Schedule D, combined there with your other capital gains and losses.14Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) An installment sale also requires Form 6252.
Missing the payment matters. The IRS charges 0.5 percent per month on unpaid tax, up to 25 percent of the balance.15Internal Revenue Service. Topic No. 653 – IRS Notices and Bills, Penalties and Interest Charges Intentional fraud carries a 75 percent penalty on the underpayment tied to the fraud.16Office of the Law Revision Counsel. 26 U.S.C. 6663 – Imposition of Fraud Penalty Organized records of basis, improvements, depreciation, and selling costs are what protect the number you file.