Published March 05, 2026Updated November 01, 2026

Capital Gains Tax on Real Estate

Capital gains tax on real estate is the federal and state tax you owe on the profit when you sell investment property for more than your adjusted basis. Calculating it takes two steps that sellers often collapse into one. First, the federal gain is divided into rate categories, because the portion attributable to depreciation is generally taxed at a different maximum rate than the rest of the gain. Second, additional taxes apply on top of the federal result, including the 3.8% net investment income tax and state income tax.

This article answers how much you will owe on an investment property sale, not how to reduce or defer it. It covers the 2026 federal rate brackets, the net investment income tax threshold that has not moved since 2013, how state tax is sourced, and a worked example on a $2,000,000 sale. All figures are current as of July 2026 and apply to tax year 2026.

This article covers investment and rental property. Owner occupied homes may qualify for the separate Section 121 home sale exclusion, which is outside this article’s scope.

How is capital gains tax calculated when you sell an investment property?

Capital gains tax on real estate is calculated on the difference between your net sale price and your adjusted basis, not on the sale price itself. The gain is what the tax applies to, so an investor who sells a property for $2,000,000 is not taxed on $2,000,000.

The calculation runs in five steps:

  1. Find the net sale price. Subtract commissions, title fees, transfer taxes, and other selling costs from the sale price.
  2. Find the adjusted basis. Start with the purchase price and purchase closing costs, add capital improvements, and subtract all depreciation allowed or allowable.
  3. Subtract to find the total gain. The net sale price minus the adjusted basis is the gain the tax applies to.
  4. Split the gain into federal rate categories. Gain attributable to straight-line depreciation on the building is taxed at up to 25%, depreciation on cost segregated components is generally taxed at ordinary income rates, and the remaining gain is taxed at 0%, 15%, or 20%. If you held the property one year or less, the gain is taxed at ordinary income rates instead.
  5. Add the taxes that sit on top. Apply the 3.8% net investment income tax if your MAGI exceeds the threshold, then state income tax, which can be owed to both the state where the property sits and the state where you live.

Adjusted basis is your original purchase price, plus capital improvements, minus depreciation. Depreciation is the piece sellers most often overlook. Basis is reduced by depreciation allowed or allowable, meaning the deduction you were entitled to take, whether or not you claimed it. A lower basis produces a larger taxable gain, which is why a property that appears to have doubled in value often produces a gain larger than the price increase alone.

Alan Fruitman writes in The NNN Triple Net Property Book that an investor who sells without a 1031 exchange “must repay the IRS a portion of the money previously depreciated.” For straight-line depreciation on the building, that repayment is taxed in its own federal rate category, at up to 25%, rather than at the 0%, 15%, or 20% long-term rate.

Selling costs reduce the gain as well. Commissions, title fees, transfer taxes, and other closing costs come off the sale price before the gain is calculated.

Holding period sets the rate schedule. Property held more than one year produces a long-term capital gain taxed at the preferential 0%, 15%, or 20% rates. Property held one year or less produces a short-term capital gain taxed at ordinary income rates, which reach 37% federally.

What are the 2026 long-term capital gains tax rates and income thresholds?

For tax year 2026, federal long-term capital gains are taxed at 0%, 15%, or 20%, and the rate depends on your total taxable income and filing status. The thresholds below come from IRS Revenue Procedure 2025-32.

Rate Single Married Filing Jointly
0% Up to $49,450 Up to $98,900
15% $49,451 to $545,500 $98,901 to $613,700
20% Above $545,500 Above $613,700

Head of household filers pay 0% on taxable income up to $66,200 and 20% above $579,600, and married couples filing separately pay 0% up to $49,450 and 20% above $306,850. The IRS guidance on federal capital gains tax rates covers the rate structure and holding period rules for every filing status.

Three features of this table are commonly misread:

  • The thresholds measure taxable income, not proceeds. Taxable income is your income after the standard or itemized deduction, and the gain counts toward it. A large gain pushes many sellers into the 20% band in the year of the sale.
  • The rates are tiered, not cliff edged. Crossing a threshold does not retroactively tax your entire gain at the higher rate. Only the dollars above the threshold pay the higher rate.
  • The gain stacks on top of ordinary income. Long-term capital gains sit above wages and business income when the brackets are applied, so where the gain lands depends on what you already earned that year.

These thresholds are indexed for inflation and move every January. The 2025 single filer 0% ceiling was $48,350, and the 2026 ceiling is $49,450.

How does the 3.8% net investment income tax (NIIT) apply to a real estate sale?

The net investment income tax (NIIT) is a 3.8% federal tax under Internal Revenue Code Section 1411 that applies on top of capital gains tax once modified adjusted gross income (MAGI) exceeds a fixed threshold. The thresholds are $200,000 for single and head of household filers, $250,000 for married filing jointly, and $125,000 for married filing separately.

The NIIT is charged on the lesser of two amounts: your net investment income, or the amount by which your MAGI exceeds the threshold. For a large sale that clearly clears the threshold, the practical effect approaches 3.8% of the gain, but the lesser-of rule governs. Gain from the sale of investment real estate is generally included in net investment income. Gain from rental property is also included unless you qualify as a real estate professional and your rental activity rises to a trade or business, a determination that turns on the passive activity rules. The thresholds and the definition of net investment income are set out in the IRS guidance on the net investment income tax.

One structural feature separates the NIIT from every other number in this article. Its thresholds are written into statute and have not been indexed for inflation since the tax took effect in 2013. The federal capital gains brackets move each January. The $200,000 and $250,000 lines do not.

The effect is measurable. According to the Congressional Research Service, the number of taxpayers subject to the NIIT rose from 3.1 million in 2013 to 7.3 million in 2021, and the revenue it raised grew from $16.5 billion to a preliminary $59.8 billion over the same period.

For a property seller, the practical risk is a one-year spike. An investor whose normal MAGI is $150,000 sits well below the NIIT threshold in an ordinary year. Sell an investment property with a $600,000 gain, and that investor may move far above the threshold for a single year and owe the 3.8% on top of the capital gains rate. The NIIT is not only a tax on consistently high earners, and whether the full gain is included depends partly on whether the property and the activity are treated as passive or nonpassive.

How do depreciation and state taxes affect capital gains tax on an investment property?

Two further items affect the total on most investment property sales: the portion of gain attributable to depreciation, which carries its own federal rate ceiling, and state income tax. The depreciation portion is generally taxed at a maximum federal rate of 25%, and the state layer ranges from 0% in states with no personal income tax to 13.3% at California’s top rate, before any local income tax.

  • Gain attributable to depreciation. For most depreciable real property, the portion of gain attributable to straight line depreciation is generally treated as unrecaptured Section 1250 gain and taxed at a maximum federal rate of 25%. Certain cost segregated components and other Section 1245 property may instead produce ordinary income recapture. This is a separate federal rate category, not an additional tax charged on the same dollars as your long-term capital gains rate, and its mechanics are covered in full in a separate article. Investors who claimed bonus depreciation on NNN property generally face ordinary income recapture on the components identified in a cost segregation study, up to the gain on those components, when the property is sold.
  • State income tax. Most states tax capital gains as ordinary income at their regular rates rather than at a preferential capital gains rate. A handful of states impose no personal income tax at all, so the state layer is zero when both the property and the seller are in one of those states.

Read the table below as two federal rate categories followed by two additional taxes, not as four taxes charged cumulatively on the same gain.

Item Type Rate Applies To
Long-term capital gain Federal rate category 0%, 15%, or 20% The gain remaining after the depreciation portion, based on your taxable income
Unrecaptured Section 1250 gain Federal rate category Maximum 25% The portion of gain attributable to straight line depreciation
Net investment income tax Additional federal tax 3.8% Net investment income once MAGI exceeds $200,000 single or $250,000 married filing jointly
State income tax Additional state tax 0% to 13.3% The gain, at the rates of the state where the property sits and the state where you live

Which state taxes the gain on an out-of-state property?

State treatment varies more than any other element, and two states can tax the same gain, the state where the property sits and the state where you live. States commonly tax nonresidents on gains from real property within their borders. California treats gain from California real property as California source income regardless of the seller’s residency, and New York requires nonresidents to pay estimated tax on the gain from New York real property at transfer. Your home state may then allow a credit for taxes paid to the source state.

State Top Rate Applied to Capital Gains Note
California 13.3% Taxed as ordinary income, and applied to in-state property regardless of seller residency
New York 10.9% Taxed as ordinary income, with an additional New York City tax for city residents
Texas, Florida, Nevada 0% No personal income tax
Washington 0% on real estate The state capital gains excise tax expressly exempts real estate sales

Which states have no income tax on real estate gains?

Nine states levy no broad-based personal income tax as of 2026: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming. New Hampshire joined recently, because its interest and dividends tax was repealed for taxable periods beginning after December 31, 2024. Washington is the notable case, because it levies a standalone capital gains excise tax that exempts real estate sales entirely.

Two qualifications matter. The list above is states with no personal income tax, not states with no capital gains tax, and several income tax states apply exclusions or deductions that put their effective rate below their headline rate. Second, no-income-tax residency does not by itself eliminate state tax. A Texas resident selling Texas real estate generally owes no state income tax on the gain, but that same seller can owe tax to another state on property located there.

How much tax would you owe on a $2,000,000 investment property sale?

On a $2,000,000 sale of a property purchased for $800,000 with $200,000 of depreciation allowed or allowable, the federal and state total comes to $455,200 on a $1,400,000 gain under the assumptions below.

The example rests on six assumptions:

  • Filing status and bracket. An individual filing as single, with ordinary taxable income before the sale already above the 20% capital gains threshold, so the entire remaining gain is taxed at 20%.
  • Holding period. The property was held more than one year, so the gain is long-term.
  • Depreciation character. All $200,000 produces unrecaptured Section 1250 gain taxed at the 25% maximum, with no Section 1245 or ordinary income recapture component.
  • NIIT applicability. MAGI sits well above the threshold and the activity is passive, so the full gain is net investment income.
  • No offsets or adjustments. There are no selling expenses, suspended passive losses, capital loss carryforwards, or installment sale treatment.
  • State rate. An illustrative 8% applies to the full gain, with no difference between federal and state basis.
Item Amount
Original purchase price $800,000
Depreciation allowed or allowable ($200,000)
Adjusted basis $600,000
Sale price $2,000,000
Total gain $1,400,000
Unrecaptured Section 1250 gain, at the 25% maximum $50,000
Long-term capital gain at 20% on the remaining $1,200,000 $240,000
Net investment income tax at 3.8% $53,200
State tax at an illustrative 8% $112,000
Total tax $455,200

Two lines are worth reading closely. The 20% rate is applied to $1,200,000, not to the full $1,400,000, because the $200,000 attributable to depreciation falls into its own federal rate category. Applying 20% to the entire gain is a common calculation error.

The 8% state rate is illustrative. A Texas resident selling Texas property pays nothing on that line, and a seller of California property at the top rate pays materially more. Have your CPA model your actual filing status, ordinary income, MAGI, depreciation history, the state where the property is located, and your state of residence before you commit to a sale price or a closing date.

What is the combined federal and state tax rate on a real estate sale?

For a seller in the top federal bracket, the combined federal and state tax on an investment property sale generally runs from about 24.5% to 38% of the total gain, depending mainly on the state tax rate. On the $2,000,000 example, a sale with no state income tax comes to 24.5%, the 8% case to 32.5%, and California’s 13.3% top rate to about 37.8%.

That range is a range, not a universal figure. It assumes the 20% federal bracket, full NIIT applicability, and a depreciation share similar to the example’s. An investor in the 15% bracket who lives in Texas and sells Texas property with little depreciation history pays a fraction of that. Two sellers with identical gains can owe totals that differ by six figures.

The number that matters is yours, and it depends on five inputs: your taxable income for the year, your MAGI, the depreciation allowed or allowable, the state where the property is located, and your state of residence with any credit it allows for taxes paid elsewhere. Your CPA will calculate the exact figure from your return, and it is worth doing before you list rather than after you close.

The size of the tax bill also drives the next decision. Alan Fruitman’s rule of thumb in The NNN Triple Net Property Book turns on it: “If your tax bill is small, you may opt to pay the taxes. If your tax bill is large, a 1031 exchange is almost always the better choice.” The main ways to sell rental property without a huge tax bill, including an installment sale and a charitable remainder trust, are compared in a separate article, and the complete guide to 1031 exchanges explains how the exchange itself works.

Frequently asked questions about capital gains tax on real estate

Do you have to pay capital gains tax if you reinvest the proceeds into another property?

Yes, you generally owe capital gains tax even if you reinvest the proceeds, because reinvesting does not by itself eliminate or defer the tax. The tax is triggered by the sale, regardless of what you do with the money afterward. The exception is a properly structured 1031 exchange, which defers the tax only if strict requirements are met before and after closing, including the use of a qualified intermediary and fixed identification and closing deadlines. Selling first, taking the cash, and then buying a replacement property does not qualify. This is one of the most common and most expensive misconceptions in investment real estate.

Does selling your primary residence follow the same capital gains rules?

No, because a primary residence may qualify for the Section 121 exclusion, which allows a single filer to exclude up to $250,000 of gain and a married couple filing jointly to exclude up to $500,000, provided you owned and lived in the home for at least two of the five years before the sale. Investment and rental property does not qualify for this exclusion. On a converted property, gain equal to depreciation allowed or allowable after May 6, 1997 is never excluded, and when a rental later becomes your residence, gain allocated to periods of nonqualified use after 2008, such as rental years, generally cannot be excluded either. Renting out a former residence after you move out does not reduce the rest of the exclusion, provided you still meet the two-of-five-year test.

What happens to capital gains tax when you inherit real estate?

Inherited property generally receives a stepped-up basis, meaning the heir’s basis resets to the property’s fair market value at the owner’s death rather than the owner’s original purchase price. Appreciation on the deceased owner’s share (both halves, for community property) escapes capital gains tax entirely, and the depreciation claimed on that share is wiped out along with it. If the heir sells shortly after inheriting, there is often little or no taxable gain. Gain or loss for the heir is measured only from the date-of-death value forward, and inherited property is automatically treated as long-term regardless of how quickly it is sold. Heirs of a NNN property also inherit the lease, and the guide to inheriting NNN property covers the tenant and lease decisions that follow.

Can losses offset the capital gain from a real estate sale?

Yes, losses can offset the gain in two ways. First, capital losses from other investments, including stocks and other properties, offset capital gains dollar for dollar in the same year, and unused losses carry forward indefinitely. Only $3,000 of net capital loss ($1,500 if married filing separately) can offset ordinary income in a year, but there is no limit on how much can offset capital gains. Second, if the property was a passive activity, any suspended passive losses that accumulated during ownership are generally released in full in the year you sell your entire interest to an unrelated buyer, and those losses can offset the gain and other income. Sellers who ignore suspended losses routinely overestimate their tax bill.

When do you actually pay capital gains tax, at closing or when you file?

For U.S. sellers, federal capital gains tax is not collected at closing. The sale is reported on your tax return for the year of the sale, on Form 4797 for rental property or on Form 8949 for land held only for investment, and the tax is due with that return. However, a large gain usually creates an estimated tax obligation, so you may need to make a quarterly estimated payment shortly after closing to avoid underpayment penalties rather than waiting until filing season. Some states do collect at closing: several require withholding on real estate sales, most often from nonresident sellers, with the amount withheld credited against the final state tax bill when the return is filed.

What happens if you sell an investment property at a loss?

No capital gains tax is due on a sale at a loss, and the loss itself may be deductible. A loss on rental property held more than one year is generally a Section 1231 loss, and a net Section 1231 loss for the year is treated as an ordinary loss, so the $3,000 annual limit on capital losses does not apply to it. Net Section 1231 gains in the following five years are then taxed as ordinary income up to the amount of that loss. A loss on land held only for investment is a capital loss, and a loss on a sale to a related party or on a personal residence is not deductible.

About the Author

Alan Fruitman is the founder of 1031tax.com and President & Managing Broker of Real Estate Foundation, Inc. Alan began his real estate career in 1993 and has closed more than 1,000 properties valued at several billion dollars. He is the author of The NNN Triple Net Property Book and is a nationally recognized authority on single tenant net leased property and IRC Section 1031 exchanges. With more than 30 years of experience, Alan advises investors on identifying, underwriting, and acquiring absolute NNN leased assets with corporate guarantees, including banks, quick service restaurants, pharmacies, dollar stores, convenience stores, and auto related retailers. Alan holds Colorado real estate license ER1322889 and helps buyers and sellers nationwide.

This article is for general informational purposes only and does not constitute legal, tax, financial, or real estate advice. Every exchange and tax situation is unique. We strongly encourage you to work with qualified professionals, including a qualified intermediary, CPA, and real estate attorney, before making any decisions related to a 1031 exchange. 1031tax.com is a service of Real Estate Foundation, Inc.