When you sell real estate at a profit, the federal real estate capital gains tax runs from 0% to 20% on property held longer than a year, plus up to 25% on any depreciation you previously claimed and an extra 3.8% surtax if your income is high enough. Property held one year or less is taxed at ordinary income rates up to 37%. Homeowners selling a main residence can usually exclude $250,000 of gain ($500,000 for married couples filing jointly), and investors can often defer the entire bill through a like-kind exchange or spread it across years with an installment sale.
How to Figure the Taxable Gain
Your gain is not the sale price. It’s the amount realized minus your adjusted basis in the property.
The amount realized is the gross sale price minus the costs of selling: agent commissions, title insurance you provided to the buyer, attorney fees, recording charges, and transfer or stamp taxes. Sell a property for $600,000 and pay $36,000 in commissions and $4,000 in other closing costs, and your amount realized is $560,000.
Your adjusted basis starts with what you paid for the property plus certain settlement costs at purchase. The IRS lets you add abstract and title search fees, legal fees for preparing the deed and contract, recording fees, survey costs, transfer taxes, and owner’s title insurance premiums.1Internal Revenue Service. Publication 523, Selling Your Home Financing costs — mortgage insurance, lender-required appraisals, and loan origination points — don’t count.
Capital improvements made during ownership add to basis. These are costs that add value, extend useful life, or adapt the property to a new use: a new roof, a kitchen renovation, an added bathroom. Routine maintenance like repainting or fixing a faucet does not qualify. Keep every receipt. Without proof, you lose the basis adjustment and the gain grows.
Rental and business property is different in one important way: you must reduce basis by all depreciation you claimed, or should have claimed, during ownership. Residential rental property depreciates over 27.5 years straight-line under MACRS.2Internal Revenue Service. Publication 527, Residential Rental Property A $400,000 depreciable basis generates about $14,545 per year, so after ten years your basis has dropped by roughly $145,450. That means a bigger gain at sale, and part of that gain is taxed at its own special rate.
A worked example: you bought a rental for $350,000, paid $5,000 in allowable settlement costs, and spent $45,000 on a new roof and HVAC. Initial basis is $400,000. You claimed $100,000 of depreciation, so adjusted basis is $300,000. If your net amount realized is $550,000, your total capital gain is $250,000, and $100,000 of that is attributable to the depreciation you deducted along the way.
Federal Tax Rates on Real Estate Gains
Rate depends on three things: how long you owned the property, your total taxable income for the year, and whether any depreciation was claimed. A single real estate sale can hit three different federal layers.
Long-Term Rates (Held More Than One Year)
Long-term gains get preferential rates of 0%, 15%, or 20%. The applicable rate depends on your taxable income, not just the size of the gain. For 2026:3Internal Revenue Service. Revenue Procedure 2025-32
- 0% rate: taxable income up to $49,450 (single), $98,900 (married filing jointly), $66,200 (head of household), or $49,450 (married filing separately).
- 15% rate: income above those amounts up to $545,500 (single), $613,700 (married filing jointly), $579,600 (head of household), or $306,850 (married filing separately).
- 20% rate: income above the 15% thresholds.
Most sellers land in the 15% bracket. The 0% rate helps retirees and anyone whose income happens to be low in the year of sale.
Short-Term Rates (Held One Year or Less)
Flip a property within a year of buying it and the gain is taxed at your ordinary income rate, which runs from 10% to 37% in 2026.4Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 A $150,000 short-term gain could cost a high earner $55,500 in federal tax, roughly three times the 15% long-term bill on the same number. The holding period starts the day after you acquire the property and includes the day you sell.
Depreciation Recapture at 25%
If you claimed depreciation on rental or business property, the IRS claws back the benefit at sale. The portion of your gain equal to the depreciation you deducted, called unrecaptured Section 1250 gain, is taxed at a maximum of 25% regardless of your long-term bracket.5Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed Only the gain above that depreciation layer gets the 0%, 15%, or 20% treatment.
Back to the earlier example. Your $250,000 gain includes $100,000 of prior depreciation. That $100,000 is taxed at up to 25% ($25,000), and the remaining $150,000 is taxed at your long-term rate. Sellers routinely underestimate this piece.
Net Investment Income Tax (3.8%)
Higher earners pay an additional 3.8% surtax on net investment income, including real estate gains. The thresholds:6Internal Revenue Service. Topic No. 559, Net Investment Income Tax
- $250,000 for married filing jointly or qualifying surviving spouse
- $200,000 for single or head of household
- $125,000 for married filing separately
The tax applies to the lesser of net investment income or the amount by which modified adjusted gross income exceeds the threshold.7Internal Revenue Service. Questions and Answers on the Net Investment Income Tax These thresholds have not been indexed for inflation since 2013. Add the surtax to the 20% top long-term rate and the effective ceiling on a long-term real estate gain is 23.8% — or 28.8% on the depreciation recapture portion.
Selling Your Main Home: The Section 121 Exclusion
The biggest break in real estate tax lets you exclude up to $250,000 of gain on the sale of your main home, or $500,000 if married filing jointly.8Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence For most homeowners, this wipes out the entire tax.
Ownership and Use Tests
To qualify for the full exclusion, both must be true during the five-year period ending on the sale date:9Internal Revenue Service. Sale of Residence – Real Estate Tax Tips
- Ownership test: you owned the home for at least two of the five years before sale.
- Use test: you lived in it as your main residence for at least two of those five years.
The two years don’t have to be continuous — any 24 months within the five-year window counts. For married couples claiming $500,000, only one spouse needs to meet the ownership test, but both must meet the use test.8Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence One more rule catches people: you can’t claim the exclusion if you already excluded gain from another home sale within the two years before this one.10eCFR. 26 CFR 1.121-2 – Limitations
Partial Exclusion When You Sell Early
Sell before meeting the two-year requirement because of a job relocation, a health issue, or another unforeseen circumstance, and you can take a prorated exclusion. For a work move, the new job must be at least 50 miles farther from the home than your previous workplace. For health, the sale must be connected to getting or providing medical care for you or a family member.
The math: qualifying months divided by 24, times $250,000 or $500,000. Live in the home 15 months before a qualifying transfer and your limit is 15/24 × $250,000, or $156,250.
Depreciation and Non-Qualified Use
Two carveouts shrink the exclusion. First, any gain attributable to periods of non-qualified use after December 31, 2008 — such as years the home was a rental — cannot be excluded.8Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The taxable portion is non-qualified months divided by total ownership months. Own a property for 10 years and rent it for 4 of them before moving in, and roughly 40% of the gain falls outside the exclusion.
Second, the exclusion never applies to gain attributable to depreciation claimed after May 6, 1997, even on a primary residence.11eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence If you took a home office deduction, or rented the house for a stretch, that depreciation is recaptured at up to 25% even when the rest of the gain is fully excluded. This surprises homeowners who converted a former rental into their main home.
Deferring the Tax on Investment Property
If the property is held for investment or business use, two tools can push the tax into later years or across multiple years.
1031 Like-Kind Exchange
Instead of selling and paying, you can roll the gain into a replacement property under Section 1031.12Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment The tax isn’t forgiven; it’s deferred until you eventually sell in a taxable transaction. Some investors chain exchanges for decades, deferring across multiple properties until death, when heirs receive a stepped-up basis that can eliminate the deferred gain entirely.
Both the property you give up and the one you acquire must be held for investment or business. Your personal home doesn’t qualify, and neither does property held primarily for resale, like a developer’s inventory. For real estate, “like-kind” is interpreted broadly: a single-family rental can be exchanged for an office building, raw land, or a warehouse.
A delayed exchange has two hard deadlines running from the day after you transfer your old property:
- 45-day identification period: identify potential replacement properties in writing within 45 calendar days. Under the three-property rule, you can identify up to three of any value. Alternatively, you can identify more than three if their combined fair market value does not exceed 200% of the relinquished property’s value.
- 180-day closing period: close on the replacement within 180 calendar days. This runs concurrently with the 45-day window, leaving 135 days after identification.
Both deadlines are absolute. No extensions for weekends, holidays, or anything else. Missing either by a single day collapses the exchange and triggers immediate taxation.13Internal Revenue Service. 2025 Instructions for Form 8824 – Like-Kind Exchanges
You cannot touch the sale proceeds. A qualified intermediary holds the funds in escrow from the sale of your old property and uses them to buy the replacement. If the money passes through your hands even briefly, the IRS treats it as constructive receipt and the deferral is lost.
To fully defer the gain, the replacement must be of equal or greater value, you must reinvest all net equity, and you must take on equal or greater debt. Any cash, debt relief, or non-real-estate property you receive is “boot” and is taxable in the year of the exchange up to the amount of your realized gain.14Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031
Installment Sales
When you finance part of the sale yourself and receive payments over multiple years, you can spread gain recognition across the life of the loan rather than reporting it all upfront. Any sale with at least one payment arriving after the close of the tax year qualifies for installment reporting, though you can elect out and pay the full tax now if you prefer.
The key figure is the gross profit ratio: total gain divided by contract price. Apply that percentage to each principal payment to find the taxable portion. A 40% ratio means every $10,000 principal payment produces $4,000 of taxable gain. Interest is reported separately as ordinary income. File Form 6252 each year you receive payments.15Internal Revenue Service. Form 6252 – Installment Sale Income
Installment reporting is not available for inventory property or sales that produce a loss. And depreciation recapture does not get deferred this way: the full recapture amount is taxed in the year of sale regardless of when the cash comes in.
Offsetting Gains With Capital Losses
Capital losses from other investments — stocks, bonds, or other real estate sold at a loss — offset your gain dollar for dollar. Long-term losses first offset long-term gains, and short-term losses first offset short-term gains. Any remainder crosses over to the other category.16Internal Revenue Service. Topic No. 409, Capital Gains and Losses
If losses exceed gains for the year, you can deduct up to $3,000 of net losses against ordinary income ($1,500 if married filing separately). Unused losses carry forward indefinitely.16Internal Revenue Service. Topic No. 409, Capital Gains and Losses One limit matters here: a loss on personal-use property, such as selling your own home for less than you paid, is not deductible and cannot offset other gains.
If You Inherited or Received the Property as a Gift
How you acquired the property changes the starting basis, which changes everything downstream.
Inherited real estate generally takes a basis equal to fair market value on the date of the decedent’s death, not what the decedent originally paid. This “stepped-up” basis can erase decades of appreciation. If your parent bought a home for $80,000 in 1985 and it was worth $500,000 at their death, your basis is $500,000. Sell soon after at that price and you owe nothing. The estate’s executor may choose an alternate valuation date six months after death if it reduces estate tax, and if Form 706 was filed you should receive a Schedule A from Form 8971 reporting the figure to use.17Internal Revenue Service. Publication 551, Basis of Assets
Gifted property is the opposite. You take over the donor’s adjusted basis, carrying their unrealized gain with you. If the donor’s basis was $100,000 and the property was worth $400,000 at the time of the gift, your basis for figuring gain on a future sale is $100,000.17Internal Revenue Service. Publication 551, Basis of Assets
Reporting the Sale and Avoiding Underpayment Penalties
The closing agent, usually a title company or attorney, files Form 1099-S with the IRS reporting gross proceeds. An exception applies if the seller certifies in writing that the property is a principal residence and the gain is fully excludable under Section 121.18Internal Revenue Service. Instructions for Form 1099-S
You report gains and losses on Form 8949, which feeds Schedule D of your Form 1040.19Internal Revenue Service. 2025 Instructions for Form 8949 Like-kind exchanges go on Form 8824.13Internal Revenue Service. 2025 Instructions for Form 8824 – Like-Kind Exchanges Installment sales use Form 6252 each year payments arrive.
A large gain can also trigger estimated tax obligations. No federal tax is withheld from sale proceeds the way it is from a paycheck, so you may owe an underpayment penalty if you don’t make a quarterly estimated payment or otherwise meet the safe harbor. The safe harbor requires paying at least 90% of the current year’s tax, or 100% of the prior year’s (110% if your adjusted gross income exceeded $150,000).20Internal Revenue Service. Underpayment of Estimated Tax by Individuals Penalty If you close late in the year and your withholding from other income won’t cover the extra tax, a single estimated payment by the next quarterly deadline is often enough to avoid the penalty.