Selling an investment property triggers three main federal taxes: long-term capital gains tax on your profit, depreciation recapture at up to 25% on the depreciation you previously deducted, and, for higher earners, a 3.8% net investment income surtax. Foreign sellers face a separate 15% FIRPTA withholding on the gross sale price. The tax implications of selling an investment property are usually much larger than for a primary home, but several provisions in the tax code let you defer, spread out, or partially exclude the gain if you plan before the sale closes.
How the Taxable Gain Is Calculated
Your gain equals the sale price minus selling expenses minus your adjusted basis. Adjusted basis is what you originally paid for the property plus the cost of capital improvements you made during ownership — a new roof, an HVAC replacement, added square footage. Routine repairs and maintenance do not add to basis. Depreciation you claimed while renting the property reduces your basis, which is why depreciation increases your taxable gain when you sell.
Selling expenses come off the top before the gain is calculated. Real estate agent commissions, advertising fees, legal fees, and any loan charges you paid on the buyer’s behalf are all subtracted from the sale price.1Internal Revenue Service. Selling Your Home Certain settlement costs — title search fees, recording fees, transfer taxes, survey fees, and owner’s title insurance — can be added to your basis instead, which also reduces the gain. Costs related to financing, such as mortgage insurance premiums, loan origination fees, and lender-required appraisal fees, cannot be added to basis.
Long-Term Capital Gains Rates
If you held the property for more than a year, the gain qualifies as a long-term capital gain, taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income and filing status.2eCFR. 26 CFR Part 1 – General Rules for Determining Capital Gains and Losses For 2026, single filers pay 0% on long-term gains up to about $49,450 in taxable income, 15% up to roughly $545,500, and 20% above that threshold. Married couples filing jointly hit the 20% rate above approximately $613,700.
Note that the 0/15/20 rates apply only to the portion of the gain that isn’t attributable to depreciation. That piece has its own rate.
Depreciation Recapture
Most rental owners take depreciation deductions each year they hold the property. Those deductions reduce your basis, so when you sell, the IRS “recaptures” that benefit by taxing the corresponding portion of the gain at a higher rate. This is called unrecaptured Section 1250 gain, and it’s taxed at a maximum rate of 25% — higher than the standard long-term capital gains rates.3Office of the Law Revision Counsel. 26 U.S.C. 1250 – Gain From Dispositions of Certain Depreciable Realty
A worked example: you bought a rental for $300,000, claimed $80,000 in depreciation over the years, and sold for $450,000. Depreciation reduced your adjusted basis to $220,000, so your total gain is $230,000. Of that, $80,000 is taxed at the 25% recapture rate, and the remaining $150,000 is taxed at your regular long-term capital gains rate. Ignoring recapture when you estimate your tax bill is one of the most common causes of a shortfall at filing time.
The 3.8% Net Investment Income Tax
Higher-income sellers owe an additional 3.8% surtax on net investment income, including capital gains from real estate sales. It applies when your modified adjusted gross income (MAGI) exceeds $200,000 for single filers, $250,000 for married filing jointly, or $125,000 for married filing separately.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax These thresholds are not indexed for inflation.
The tax hits the lesser of your total net investment income or the amount your MAGI exceeds the threshold. A single filer with $270,000 in MAGI and $90,000 in net investment income pays the 3.8% on $70,000 — the amount MAGI exceeds $200,000 — not the full $90,000.5Internal Revenue Service. Questions and Answers on the Net Investment Income Tax Stacked with the 20% capital gains rate and 25% recapture rate, the total federal bite on parts of a large gain can climb well above 20%.
1031 Like-Kind Exchange
Under IRC Section 1031, you can defer the entire capital gains tax and depreciation recapture by rolling the proceeds into another investment property of equal or greater value. The replacement must be real property held for investment or business use. You cannot exchange into a personal residence or a property you plan to flip.6Office of the Law Revision Counsel. 26 U.S.C. 1031 – Exchange of Real Property Held for Productive Use or Investment
The deadlines are strict and non-negotiable. You have 45 days from closing on the sale to identify potential replacement properties in writing, and 180 days from closing (or your tax return due date, whichever comes first) to complete the purchase. You cannot touch the sale proceeds at any point. A qualified intermediary — a neutral third party — must hold the funds from the day of sale until the replacement property closes. Intermediary fees typically run $500 to $1,500 depending on complexity. Miss either deadline and the exchange fails; you’ll owe the full tax that year.
Installment Sale
If the buyer pays over multiple years instead of a lump sum, IRC Section 453 lets you report the gain proportionally as each payment comes in. Spreading the gain across tax years can keep you out of the top bracket in any single year and lower the overall rate you pay. The taxable portion of each payment equals the payment multiplied by the “gross profit ratio” — total gain divided by total contract price.7eCFR. 26 CFR 15a.453-1 – Installment Method Reporting for Sales of Real Property
Installment sales work when you’re willing to act as the lender and the buyer agrees to pay over time. The trade-off is credit risk: if the buyer defaults on future payments, you’re chasing them for the balance.
Partial Section 121 Exclusion for a Former Home
If you lived in the property as your primary residence before turning it into a rental, you may be able to exclude some of the gain. Section 121 allows up to $250,000 of gain ($500,000 for married filing jointly) if you owned and used the property as your principal residence for at least two of the five years before the sale.8Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence
Two limits matter for converted rentals. First, the exclusion never covers gain attributable to depreciation claimed after May 6, 1997. That portion is still taxed at the 25% recapture rate.9eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence Second, the excludable gain is reduced by a “nonqualified use” ratio. Any period you used the property as a rental before it became your primary residence counts as nonqualified use and shrinks the exclusion proportionally. Rental periods after your last day of residential use do not count against you in this calculation.
FIRPTA Withholding for Foreign Sellers
If you are a foreign person selling U.S. real property, the buyer must withhold 15% of the gross sale price under the Foreign Investment in Real Property Tax Act and send it to the IRS.10Internal Revenue Service. FIRPTA Withholding This is a prepayment of your U.S. tax liability, not an added tax. You can claim a refund for anything withheld above what you actually owe when you file.
Several exceptions apply. No withholding is required if the sale price is $300,000 or less and the buyer is an individual who intends to use the property as a residence for at least half of each of the first two years after purchase. Withholding also doesn’t apply if the seller certifies under penalty of perjury that they are not a foreign person.11Internal Revenue Service. Exceptions From FIRPTA Withholding If you expect your actual liability to fall below 15% of the sale price, you can apply for a withholding certificate on IRS Form 8288-B before closing. The IRS typically processes these within 90 days of receiving complete information.12IRS.gov. Application for Withholding Certificate for Dispositions by Foreign Persons of U.S. Real Property Interests
State and Local Transfer Taxes
Federal taxes are the biggest line, but most states and some local governments also charge a transfer tax when real property changes hands. Rates run from as low as 0.01% to over 3% of the sale price at the state level, with some jurisdictions adding county or city surcharges. About a dozen states charge no transfer tax at all. Whatever the local rate, transfer taxes get paid at closing and are typically added to your basis rather than deducted as a selling expense, which reduces the federal gain by the same amount.
Estimating Your Net Proceeds
Before you list, work the numbers backward from the expected sale price. Subtract selling expenses (commissions of roughly 2.5% to 3% for a listing agent, plus any buyer-agent commission you agree to cover, transfer taxes, escrow, title, attorney, and recording fees). Then apply the tax stack: 25% on the depreciation you’ve claimed, your capital gains rate on the rest of the gain, and 3.8% net investment income tax if your MAGI clears the threshold. If a 1031 exchange, installment sale, or partial Section 121 exclusion is on the table, the numbers can shift substantially — which is why the decision to use one of them has to be made before, not after, the sale closes.