Skip to main content
Capital Gains: Short vs Long-Term

The Net Investment Income Tax (NIIT): The Hidden 3.8% Tax on Capital Gains

Pomegra Learn

The Net Investment Income Tax: How a Hidden 3.8% Tax Applies to Your Capital Gains

Beyond the ordinary capital gains tax rates, high-income investors face an additional levy: the Net Investment Income Tax (NIIT), a 3.8% tax on certain investment income. Enacted as part of the Affordable Care Act in 2010 and effective starting in 2013, the NIIT applies to capital gains, dividends, interest, rental income, and other "net investment income" for taxpayers whose modified adjusted gross income (MAGI) exceeds specific thresholds. The tax is easy to overlook but can add thousands to the annual tax bill of affluent investors. Understanding who pays, how much, and how to mitigate it is essential for high-net-worth planning.

Quick definition: The Net Investment Income Tax is a 3.8% additional tax on net investment income (capital gains, dividends, interest, etc.) for taxpayers with MAGI exceeding $200,000 (single) or $250,000 (married filing jointly).

Key takeaways

  • NIIT is a 3.8% tax on net investment income for high-income taxpayers; it is separate from and in addition to regular capital gains tax
  • NIIT applies only if modified adjusted gross income (MAGI) exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately)
  • "Net investment income" includes capital gains, dividends, interest, annuity income, royalties, rental income from passive activities, and S-corp net income
  • "Salary, active business income, and W-2 wages are NOT subject to NIIT; only passive or investment income triggers it
  • The tax is the lesser of (1) net investment income, or (2) the excess of MAGI over the threshold
  • NIIT is paid via Form 8960 (Net Investment Income Tax) filed with your 1040
  • For a high-earner with $500,000 MAGI and $100,000 of capital gains, NIIT is $3,800 (3.8% × $100,000)—a significant additional cost
  • Strategies exist to reduce NIIT: strategic charitable contributions, timing of asset sales, income deferral, and entity selection for business income

Who Pays the NIIT

The tax applies to individuals with:

  • Modified Adjusted Gross Income (MAGI) exceeding $200,000 (unmarried, including head of household)
  • MAGI exceeding $250,000 (married filing jointly)
  • MAGI exceeding $125,000 (married filing separately)

These thresholds have been in place since 2013 and have not been adjusted for inflation. As a result, more taxpayers fall into NIIT territory each year as nominal incomes rise.

Why "Modified" AGI?

For NIIT purposes, MAGI is calculated differently than standard AGI. The IRS generally takes your AGI and adds back certain deductions that were subtracted to reach AGI:

  • Foreign earned income exclusion
  • Exclusion of Puerto Rico source income
  • Exclusion of income from U.S. possessions
  • Net operating loss deduction (in certain cases)

For most U.S. investors without these special situations, MAGI ≈ AGI.

Example: Who Pays?

Taxpayer A: Single, $120,000 salary, $40,000 capital gain = $160,000 MAGI. Below $200,000 threshold. No NIIT.

Taxpayer B: Single, $180,000 salary, $40,000 capital gain = $220,000 MAGI. Exceeds $200,000 threshold. NIIT applies to the extent of excess MAGI or net investment income, whichever is less.

  • Excess MAGI: $220,000 - $200,000 = $20,000
  • Net investment income: $40,000
  • NIIT base: Lesser of $20,000 or $40,000 = $20,000
  • NIIT: 3.8% × $20,000 = $760

Taxpayer C: Single, $250,000 salary, $100,000 capital gain = $350,000 MAGI.

  • Excess MAGI: $350,000 - $200,000 = $150,000
  • Net investment income: $100,000
  • NIIT base: Lesser of $150,000 or $100,000 = $100,000
  • NIIT: 3.8% × $100,000 = $3,800

What Counts as "Net Investment Income"

NIIT applies to:

  • Capital gains from sales of stocks, bonds, real estate (with exceptions noted below)
  • Qualified dividends (taxed at capital gains rates)
  • Ordinary dividends (taxed as ordinary income)
  • Interest income from savings accounts, bonds, CDs
  • Annuity income (to the extent of gain)
  • Royalties from intellectual property, oil/gas, music
  • Rental income from real estate (if passive; active traders may escape NIIT)
  • Passive activity income from S-corps, partnerships, rental real estate
  • Investment gains from sales of commodities, options, and futures

Excluded from net investment income:

  • W-2 wages from employment
  • Self-employment income (from an active trade or business)
  • Active business income (if you materially participate)
  • Social Security benefits
  • Tax-exempt interest (municipal bonds)
  • Gain on sale of a primary residence (to extent of $250k single / $500k married exclusion)

The distinction between active and passive is critical. A real estate developer who actively manages properties and materially participates in a business pays no NIIT on that business income. But a passive investor receiving rental income from a property manager pays NIIT on those rents.

Calculating the Tax: Form 8960

NIIT is calculated and paid via Form 8960, Net Investment Income Tax, filed with your 1040. The form walks through:

  1. Your net investment income (sum of capital gains, dividends, interest, rentals, etc.)
  2. Applicable deductions (investment expenses, capital losses, etc.)
  3. Your net investment income after deductions
  4. Your MAGI
  5. The NIIT threshold for your filing status
  6. The lesser of (net investment income) or (excess MAGI over threshold)
  7. Multiply by 3.8% to get tax due

Simple Form 8960 Example

Filer: Single, $220,000 MAGI

  • Capital gains: $40,000
  • Qualified dividends: $12,000
  • Interest: $3,000
  • Rental income (passive): $8,000
  • Total net investment income: $63,000

Calculation:

  • Threshold: $200,000
  • Excess MAGI: $220,000 - $200,000 = $20,000
  • NIIT base: Lesser of $63,000 or $20,000 = $20,000
  • NIIT: 3.8% × $20,000 = $760

Real-World Impact: High-Earners and Retirees

High-Income Employee with Investments

A software engineer earning $250,000 in W-2 wages realizes $80,000 of capital gains and receives $20,000 in dividends:

  • Total MAGI: $350,000
  • Threshold (single): $200,000
  • Excess: $150,000
  • Net investment income: $100,000
  • NIIT base: Lesser of $150,000 or $100,000 = $100,000
  • NIIT owed: 3.8% × $100,000 = $3,800

Combined with federal capital gains tax (20% long-term rate): $80,000 × 20% = $16,000 Combined with federal tax on dividends (20%): $20,000 × 20% = $4,000 Total federal investment tax: $3,800 + $16,000 + $4,000 = $23,800 on $100,000 of investment income

Effective federal rate: 23.8% (20% + 3.8%)

Retiree with Substantial Portfolio

A retired investor, age 72, receives $150,000 in capital gains, $30,000 in dividends, and $60,000 in Social Security benefits. Their required minimum distribution from an IRA is $50,000.

  • W-2 wages: $0
  • Capital gains: $150,000
  • Dividends: $30,000
  • RMD (taxable): $50,000
  • Social Security (taxable portion): $27,000
  • MAGI: $150,000 + $30,000 + $50,000 + $27,000 = $257,000
  • Threshold (married filing jointly): $250,000
  • Excess MAGI: $7,000
  • Net investment income: $180,000 (capital gains + dividends + RMD if counted)

NIIT base: Lesser of $180,000 or $7,000 = $7,000 NIIT: 3.8% × $7,000 = $266

In this case, the retiree nearly avoids NIIT by virtue of the small excess above threshold. But the RMD pushed them into NIIT territory—a common issue in retirement planning.

Strategies to Reduce or Avoid NIIT

1. Charitable Contributions

Donating appreciated securities directly to a charity is one of the most effective strategies:

  • You avoid capital gains tax entirely on the donation
  • The donation reduces your MAGI, potentially bringing you below the NIIT threshold
  • You receive a charitable income tax deduction

Example:

  • MAGI (before donation): $220,000 (exceeds $200,000 threshold)
  • Appreciated stock to donate: $30,000 basis, $50,000 current value
  • Donate stock directly to charity: No capital gains tax on the gain
  • MAGI after donation: $220,000 - $50,000 = $170,000 (below $200,000 threshold)
  • NIIT reduction: Full elimination

2. Timing Asset Sales

Spreading large gains across multiple years reduces MAGI and can keep you below or closer to the NIIT threshold:

Year 1: Sell $100,000 of gains → MAGI $250,000

  • NIIT applies to $100,000

Years 1–2, split: Sell $50,000 in each year → MAGI $200,000 each year

  • Year 1: NIIT applies to $0 (at threshold)
  • Year 2: NIIT applies to $0 (at threshold)
  • Total NIIT savings: Potentially significant if you can stay below the threshold

3. Deferring Income

If you're an employee, negotiate deferred compensation or bonuses in future years to reduce current MAGI. If you're self-employed, time invoicing to defer income recognition.

This is rarely sufficient alone (if you're generating large investment income, MAGI is likely high regardless), but combined with other strategies, it helps.

4. Tax-Advantaged Account Strategies

Maximize contributions to 401(k)s, IRAs, and HSAs to reduce AGI:

  • Traditional 401(k) contributions reduce AGI dollar-for-dollar
  • Every $10,000 of 401(k) contribution keeps $10,000 of MAGI below the threshold

Example:

  • Without strategy: Salary $250,000, investment gains $100,000 = MAGI $350,000
  • With max 401(k): Salary $250,000 - $23,500 (401k) = $226,500 + $100,000 investment income = $326,500 MAGI
  • Reduction in NIIT base: $150,000 → $76,500 (lesser of investment income or excess MAGI)
  • NIIT savings: 3.8% × ($150,000 - $76,500) = $2,793

5. Business Entity Selection

If you own a business, the legal entity you choose determines whether income is subject to NIIT:

  • Sole proprietor or active partnership: Business income is active; not subject to NIIT
  • Passive S-corp or partnership: Income may be subject to NIIT if you don't materially participate
  • C-corp: Corporate income is not passed through; you only pay NIIT on dividends received (not reinvested earnings)

Consult a CPA or tax attorney to optimize entity selection.

6. Qualified Small Business Stock (QSBS) Exclusion

If you own stock in a qualified small business (generally, <$50M in assets, active business), gain on sale may be excluded from income (to extent of 10x basis or $10M gain, per taxpayer, under current law). This excluded gain is not subject to NIIT.

Example: You sell QSBS with $100,000 gain. If excluded, you report $0 gain, $0 NIIT.

Visualizing the NIIT Trigger and Calculation

Real-World Case: The Concentrated Stock Position

Scenario: An executive at a tech company has $500,000 of concentrated stock. Her salary is $200,000. She decides to diversify by selling $100,000 of the stock, realizing a $80,000 gain.

Without planning:

  • Salary: $200,000
  • Capital gain: $80,000
  • MAGI: $280,000
  • Threshold (single): $200,000
  • Excess: $80,000
  • NIIT: 3.8% × $80,000 = $3,040
  • Capital gains tax (20%): $16,000
  • Total federal investment tax: $19,040

With planning (sell over two years):

  • Year 1: Salary $200,000 + $40,000 gain = MAGI $240,000

    • NIIT: 3.8% × $40,000 = $1,520
    • Cap gains tax: $8,000
    • Total: $9,520
  • Year 2: Salary $200,000 + $40,000 gain = MAGI $240,000

    • NIIT: 3.8% × $40,000 = $1,520
    • Cap gains tax: $8,000
    • Total: $9,520
  • Combined (two years): $19,040

No savings in this case (she's above threshold both years). But if she earned $180,000 (not $200,000):

Year 1: Salary $180,000 + $40,000 = MAGI $220,000 → Excess = $20,000, NIIT = 3.8% × $20,000 = $760 Year 2: Salary $180,000 + $40,000 = MAGI $220,000 → Excess = $20,000, NIIT = $760 Total: $1,520 (saves $1,520 vs. year-one-only realization)

Common Mistakes

Forgetting to file Form 8960. An investor has investment income above the threshold but doesn't know about NIIT. They file a 1040 without 8960, underpaying tax. The IRS eventually discovers the omission during audit.

Double-counting investment income for NIIT. An investor receives a 1099-R from a mutual fund reinvestment and incorrectly reports both the reinvestment and the gain as NIIT income. This inflates the NIIT base.

Assuming all retirement income is excluded from MAGI. Required minimum distributions (RMDs) from traditional IRAs are included in MAGI and can push you over the NIIT threshold, even though the RMD is not itself investment income.

Not considering NIIT when planning large asset sales. A retiree decides to sell $200,000 of appreciated real estate in a single year without modeling NIIT impact. The NIIT is $7,600 (3.8% × $200,000), not budgeted or planned for.

Believing NIIT applies only to capital gains. NIIT also applies to dividends, interest, rental income, and other passive income. An investor with modest capital gains but substantial dividend income may owe NIIT.

Overlapping charitable contribution deductions with NIIT reduction. An investor donates appreciated stock to reduce MAGI and also deducts the donation as a charitable contribution. Both benefits are legitimate, but double-counting the reduction in AGI is an error.

FAQ

Is NIIT a permanent tax? As of the mid-2020s, yes. NIIT was enacted in 2010, took effect in 2013, and has been in place continuously. Congress can change or repeal it, but no legislation to do so has passed. Verify current status with the IRS.

Do I have to pay NIIT if I have a net operating loss? NOLs reduce your taxable income but may not reduce MAGI for NIIT purposes (depending on how the loss is calculated). Consult a tax professional if you have both NOL and high investment income.

Can I use capital loss carryforwards to reduce my NIIT? Yes. Capital loss carryforwards reduce net investment income, which reduces your NIIT base. If you have a $50,000 carryforward loss and $80,000 of capital gains, net investment income is $30,000, reducing your NIIT accordingly.

If I'm in the 20% long-term capital gains bracket and have NIIT, is my effective rate 23.8%? Not exactly. NIIT is a separate tax calculated on Form 8960. Your capital gains are taxed at 20% on your return, and NIIT (3.8%) is added as a separate line. The combined effective rate approaches 23.8%, but the mechanics are distinct.

Does state tax apply to NIIT? No. NIIT is a federal tax only. However, some states (California, New York, etc.) impose additional taxes on investment income or high earners. State and federal NIIT can stack.

If I'm subject to the alternative minimum tax, does NIIT still apply? Yes. NIIT is calculated separately from AMT. Both can apply in the same year, creating substantial tax liability.

Summary

The Net Investment Income Tax is a 3.8% additional tax on net investment income for high-income individuals—those with MAGI exceeding $200,000 (single) or $250,000 (married filing jointly). The tax applies to capital gains, dividends, interest, rental income, and other passive investment income, and is separate from and in addition to regular capital gains taxes. For high-earners, effective rates on capital gains can reach 23.8% or higher when federal NIIT and regular capital gains tax combine. Strategies to reduce NIIT include charitable contributions of appreciated assets, timing large sales across multiple years, maximizing tax-advantaged account contributions, and strategic business entity selection. Form 8960 calculates and reports the tax. The thresholds have not been adjusted since 2013, so more taxpayers will be subject to NIIT as nominal incomes rise. Rules and thresholds may change, so confirm current information with the IRS or a qualified tax professional.

Next

Capital Gains on Mutual Funds