CiteTax

Federal Tax · Guide

How the Net Investment Income Tax Silently Adds 3.8% to Capital Gains Above $200,000

Most investors know their long-term capital gains rate but miss the additional 3.8% Net Investment Income Tax that applies above $200,000 MAGI for single filers and $250,000 for married couples. Understanding both layers prevents a significant tax surprise at filing.

Informational only, not professional tax advice. Last reviewed: July 2026.

The federal long-term capital gains rate tops out at 20% in 2026. But above certain Modified Adjusted Gross Income (MAGI) thresholds, a separate 3.8% Net Investment Income Tax (NIIT) stacks on top of that — bringing the combined federal rate on long-term gains to 23.8%. It runs parallel to the regular income tax system, and it doesn't appear anywhere on your standard tax bracket table.

What the NIIT is and where it comes from

The NIIT was enacted as part of the Affordable Care Act and has applied since 2013. It is imposed under IRC § 1411 at a flat 3.8% rate on the lesser of:

  • Your net investment income, or
  • The amount by which your MAGI exceeds the applicable threshold for your filing status

The thresholds for 2026 are $200,000 for single filers, $250,000 for married filing jointly, and $125,000 for married filing separately. Unlike the standard income tax brackets, these thresholds are not adjusted for inflation — they have remained unchanged since the tax was introduced.

Net investment income includes capital gains (short-term and long-term), dividends, interest, rental income from passive activities, and income from passive business activities. Wages, self-employment income, and distributions from qualified retirement accounts like a 401(k) or traditional IRA do not count as net investment income.

How the NIIT stacks on top of the capital gains rate

The 2026 long-term capital gains rates are 0%, 15%, or 20%, depending on taxable income — not MAGI. The NIIT threshold is based on MAGI, which is a different figure. This creates a situation where the two taxes are computed on overlapping but distinct bases, and you can owe both simultaneously.

For a single filer with MAGI above $200,000 who realizes long-term capital gains, the effective federal rate on those gains is:

  • 15% + 3.8% = 18.8% if the gains fall in the 15% long-term capital gains bracket
  • 20% + 3.8% = 23.8% if the gains push taxable income above the 20% threshold ($518,900 for single filers in 2026, per IRS Rev. Proc. 2025-28)

The NIIT is calculated on Form 8960 and flows to Schedule 2, Line 12 of Form 1040. It is not a withholding tax — nothing is automatically withheld from brokerage proceeds — so it often arrives as a balance due at filing unless you adjust estimated tax payments.

Worked example: single filer selling appreciated stock

Assume a single filer in 2026 with the following:

  • Wages: $180,000
  • Long-term capital gains from a stock sale: $60,000
  • Standard deduction: $15,000 (2026 figure per IRS Rev. Proc. 2025-28)
  • MAGI: $240,000 (wages + gains, before deductions — MAGI adds back certain deductions that don't apply here)
  • Taxable income: $225,000 (MAGI minus standard deduction)

Step 1 — Long-term capital gains tax: The $60,000 in gains falls in the 15% bracket (the 20% threshold for single filers is $518,900 in 2026). Tax on gains: $60,000 × 15% = $9,000.

Step 2 — NIIT calculation: MAGI of $240,000 exceeds the $200,000 single-filer threshold by $40,000. Net investment income is $60,000. The NIIT applies to the lesser of the two: $40,000. Tax: $40,000 × 3.8% = $1,520.

Step 3 — Combined federal tax on the gains: $9,000 (capital gains tax) + $1,520 (NIIT) = $10,520 total, or an effective rate of 17.5% on the $60,000 gain — not the 15% a bracket table alone would suggest.

If this filer had earned $50,000 more in wages (MAGI of $290,000), the full $60,000 in gains would have exceeded the threshold, and the NIIT would apply to all $60,000: $60,000 × 3.8% = $2,280. Combined federal rate on gains: 18.8%.

You can run your own numbers — including the NIIT calculation — through the Capital Gains Tax Calculator, which computes both layers for your income and filing status.

Why the NIIT catches people off guard

Three mechanics make the NIIT easy to miss:

The threshold isn't indexed to inflation. The $200,000/$250,000 thresholds have not changed since 2013. A filer who was safely below the threshold years ago may now cross it without any change in real purchasing power.

MAGI, not taxable income, triggers the tax. Pre-tax retirement contributions reduce taxable income but generally do not reduce MAGI for NIIT purposes. A filer who maxes a 401(k) to reduce their income tax bracket still counts the full pre-contribution income toward the NIIT threshold.

Nothing is withheld automatically. Brokerage firms report proceeds and cost basis on Form 1099-B but do not withhold for the NIIT. If your wages are fully covered by W-2 withholding, the NIIT arrives as an unexpected balance due — and if it's large enough, it can trigger an underpayment penalty.

For context on how marginal rates and effective rates interact across your full income picture, the guide on why your effective tax rate isn't your real cost of earning walks through the distinction in detail.

What reduces net investment income

The NIIT applies to net investment income, meaning investment-related deductions reduce the base. Investment interest expense, certain advisory fees allocable to taxable investment accounts, and state income taxes allocable to investment income can reduce net investment income under the Form 8960 instructions. The mechanics are detailed in the Form 8960 instructions.

Capital loss carryforwards also reduce net investment income in the year they are used. A filer with $60,000 in gains and $20,000 in applied carryforward losses has net investment income of $40,000, not $60,000.

Frequently asked questions

Does the NIIT apply to short-term capital gains?

Yes. Short-term capital gains are included in net investment income and are subject to the 3.8% NIIT above the MAGI threshold, just like long-term gains. Short-term gains are also taxed at ordinary income rates, so the combined federal rate on short-term gains above the threshold can reach the top ordinary rate of 37% plus 3.8%.

Do 401(k) or IRA distributions count toward the NIIT threshold?

Distributions from traditional 401(k) and IRA accounts are not net investment income and are not subject to the 3.8% NIIT directly. However, they do increase MAGI, which can push other investment income — such as dividends or capital gains — above the threshold and expose that income to the NIIT.

Is the NIIT the same as the Medicare surtax?

Yes, the NIIT is sometimes called the Medicare surtax or the 3.8% Medicare tax. The revenue goes to the Medicare Hospital Insurance Trust Fund. It is separate from the 0.9% Additional Medicare Tax, which applies to wages and self-employment income above $200,000 (single) or $250,000 (married filing jointly).

Can I avoid the NIIT by contributing more to a pre-tax retirement account?

Pre-tax contributions to a 401(k) or traditional IRA reduce your taxable income but do not reduce MAGI for NIIT purposes in most cases. Contributions to a Health Savings Account (HSA) also do not reduce MAGI. The NIIT threshold calculation starts from MAGI before most deductions that reduce taxable income.

Where is the NIIT reported on my tax return?

The NIIT is calculated on Form 8960 and reported on Schedule 2 (Form 1040), Line 12. The total from Schedule 2 flows to Form 1040, Line 17. If you owe NIIT, it is included in your total tax liability and affects whether you need to make quarterly estimated tax payments.

Sources