Net Investment Income Tax (NIIT): A 3.8% Surtax Guide for High Earners and Investors
You sold a long-held stock position, finally bought that rental duplex, or watched your dividend portfolio have its best year ever. Then your accountant mentions an extra 3.8% tax on top of your capital gains rate—and you wonder where it came from.
That tax is the Net Investment Income Tax (NIIT), often called the Medicare surtax. It has been in effect since 2013, but because its income thresholds were never indexed to inflation, it now reaches a steadily growing share of upper-middle-class households—not just the ultra-wealthy it was originally pitched at. If your modified adjusted gross income crosses $200,000 single or $250,000 married filing jointly, you need to understand it.
This guide breaks down who actually pays NIIT, how it's calculated, the income types that count (and the surprising ones that don't), and the planning levers you can pull to minimize it.
What the NIIT Is and Why It Exists
The Net Investment Income Tax is a 3.8% surtax on certain investment income. It was enacted as part of the Health Care and Education Reconciliation Act of 2010, took effect January 1, 2013, and was designed to help fund Medicare expansion under the Affordable Care Act.
Two important things about this tax:
- It stacks on top of other taxes. A long-term capital gain at the 20% federal rate plus NIIT becomes 23.8%. A short-term gain at 37% becomes 40.8%. Add state income tax and the marginal rate on that final dollar of investment income can exceed 50% in high-tax states.
- The thresholds are not indexed to inflation. The $200,000 single / $250,000 joint cutoffs have been frozen since 2013. As wages and asset values have climbed, more taxpayers cross these fixed lines every year. What was originally a tax on the top 1% now reaches well into the upper-middle class.
Who Actually Pays the NIIT
NIIT applies to individuals, estates, and trusts whose income exceeds specific thresholds.
Individual Thresholds (Modified Adjusted Gross Income)
- Married filing jointly: $250,000
- Qualifying widow(er) with a dependent child: $250,000
- Single or head of household: $200,000
- Married filing separately: $125,000
These are MAGI thresholds, not net investment income thresholds. Crossing the threshold doesn't automatically mean you owe NIIT—it just means you're in the zone where investment income becomes taxable.
Trust and Estate Thresholds
This is where things get punishing. Trusts and estates are subject to NIIT when their adjusted gross income exceeds roughly $16,000 (for 2026)—the top trust tax bracket threshold. Because trusts compress to top brackets so quickly, many small estates and irrevocable trusts hit NIIT on relatively modest investment earnings.
How the Calculation Works
The 3.8% applies to the lesser of:
- Your net investment income, or
- The amount by which your MAGI exceeds the threshold
A quick example: A married couple with $300,000 MAGI and $40,000 of net investment income.
- MAGI excess over threshold: $300,000 − $250,000 = $50,000
- Net investment income: $40,000
- NIIT applies to the lesser: $40,000 × 3.8% = $1,520
If the same couple had $80,000 of investment income, the NIIT would only apply to $50,000 (the MAGI excess), capping the surtax at $1,900.
What Counts as Net Investment Income
This is where most surprises happen. The IRS includes a broader range of income than many investors expect.
Income Types Subject to NIIT
- Interest (taxable bond interest, CDs, savings accounts, peer-to-peer lending)
- Dividends (both qualified and ordinary)
- Capital gains (short-term and long-term, including mutual fund distributions)
- Rental income (when treated as passive—the default for most landlords)
- Royalty income
- Non-qualified annuity distributions
- Income from passive trade or business activities
- Income from trading in financial instruments or commodities (for non-traders)
Income Types Excluded From NIIT
- Wages and W-2 employment compensation
- Self-employment income (active trade or business)
- Distributions from traditional IRAs, 401(k)s, 403(b)s, and other qualified plans
- Roth IRA and Roth 401(k) qualified distributions
- Social Security benefits
- Unemployment compensation
- Alimony
- Tax-exempt municipal bond interest
- Veterans' benefits
- Gain on sale of a principal residence excluded under Section 121 (the $250K/$500K homestead exclusion)
- Active S-corp pass-through income from a business in which you materially participate
The exclusions for retirement account distributions and active business income are massive planning opportunities, which we'll come back to.
Modified Adjusted Gross Income: Why It Trips People Up
For most taxpayers, MAGI for NIIT purposes equals AGI from the bottom of Form 1040. But there's a notable add-back: foreign earned income excluded under Section 911 (the FEIE for expats) gets added back to AGI when computing NIIT MAGI. Many digital nomads who think the FEIE makes them tax-free are surprised to find they still owe NIIT once their investment income pushes excluded earnings plus AGI over the threshold.
If you're an expat managing this complexity, accurate income tracking by category becomes critical—you need to know exactly what's earned vs. investment income, and what's excluded vs. taxable.
Reporting: Form 8960
NIIT is reported on Form 8960, Net Investment Income Tax, which is filed with your Form 1040. The form walks through:
- Part I: Investment income by category (interest, dividends, gains, rentals, etc.)
- Part II: Allowed deductions allocable to investment income (investment interest expense, state income tax allocable to investment income, miscellaneous deductions)
- Part III: The actual tax calculation comparing net investment income to the MAGI excess
Most quality tax software fills out Form 8960 automatically once your other returns are complete, but the inputs matter. If you misclassify rental income as non-passive when you don't qualify as a real estate professional, or if you fail to include K-1 passive income, your NIIT will be wrong.
The Real Estate Trap
Rental real estate is the single biggest source of NIIT confusion. The default rule: rental income is passive, and passive rental income is subject to NIIT.
Many landlords assume "active participation"—the standard that lets them deduct up to $25,000 of rental losses against ordinary income—also makes their rental income non-passive for NIIT. It does not. Active participation and material participation as a real estate professional are separate, more demanding standards.
To exclude rental income from NIIT, you typically need to qualify as a real estate professional under Section 469(c)(7):
- More than 750 hours per year in real estate trades or businesses, AND
- More than half of your total personal services performed in any trade or business must be in real estate
Even then, you must materially participate in each rental activity (or make a grouping election to aggregate them). For W-2 employees with day jobs, real estate professional status is essentially impossible to claim legitimately.
A few related pitfalls:
- Self-rental rules: If you rent property to your own active business, the income may be non-passive but is still subject to NIIT unless properly structured.
- Short-term rentals: Average guest stays of seven days or less may not be considered "rental" activities under Section 469, opening different (sometimes better) NIIT treatment.
- Sale gains: Even if your ongoing rental income escapes NIIT through real estate professional status, gains on sale may still be subject to NIIT depending on how the property was used.
Planning Strategies to Reduce NIIT
You can attack NIIT from two directions: lower your MAGI, or lower your net investment income. The best plans usually do both.
Lower Your MAGI
Maximize pre-tax retirement contributions. 401(k), 403(b), traditional IRA, and SEP-IRA contributions reduce AGI, which reduces MAGI. A married couple maxing two 401(k)s at $23,500 each in 2026 cuts $47,000 off MAGI—potentially eliminating NIIT exposure entirely if they're near the threshold.
Health Savings Account contributions. HSA contributions are above-the-line deductions that reduce MAGI. Family HDHP coverage allows over $8,000 of HSA contributions in 2026.
Charitable contributions of appreciated securities. Donating appreciated stock directly to charity (or to a donor-advised fund) avoids the capital gain entirely—it never hits your NII or your MAGI. You also get the deduction for fair market value.
Charitable remainder trusts (CRTs). CRTs are explicitly exempt from NIIT. A high-net-worth investor with a heavily appreciated concentrated position can transfer it to a CRT, sell it inside the trust without immediate tax, and receive an income stream over time.
Lower Your Net Investment Income
Tax-loss harvesting. Realized losses offset realized gains directly. Watch out for the wash sale rule—buying a substantially identical security within 30 days disallows the loss.
Municipal bonds. Tax-exempt interest doesn't count as investment income for NIIT purposes. For high-bracket investors, taxable equivalent yields on munis often beat taxable bonds even before considering NIIT.
Asset location. Hold high-income, tax-inefficient assets (REITs, taxable bonds, actively traded funds) inside tax-deferred accounts. Hold tax-efficient assets (broad market index funds, tax-managed funds) in taxable accounts.
Roth conversions in low-income years. A Roth conversion adds to current-year AGI (potentially bumping MAGI over the NIIT threshold for that year), but future Roth distributions don't count toward MAGI at all. In retirement, Roth withdrawals can keep MAGI below the NIIT threshold while traditional IRA RMDs would have pushed you over.
Section 1031 exchanges. Defer real estate gains—and the associated NIIT—by exchanging into like-kind property instead of selling.
Installment sales. Spread a large gain over several tax years. If structured correctly, this can keep MAGI below the NIIT threshold in any single year.
Material participation in pass-through businesses. S-corp or partnership income from a business in which you materially participate is excluded from NIIT. Documenting your involvement (hours logs, decision-making records) protects this exclusion if challenged.
Trust-Specific Strategies
Because trusts hit the NIIT threshold at roughly $16,000 of income, distribution planning is crucial. Distributing investment income to beneficiaries shifts the income to the beneficiary's tax return, where their (typically much higher) individual threshold may avoid NIIT entirely. Trustees should review distribution decisions annually with NIIT in mind.
Common NIIT Mistakes
After reviewing returns and tax forums, these are the errors that show up most:
- Forgetting to add back excluded foreign earned income when computing MAGI for expats.
- Treating rental income as non-passive without qualifying as a real estate professional.
- Including IRA or 401(k) distributions in NII—they're excluded.
- Missing K-1 income classifications—box 11 codes can hide both passive and portfolio income that flows to Form 8960.
- Failing to allocate state income tax properly to investment income on Part II of Form 8960.
- Ignoring NIIT on the sale of a business—gain on sale of an interest in a passive activity is subject to NIIT, even if your operating income wasn't.
- Missing the $25,000 rental loss allowance interaction—suspended passive losses released at disposition reduce NII at that time.
Keep Your Investment Records Organized
NIIT planning lives or dies on classification accuracy. You need to know which income is interest vs. qualified dividends vs. short-term gain vs. long-term gain vs. passive rental, all year long—not just at tax time when 1099s arrive.
Beancount.io provides plain-text accounting that gives you complete transparency over every transaction, account, and income classification. With version-controlled records and full visibility into how each dollar is categorized, planning around thresholds like the NIIT becomes a calculation you can run any month—not a surprise in April. Get started for free and see why developers, investors, and finance professionals choose plain-text accounting.
