The 3.8% NIIT on capital gains is an extra federal tax that stacks on top of your regular capital gains rate when your modified adjusted gross income crosses a fixed line: $200,000 if you file single or head of household, $250,000 if you’re married filing jointly, and $125,000 if you’re married filing separately.1Internal Revenue Service. Net Investment Income Tax Formally called the Net Investment Income Tax, it applies to the smaller of your net investment income or the amount your MAGI exceeds that threshold. For a high-income seller, it pushes the top long-term capital gains rate from 20% to 23.8%.
When the Tax Actually Kicks In
Two things have to be true in the same year. You need investment income, and your MAGI has to clear the threshold for your filing status. A big salary alone won’t do it. A big portfolio alone won’t do it. Both conditions apply, and the tax only hits the overlap.
The threshold amounts were written into the statute in 2013 and are not indexed for inflation.2Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax They haven’t moved since. That matters because a one-time event — selling a long-held stock position, closing on a rental, taking a large retirement distribution — can push a taxpayer across the line for the first time even if nothing else in their finances has changed.
For almost everyone, MAGI for this tax equals the AGI on your return. The only common adjustment is for taxpayers who claim the foreign earned income exclusion under Section 911: those excluded wages get added back when figuring MAGI for NIIT purposes.3Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Which Capital Gains Count
Both short-term and long-term capital gains are net investment income. So are gains from selling stocks, bonds, mutual fund shares, and investment real estate. Interest, dividends, royalties, annuities, and most rental income are also in the pot.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax
Several categories stay out:
- Wages, self-employment income, and unemployment compensation.1Internal Revenue Service. Net Investment Income Tax
- Distributions from 401(k)s, 403(b)s, traditional and Roth IRAs, pensions, and 457(b) plans.3Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
- Tax-exempt interest from municipal bonds, VA benefits, and Social Security benefits.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax
- Gain on your primary residence that qualifies for the Section 121 exclusion.1Internal Revenue Service. Net Investment Income Tax
Retirement distributions deserve special attention. The withdrawal itself is not net investment income, but it does raise your AGI, which raises your MAGI. A large IRA or 401(k) withdrawal can push you across the threshold and expose your other investment income to the 3.8% tax, even though the distribution dollar is safe.
Your Home Sale Usually Isn’t Taxed Here
When you sell a primary residence, the first $250,000 of gain for a single filer or $500,000 for a joint filing couple is excluded under Section 121, provided you owned and lived in the home for at least two of the five years before the sale.5Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence That same excluded amount is kept out of net investment income.
Anything above the exclusion is fair game. A couple selling a long-held home with $700,000 of gain would have $200,000 exposed to both regular capital gains tax and, if their MAGI crosses the line, the 3.8% NIIT. A surviving spouse selling within two years of a spouse’s death can still use the full $500,000 exclusion if the ownership and use tests were met immediately before the death.5Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Capital Losses Reduce the Bill
Losses reduce net investment income directly, dollar for dollar. If your capital losses outrun your capital gains, up to $3,000 of the excess ($1,500 if married filing separately) can further reduce net investment income, mirroring the regular tax treatment.6Internal Revenue Service. Topic No. 409, Capital Gains and Losses Harvesting losses before year-end lowers both your regular capital gains tax and your NIIT.
How the 3.8% Is Calculated
The tax is 3.8% of the smaller of two numbers: your net investment income, or the amount your MAGI exceeds the threshold.2Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax It can never exceed 3.8% of either figure.
A single filer with $270,000 of MAGI and $50,000 of net investment income is $70,000 over the threshold. The smaller number is the $50,000 of investment income. Tax: $50,000 × 3.8% = $1,900.
Change the proportions. A single filer with $210,000 of MAGI and $50,000 of net investment income is only $10,000 over the threshold. Tax: $10,000 × 3.8% = $380. The NIIT only reaches the portion of income sitting above the threshold line, no matter how much investment income you have.
You report the calculation on Form 8960, filed with your Form 1040 whenever your MAGI exceeds the threshold.7Internal Revenue Service. Instructions for Form 8960
What Your Combined Rate Becomes
Long-Term Gains
Long-term capital gains on assets held more than a year are taxed at 0%, 15%, or 20% depending on your taxable income. For 2026, the 20% rate starts at taxable income above $545,500 for single filers and $613,700 for joint filers. Add the 3.8% NIIT and the top combined federal rate reaches 23.8%.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax A taxpayer in the 15% capital gains bracket whose MAGI crosses the NIIT threshold pays an effective 18.8%.
Short-Term Gains
Short-term gains on assets held a year or less are taxed as ordinary income, up to 37%. With the 3.8% NIIT, the top combined federal rate on short-term gains is 40.8%. Active traders feel this most.
Collectibles
Gains on art, coins, antiques, and precious metals cap at a 28% long-term rate. They are still net investment income, so the NIIT stacks: up to 31.8% combined.
Timing Moves That Reduce Exposure
Because the tax turns on a single-year MAGI figure, when you recognize a gain often matters as much as whether you recognize it.
Installment sales. If you sell property and take payments across multiple years, gain is recognized as each installment arrives. That can keep your MAGI below the NIIT threshold in any given year and lower or eliminate the tax that a lump sum would have triggered.
Like-kind exchanges. A Section 1031 exchange of investment or business real estate defers the gain, so nothing enters net investment income at the time of the swap. The NIIT comes due later when you sell the replacement property. Any cash or non-like-kind property (boot) you take in the exchange is recognized immediately and lands in that year’s NII.
Qualified small business stock. Section 1202 allows exclusion of up to 100% of gain on qualifying stock held at least five years, within statutory caps. Because Section 1411 only reaches gain “to the extent taken into account in computing taxable income,” the excluded portion stays out of net investment income too.2Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax Anything above the cap is subject to both regular capital gains tax and the NIIT.
Pay It Through Estimated Taxes
Nobody withholds the NIIT for you. Employers don’t take it from paychecks, and brokers don’t take it from sale proceeds. If you expect to owe it, you need to fold it into your quarterly estimated tax payments or boost your W-2 withholding to cover it.3Internal Revenue Service. Questions and Answers on the Net Investment Income Tax Miss that step and the IRS can add an underpayment penalty on top of the tax.1Internal Revenue Service. Net Investment Income Tax
The usual safe harbors apply. You generally avoid a penalty by paying at least 90% of the current year’s total tax or 100% of last year’s tax (110% if your AGI exceeded $150,000).8Internal Revenue Service. Underpayment of Estimated Tax by Individuals Penalty If a one-time sale is the reason you’ll owe the NIIT for the first time, last year’s tax may already cover you under the prior-year safe harbor. The following year, your new baseline includes the NIIT.
Rental Income and the Real Estate Professional Exception
Rental income is generally passive, which puts it in net investment income along with any gain on sale of the rental. Taxpayers who qualify as real estate professionals under Section 469(c)(7) can keep rental income and sale gains out of NII, but qualifying as a real estate professional is only step one. You also have to meet a safe harbor: participating in each rental activity more than 500 hours during the tax year, or having done so in at least five of the ten preceding tax years.7Internal Revenue Service. Instructions for Form 8960 If you’ve grouped all your rental activities under Regulation 1.469-9(g), the 500-hour test applies to the combined activity rather than each property.
Trusts and Estates Have a Much Lower Threshold
If a trust or estate is selling the asset, the thresholds are not $200,000 or $250,000. The NIIT applies to undistributed net investment income once AGI exceeds the dollar level at which the highest trust income tax bracket begins — $15,650 for 2025 and projected around $16,250 for 2026.2Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax Virtually any trust with meaningful investment activity clears that line. Income the trust distributes to beneficiaries during the year shifts to their returns and is tested against their individual thresholds, which is often the simplest way to keep the tax off the trust itself.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax