The 3.8% NIIT on capital gains is an extra federal tax that stacks on top of your regular capital gains rate once your modified adjusted gross income (MAGI) crosses $200,000 if you file single or $250,000 if you file jointly. Formally called the Net Investment Income Tax, it can push the top federal rate on long-term gains from 20% to 23.8%, and the top rate on short-term gains to 40.8%. Whether you actually owe it — and on how much — depends on two numbers: your MAGI and your net investment income for the year.
Who Owes the Tax
Two things must be true before the NIIT hits you. You need net investment income, and your MAGI must exceed the threshold for your filing status.1Internal Revenue Service. Net Investment Income Tax The thresholds:
- Single or head of household: $200,000
- Married filing jointly or qualifying surviving spouse: $250,000
- Married filing separately: $125,000
These figures are written into the statute and are not indexed for inflation.2Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax They haven’t moved since the tax took effect in 2013, so ordinary income growth pulls more filers over the line each year. A salary bump, a one-time stock sale, or a large mutual fund distribution can put someone above the threshold who has never owed the NIIT before.
Being high-MAGI alone isn’t enough. If everything you earn is wages and you have no investment income, the NIIT doesn’t apply. And someone with sizable investment income but MAGI below the threshold owes nothing.
For almost everyone, MAGI here equals the AGI on your return. The only add-back is for the foreign earned income exclusion under Section 911. If you don’t claim that exclusion, your MAGI and AGI are the same number.3Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
What Counts as Investment Income
Net investment income covers the passive streams you’d expect: interest, dividends, annuities, royalties, rents, and net gains from selling property such as stocks, bonds, and real estate.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax Both short-term and long-term capital gains fall inside it.
Several categories don’t count:
- 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.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax
- The portion of a home sale gain that qualifies for the Section 121 exclusion.1Internal Revenue Service. Net Investment Income Tax
Retirement distributions deserve a closer look. The distribution itself is not net investment income, but it does raise your AGI, and therefore your MAGI. A large 401(k) withdrawal can push you across the threshold and expose your other capital gains to the NIIT even though the withdrawal itself is exempt.
Your gross investment income is reduced by expenses tied to earning it — investment interest expense, advisory and brokerage fees, rental and royalty expenses, tax prep fees allocable to investment income, and the portion of state and local income taxes attributable to that income.3Internal Revenue Service. Questions and Answers on the Net Investment Income Tax What remains is your net investment income.
How the 3.8% Is Calculated
The tax is 3.8% of the smaller of two numbers: your net investment income, or the amount by which your MAGI exceeds the threshold.2Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax The tax can never exceed 3.8% of either figure.
A quick example. A single filer has $270,000 in MAGI, $50,000 of which is net investment income. The MAGI excess over $200,000 is $70,000. Net investment income is $50,000. The smaller figure is $50,000, so the tax is $50,000 × 3.8% = $1,900.
Flip it. A single filer has $210,000 in MAGI and $50,000 in net investment income. The MAGI excess is only $10,000. The tax applies to $10,000 × 3.8% = $380, even though the taxpayer has $50,000 of investment income. Only the income sitting above the threshold line gets taxed.
You report the calculation on IRS Form 8960, filed with your Form 1040. Form 8960 is required whenever your MAGI exceeds the applicable threshold.5Internal Revenue Service. Instructions for Form 8960
Combined Rates by Type of Capital Gain
Long-Term Gains
Long-term capital gains — assets held more than one year — are taxed at 0%, 15%, or 20% depending on your taxable income. For 2026, the 20% rate applies to taxable income above $545,500 for single filers and $613,700 for joint filers. When the 3.8% NIIT stacks on the 20% rate, the combined federal rate reaches 23.8%.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax Taxpayers still in the 15% bracket can also owe the NIIT if their MAGI crosses the threshold, bringing their effective rate to 18.8%.
Short-Term Gains
Short-term capital gains, from assets held a year or less, are taxed as ordinary income at rates up to 37%. Add the 3.8% NIIT and the top combined federal rate reaches 40.8%. Frequent traders feel this the most.
Collectibles
Gains from selling collectibles — art, coins, antiques, precious metals — are taxed at a maximum long-term rate of 28% instead of the usual 20%. These are still net investment income, so the NIIT applies on top. The combined federal rate on collectible gains can reach 31.8%.
Home Sale Gains
When you sell your primary residence, the first $250,000 of gain ($500,000 for married couples filing jointly) is excluded under Section 121, as long as you owned and lived in the home for at least two of the five years before the sale.6Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence That excluded gain is also excluded from net investment income.1Internal Revenue Service. Net Investment Income Tax
Any gain above the exclusion is included in net investment income and potentially subject to the 3.8%. In appreciated housing markets, long-tenured owners often blow through the exclusion. A married couple with $700,000 of gain would have $200,000 exposed to the NIIT after the $500,000 exclusion.
Losses and Timing
Capital losses reduce net investment income directly. If your losses exceed your gains, you can apply up to $3,000 of the excess ($1,500 if married filing separately) against other income for regular tax purposes, and the same treatment carries over to net investment income.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses Harvesting losses before year-end lowers both your regular capital gains tax and your NIIT.
Timing helps in other ways too. An installment sale spreads gain recognition over multiple years, and in each year only that year’s recognized gain flows into net investment income. Splitting a large sale across tax years can keep your MAGI under the threshold in any single year and shrink or eliminate the tax that a lump-sum sale would trigger.
A Section 1031 like-kind exchange defers the gain on investment or business real estate entirely, so no NIIT is due at the time of the exchange. The tax comes later, when you sell the replacement property and recognize the deferred gain. Any boot (cash or non-like-kind property) received in the exchange is recognized in the year of the exchange and counts as net investment income then.
Qualified small business stock under Section 1202 gets similar treatment. Gain excluded under Section 1202 is also excluded from net investment income, because the statute only reaches gain “to the extent taken into account in computing taxable income.”2Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax Gain above the Section 1202 cap is subject to both regular capital gains tax and the NIIT.
Don’t Forget Estimated Payments
The NIIT is subject to the estimated tax rules, and this is where taxpayers get caught. Employers don’t withhold for the NIIT from your paycheck, and brokerages don’t withhold it from sale proceeds.3Internal Revenue Service. Questions and Answers on the Net Investment Income Tax If you expect to owe it, adjust your withholding or add it into your quarterly estimated payments. Otherwise you can face an underpayment penalty on top of the tax.1Internal Revenue Service. Net Investment Income Tax
You generally avoid the 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 this is your first year owing the NIIT because of a one-off gain, last year’s safe harbor likely covers you. From then on, your baseline includes the NIIT and you should plan for it.
It’s Separate From the Additional Medicare Tax
The NIIT is sometimes confused with the 0.9% Additional Medicare Tax, since both took effect on the same date and both target higher earners. They never touch the same dollar of income. The Additional Medicare Tax applies to wages, compensation, and self-employment earnings above the threshold. The NIIT applies to investment income above the threshold. In a year with both high earned income and high investment income you can owe both, but each hits a different income stream.1Internal Revenue Service. Net Investment Income Tax