How to Calculate Capital Gains Tax on Rental Property

To calculate capital gains tax on a rental property, subtract your adjusted basis from the net amount you receive at closing, then apply three different federal rates to different slices of the gain: up to 25% on the portion equal to depreciation you claimed (or should have claimed), 0%, 15%, or 20% on the remaining appreciation, and a 3.8% surtax on top if your income is above certain thresholds. The layered structure is what makes rental property sales meaningfully different from selling stock or a personal home, and getting the adjusted basis right is where most of the work sits.

The Core Formula

The taxable gain is the amount realized minus the adjusted basis.

The amount realized is your gross selling price minus selling expenses: agent commissions, seller-paid closing costs, attorney fees, and transfer taxes. A $400,000 sale with $28,000 in commissions and closing costs produces an amount realized of $372,000.

The adjusted basis is your investment in the property as the IRS tracks it. It starts with what you paid, goes up for improvements, and comes down for depreciation. Every dollar you get wrong on basis is a dollar of gain that’s either overstated or understated, so this number deserves careful reconstruction before you run the tax math.

Building Your Adjusted Basis

Starting Basis

Your starting basis is what you paid for the property plus certain non-deductible closing costs: title insurance, survey fees, legal fees, recording fees, and transfer taxes. Mortgage-related costs like loan origination points and appraisal fees are generally amortized over the life of the loan rather than added to basis.

If you inherited the property, your starting basis is typically the fair market value on the date the prior owner died, not what they paid. If the estate elected an alternate valuation date on a federal estate tax return, that date’s value applies instead.1Internal Revenue Service. Gifts and Inheritances This step-up can dramatically reduce the taxable gain when you eventually sell.

Capital Improvements Push Basis Up

Money spent on capital improvements adds to basis. An improvement materially adds value or extends the property’s useful life: a new roof, an added bathroom, a full HVAC replacement. Routine repairs — patching drywall, fixing a leaky faucet — do not; those were deducted as operating expenses in the year you paid them.

The line between the two catches a lot of owners out. The IRS allows a de minimis safe harbor election that lets owners without audited financial statements expense items costing $2,500 or less per invoice rather than capitalizing them.2Internal Revenue Service. Tangible Property Regulations – Frequently Asked Questions Anything above that threshold that adds value or extends useful life should have been capitalized and added to basis.

Land vs. Building

Only the building portion is depreciable; land is not. Before you took your first depreciation deduction, you should have split the purchase price between the two. The common approach uses the ratio of assessed values from the local property tax bill: if the county assessor values the land at $40,000 and the building at $160,000 on a $200,000 total assessment, that’s an 80/20 split, applied to your actual purchase price. An independent appraisal can also establish the split if the assessed ratios look off.3Internal Revenue Service. Publication 527, Residential Rental Property

Depreciation Pulls Basis Down

Depreciation is the largest downward adjustment over time. Residential rental buildings are depreciated over 27.5 years using the straight-line method with a mid-month convention.3Internal Revenue Service. Publication 527, Residential Rental Property A $275,000 depreciable building produces roughly $10,000 in annual depreciation, each dollar of which reduced your ordinary income in that year and now reduces your basis on the way out.

Here is the part that surprises owners at sale: your basis must be reduced by the depreciation “allowed or allowable,” even if you never actually claimed it. Ten years of rental ownership with no depreciation on your returns still leaves you owing recapture tax as though you had taken it. Catching up on missed depreciation through amended returns or a Form 3115 is almost always worth doing before you sell.

A Worked Example

Assume a $400,000 sale with $28,000 in selling costs. Amount realized: $372,000.

Original basis was $250,000. Over ten years you added $30,000 in capital improvements, so basis before depreciation is $280,000. During those ten years you took $72,727 in depreciation (a $200,000 building divided by 27.5 years, times 10). Adjusted basis is $280,000 minus $72,727, or $207,273.

Taxable gain: $372,000 minus $207,273 equals $164,727.

That total gain now splits into pieces.

How Each Slice Is Taxed

Depreciation Recapture at Up to 25%

The first slice carved out of your long-term gain is the depreciation portion, formally called “unrecaptured Section 1250 gain.” It equals the total depreciation you took (or should have taken), and it’s taxed at a maximum rate of 25%.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses The reasoning: you deducted that depreciation against ordinary income during ownership, so the IRS claws some of that back at sale.

The 25% is a ceiling, not a flat rate. If your marginal ordinary rate is lower, you pay that lower rate on this slice.5Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed For most owners selling at a profit, though, 25% is what hits.

In the example, $72,727 in depreciation at 25% is up to $18,182 of tax on that portion alone.

Long-Term Capital Gains Rates on the Rest

The gain above the depreciation amount represents actual appreciation. This slice is taxed at long-term capital gains rates of 0%, 15%, or 20%, based on your total taxable income. For 2026 the thresholds are:6Internal Revenue Service. Rev. Proc. 2025-32

  • 0% rate: taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household).
  • 15% rate: taxable income from $49,451 to $545,500 (single), $98,901 to $613,700 (married filing jointly), or $66,201 to $579,600 (head of household).
  • 20% rate: taxable income above those upper thresholds.

In the running example, the appreciation slice is $164,727 minus $72,727, or $92,000. At 15%, that’s $13,800. Combined with the recapture, federal tax on the sale approaches $32,000 before the surtax.

The 3.8% Net Investment Income Tax

Higher-income sellers owe an additional 3.8% surtax on the gain. It applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately).7Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax Those thresholds are fixed by statute and not indexed for inflation, so more sellers cross them each year.

The 3.8% hits both the depreciation recapture portion and the appreciation portion.8Internal Revenue Service. Net Investment Income Tax When it applies, the effective top rate on appreciation climbs to 23.8%, and the effective rate on depreciation recapture can reach 28.8%. You calculate the surtax on Form 8960.

If You Held It a Year or Less

A rental property held for one year or less produces a short-term gain, taxed at your ordinary income rates up to 37%.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses No preferential rate, no separate depreciation recapture layer, just ordinary income on the whole gain. Most rental sales sit well outside this window, but quick dispositions land here.

When the Calculation Produces a Loss

If your adjusted basis exceeds the amount realized, you have a loss. Rental properties are Section 1231 assets, and the treatment depends on your other Section 1231 activity for the year. If your Section 1231 losses exceed your Section 1231 gains, the net loss is treated as ordinary rather than capital.9Office of the Law Revision Counsel. 26 USC 1231 – Property Used in the Trade or Business Ordinary losses offset all types of income without the $3,000 annual cap that limits capital losses, so a $50,000 rental loss can wipe out $50,000 of wages, rental income, or business profit in a single year.

Suspended Passive Losses Can Shrink the Gain

Many rental owners have accumulated passive activity losses they couldn’t deduct in earlier years because their income exceeded the $25,000 allowance or the $150,000 phase-out. Those suspended losses do not disappear. Selling the property in a fully taxable transaction releases them, and they can be deducted in full against any type of income in the year of sale.10Internal Revenue Service. Publication 925, Passive Activity and At-Risk Rules

$40,000 of suspended losses offsets $40,000 of gain (or other income), meaningfully reducing the tax bill produced by the calculation above. Two conditions apply: you must dispose of your entire interest in the property, and the buyer cannot be a related party. Selling to a family member or a controlled entity does not trigger the release.10Internal Revenue Service. Publication 925, Passive Activity and At-Risk Rules

Where the Numbers Get Reported

The sale flows through several connected forms before it reaches your 1040:

  • Form 4797, Sales of Business Property, is the starting point. Part I reports the overall Section 1231 gain or loss. Part III calculates the depreciation recapture portion, which feeds back into Part II as ordinary income. The remaining gain after recapture flows to Schedule D as long-term capital gain.
  • Schedule D receives the long-term gain from Form 4797. The Schedule D Tax Worksheet applies the blended rates for appreciation and unrecaptured Section 1250 gain.
  • Form 8960 calculates the 3.8% NIIT surtax if your income exceeds the thresholds.8Internal Revenue Service. Net Investment Income Tax
  • Form 8824 replaces the taxable-sale path if you completed a 1031 exchange.
  • Form 6252 is used if you structured the transaction as an installment sale.11Internal Revenue Service. About Form 6252, Installment Sale Income

State income tax sits on top of the federal calculation. Most states with an income tax also tax capital gains, and rates vary widely. Factor your state’s treatment in before estimating net proceeds.

If the Number You Just Calculated Is Too Big

Two structures can reduce or spread the tax the calculation produces.

A Section 1031 like-kind exchange defers the entire gain — including depreciation recapture — into a replacement investment property.12Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment The gain does not disappear; it carries into a reduced basis in the new property. Strict timing applies: replacement properties must be identified in writing within 45 calendar days of closing on the sold property, and the replacement purchase must close within 180 days or by the due date of your return for the year of sale, whichever comes first.13Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 You cannot take possession of the proceeds between the two closings; a Qualified Intermediary must hold the funds.

An installment sale spreads the appreciation portion of the tax over the years you actually collect payments.11Internal Revenue Service. About Form 6252, Installment Sale Income One important limit: depreciation recapture cannot be spread. The full recapture amount is taxed in the year of sale at rates up to 25%, regardless of how little cash you receive in year one.14Internal Revenue Service. Topic No. 705, Installment Sales Plan cash flow accordingly, because the recapture bill arrives before most of the money does.