Net Investment Income Tax on Rental Property Sale
A large gain can trigger a tax you have never paid before
The net investment income tax is a 3.8% federal tax that can apply to the gain when you sell a rental property. It reaches only owners whose modified adjusted gross income for the year, gain included, passes a fixed threshold: $250,000 on a joint return, $200,000 for a single filer and $125,000 for a married person filing separately. It is charged at 3.8% on whichever is less, your net investment income or the part of your income above that threshold.
The sale-year income checklist: 10 items. The first is free on this page.
Updated November 16, 2026 by Private Exchange Group. 3 minute read. Not tax or legal advice.
The short version
- The 3.8% tax applies to individuals, estates and trusts that have net investment income and income above thresholds fixed in the statute.
- The thresholds are $200,000 single, $250,000 joint and $125,000 married filing separately, and the IRS says they are not indexed for inflation.
- A gain counts toward your income for the year, so an owner who is normally under the threshold can cross it in the year of sale.
- Gain deferred in a 1031 exchange is not recognized that year, so it is not net investment income until a later taxable sale.
Who pays the 3.8% tax and on what
Section 1411 adds a 3.8% tax on top of the regular income tax. For an individual it applies to the lesser of 2 amounts: net investment income for the year, or the excess of modified adjusted gross income over the threshold for your filing status. If your income is under the threshold, the tax is zero no matter how much investment income you have.
The IRS lists rents and gain from the sale of investment real estate as net investment income, so a rental sale is covered. Wages, Social Security benefits and operating income from a nonpassive business are not. Nonresident aliens are outside the tax, and estates and trusts have a separate threshold tied to the highest trust tax bracket. The tax is figured on Form 8960.
Swipe the table sideways to see every column
Thresholds from 26 U.S.C. 1411(b) and IRS Topic 559. The IRS states that they are not indexed for inflation.
How a single sale pushes income over the line
Say a married couple usually reports $180,000 of income and sells a rental with a $300,000 gain. The figures are hypothetical. Their modified adjusted gross income for the year becomes $480,000, which is $230,000 over the joint threshold. Net investment income is at least the $300,000 gain. The tax applies to the smaller figure, $230,000, and 3.8% of that is $8,740. In an ordinary year the same couple would owe none of it.
That has 2 consequences. The tax looks at the whole year, not the sale alone, so other income, losses and the timing of the closing all matter. And capital losses that offset the gain reduce net investment income too. For the other layers on the same sale, see capital gains tax on a rental property sale.
Before closing or not at all
Three ways a sale stops being an exchange
Touch money. Pay tax.
If the proceeds are paid to you or to someone acting for you, the sale is taxable. The intermediary has to be in place before the closing.
Day 45 passes
You have 45 calendar days from the closing to name, in writing, the property you may buy. Weekends and holidays count.
You come out with cash
Cash you keep, or a loan you pay off and do not replace, is taxed up to the amount of your gain.
General rules, not tax or legal advice.
The real estate professional exception in general terms
Rental income is normally passive, which is why it lands in net investment income. The regulations set out a safe harbor for real estate professionals as defined in Section 469(c)(7): people who spend more than half of their working time, and more than 750 hours a year, in real property businesses in which they materially participate. If such a person also participates in the rental activity for more than 500 hours in the year, or did so in 5 of the 10 preceding years, the rent is treated as business income and gain on property used in that activity is treated as gain from business property.
The practical effect is that the gain can fall outside the 3.8% tax. The test is demanding and is applied year by year, and missing the safe harbor does not rule out other grounds. Most owners with a full-time job outside real estate will not meet it. This is a determination for your CPA, who knows your hours and your return.
What an exchange does to this tax
Owners who find this tax usually find it late, after the price is agreed and the gain is fixed. If you are selling because the property no longer suits you and you intend to buy other investment real estate, there is a step most owners are not told about. In a 1031 exchange the gain is not recognized in the year of the trade, and the regulations under Section 1411 count only recognized gain. Their own example shows an investor who exchanges land under Section 1031 and has no net investment income from the exchange that year.
The same example continues: when the replacement is later sold for cash, the gain is recognized and counted then. Tax is deferred, not forgiven. Cash or other boot taken out of an exchange is recognized gain and can be subject to the 3.8% tax in the year you receive it. See boot in a 1031 exchange for how that arises.
The condition is timing. A qualified intermediary must be part of the transaction before the sale closes, or the gain is recognized and counted that year. If you would rather take the cash, paying the 3.8% along with the rest is a legitimate choice, and an installment sale can spread recognized gain across several tax years. The checklist at the end of this page helps you estimate where your income will land. If an exchange looks worth discussing, request a consultation.
For a first range on the whole sale, the capital gains estimator includes this tax alongside the capital gains and depreciation layers. Treat the result as an estimate. Your CPA has the rest of your return, and the rest of your return is what decides whether the 3.8% applies at all.
Questions people ask
Is the 3.8% Medicare surtax charged on the whole sale price of my rental?
No. The net investment income tax, which some people call the Medicare surtax, is figured on gain, not price. The rate is applied to the lesser of 2 figures: your net investment income, or the excess of your modified adjusted gross income over the threshold for your filing status. If your income stays under the threshold, none of the gain is subject to it.
Do I owe the net investment income tax if I am retired with a modest income?
Possibly, in the year of the sale. The gain on the rental counts toward your modified adjusted gross income, so a retiree who is normally well under $200,000 single or $250,000 joint can cross the threshold once. The tax then applies only to the amount over the threshold or your net investment income, whichever is smaller.
Does a real estate license make me a real estate professional for the 3.8% tax?
No. The test in Section 469(c)(7) is about how you spend your time: more than half of your working hours and more than 750 hours a year in real property businesses in which you materially participate. The safe harbor for the 3.8% tax adds more than 500 hours in the rental activity itself. A license alone does not meet either test.
If I do a tax free exchange do I still pay the 3.8% tax?
Not on gain that is deferred. The regulations under Section 1411 count gain only when it is recognized, and a fully deferred 1031 exchange recognizes none in the year of the trade. Any cash or other boot you receive is recognized and can be subject to the tax. The deferred gain is counted later, when the replacement property is sold in a taxable sale.


Know where you stand before you close
Tell us when the sale closes and what you own. You will hear where you stand and what has to happen first.
- Whether the property qualifies
- Your 2 deadlines on a calendar
- What your closing agent needs
Asking commits you to nothing. It keeps the option open.
