Home Blog Net Investment Income Tax (NIIT): The 3.8% Bay Area Surtax
Stock chart on screen showing investment income subject to Net Investment Income Tax
Tax Planning

Net Investment Income Tax (NIIT): The 3.8% Surtax That Catches Every Bay Area Earner

The short answer

Bay Area CPA guide to the 3.8% Net Investment Income Tax: who pays it above $250K MFJ, what counts, and three strategies San Jose earners use to reduce it.

A Bay Area dual-tech-income household earning $480K with $130K of investment income pays roughly $4,940 in NIIT every single year, on top of regular federal and California tax. If you and your spouse pull in $250,000 or more in combined modified AGI and have any investment income at all (dividends, interest, capital gains, rental income, K-1 income from a passive activity), there is a 3.8% federal surtax sitting on top of your regular tax bill that you probably did not budget for. It is called the Net Investment Income Tax, or NIIT, and for San Jose, Palo Alto, and Sunnyvale earners it is one of the most consistently underestimated line items on the return.

The thresholds are not inflation-adjusted, so every year more Silicon Valley households cross them. A senior engineer with a working spouse, a few RSU vests, and a brokerage account hits this tax without doing anything exotic. A founder who sells a chunk of QSBS outside the §1202 exclusion gets it tacked onto the 20% long-term capital gains rate. A landlord with a single rental in Santa Clara owes it on every dollar of net rental income.

This guide covers what NIIT is, what counts as net investment income and what does not, the math for a typical Bay Area dual-income household, and the three strategies that legitimately reduce or eliminate it. We work through this constantly with our tech employee clients at Silicon Valley Tax.

The Setup: What NIIT Is and Where It Came From

NIIT was enacted as Internal Revenue Code §1411 in 2010 to help fund the Affordable Care Act. It first took effect for tax year 2013 and has been on the books ever since. The tax is 3.8% on the lesser of:

  1. Your net investment income for the year, or
  2. The amount by which your modified adjusted gross income (MAGI) exceeds the applicable threshold.

The thresholds, fixed in statute and never indexed for inflation, are:

Filing Status MAGI Threshold
Single $200,000
Married Filing Jointly $250,000
Married Filing Separately $125,000
Head of Household $200,000
Estates and trusts (top bracket start) ~$15,200 (2026)

The lack of indexing is the quiet kicker. In 2013, $250,000 MFJ put a household in roughly the top 3% of US incomes. In 2026, with Bay Area median household income above $160,000 and dual tech-worker households routinely clearing $400,000, the threshold has become a default rather than an exception. NIIT is no longer a tax on the wealthy. It is a tax on anyone with W-2 income above the threshold and a normal brokerage account.

NIIT is reported on Form 8960, attached to your 1040. The full IRS overview lives at the NIIT FAQ page.

What Counts as Net Investment Income

The statutory definition under §1411(c) is broad. The categories that show up on Bay Area returns most often:

  • Interest, including taxable bond interest, money market interest, Treasury interest, and bank account interest. Municipal bond interest is excluded (see below).
  • Dividends, both qualified and ordinary.
  • Capital gains, both short-term and long-term, including gains on stock sales, RSU sales, ESPP sales, mutual fund distributions, and gains on the sale of investment property.
  • Rental income from real estate, when the activity is passive under §469. Most rental income is passive by default. Real estate professional status changes this (covered below).
  • Royalties and annuity distributions from non-qualified annuities.
  • Income from passive trades or businesses, including K-1 income from partnerships, LLCs, or S-corps where you do not materially participate.
  • Net gain from the disposition of property that is not held in an active trade or business.

Net investment income is reduced by allocable expenses: investment interest expense, state income tax allocable to investment income, advisor fees (where deductible), and similar. The TCJA suspended most miscellaneous itemized deductions for regular tax through 2025; the One Big Beautiful Bill Act (OBBBA, Public Law 119-21, signed July 4, 2025) made that suspension permanent. Even so, the NIIT computation on Form 8960 still allows certain expense allocations against investment income on its own line items.

What's Excluded from Net Investment Income

Equally important is what NIIT does not touch. Several categories of income show up on the 1040 and feel like investment income but are statutorily excluded from §1411:

  • Wages and self-employment income. W-2 wages are subject to the separate 0.9% Additional Medicare Tax above the same thresholds (an Affordable Care Act companion levy), but they are not subject to NIIT.
  • Active business income. If you materially participate in the business under §469 (generally 500+ hours per year, or one of the other six material participation tests), your share of K-1 income from that business is excluded.
  • Distributions from IRAs and qualified retirement plans. Traditional IRA, Roth IRA, 401(k), 403(b), pension distributions, and the like do not count as net investment income, even when the underlying funds were generated from investment activity inside the account.
  • Tax-exempt municipal bond interest. Federally tax-exempt muni interest is also exempt from NIIT.
  • Gain on sale of primary residence excluded under §121. The first $250,000 single / $500,000 MFJ of gain on a qualifying primary residence sale is excluded from both regular tax and NIIT. Gain above the §121 cap is subject to NIIT.
  • QSBS gain excluded under §1202. Qualified Small Business Stock gain that is excluded for regular tax under §1202 is also excluded from NIIT. The exclusion stacks on both layers.
  • Section 1031 like-kind exchange deferrals. Real estate exchanged under §1031 defers the gain for both regular tax and NIIT until the replacement property is eventually sold in a taxable transaction.

The Bay Area Math

Picture a typical Sunnyvale household: one senior software engineer at a large tech company, the other a product manager at a Series C startup. Combined W-2 wages of $350,000. The engineer's RSU vests pushed $200,000 into supplemental wages already inside that figure, then the couple sold the vested shares immediately at no incremental gain. The startup spouse has a K-1 from a side LLC reporting $50,000 of passive distribution income. Their joint brokerage account threw off $30,000 of qualified dividends and they realized $50,000 in long-term capital gains rebalancing into bonds.

The NIIT calculation walks like this:

  • MAGI: $350,000 W-2 + $50,000 passive K-1 + $30,000 dividends + $50,000 LTCG = $480,000
  • Net investment income: $50,000 passive K-1 + $30,000 dividends + $50,000 LTCG = $130,000
  • Threshold: $250,000 MFJ
  • MAGI excess: $480,000 - $250,000 = $230,000
  • Lesser of NII vs. excess: $130,000 (NII is smaller)
  • NIIT due: $130,000 × 3.8% = $4,940

That $4,940 sits on top of regular federal tax, California state tax, payroll taxes, and (for the W-2 portion above the threshold) the 0.9% Additional Medicare Tax. On the long-term capital gains specifically, the federal rate is now 23.8% (20% LTCG + 3.8% NIIT), not the 20% that gets quoted in headlines. Add California's 13.3% on top and the effective rate on Bay Area capital gains north of the threshold approaches 37%.

Over a 20-year tech career with rising RSU vests, brokerage growth, and eventually retirement income, NIIT alone can run into six figures.

Strategy 1: Time Gains and Losses Across Years

The NIIT formula is a two-pronged "lesser of" test. You owe NIIT only on the smaller of your investment income or your MAGI excess. That means the tax responds to both levers, and intentional gain/loss timing can drop one or both prongs.

The most common moves:

  • Tax-loss harvesting in high-MAGI years. If you are sitting on unrealized losses in any taxable account, realizing them in a year when you also have a large capital gain offsets the gain dollar for dollar for NIIT purposes. The wash-sale rule still applies; do not buy back the same security within 30 days.
  • Defer gain realization to lower-MAGI years. If you plan to retire, take a sabbatical, or have a known low-income year, hold appreciated positions and sell into that year. Dropping MAGI below the threshold zeroes out NIIT regardless of how much investment income you generate.
  • Spread large gains across multiple years. A founder selling secondary stock or a homeowner selling a long-held investment property can sometimes structure the sale as an installment sale under §453. Each year's recognized gain stacks against that year's threshold independently.
  • Coordinate with capital gain rate brackets. The 0%, 15%, and 20% LTCG brackets and the NIIT threshold do not perfectly line up. A year where you can keep total taxable income under the $250,000 MFJ threshold often means $0 NIIT AND a 15% federal rate on the gain.

Year-round planning matters here. By December, your levers are mostly exhausted. We cover the cycle in our year-end tax moves and year-round planning posts.

Strategy 2: Use Tax-Advantaged Accounts

Interest, dividends, and capital gains generated inside a 401(k), Traditional IRA, Roth IRA, HSA, 529 plan, or Coverdell ESA do not count as net investment income, period. The internal compounding of those accounts is fully insulated from NIIT.

Concrete moves for Bay Area earners:

  • Max the 401(k) and the employer match. The 2026 employee deferral limit is $23,500 ($31,000 with the age-50 catch-up at 50-59 and 64+; $34,750 if age 60-63 under SECURE 2.0's super catch-up). Combined with employer match and after-tax contributions (mega backdoor Roth), total 401(k) inflows can exceed $70,000 a year. See our mega backdoor Roth post for the full mechanics.
  • HSA. If you are on a high-deductible health plan, the HSA is the most tax-advantaged account in the code: deductible going in, tax-free growth, tax-free withdrawals for qualified medical. Internal investment growth is NIIT-free.
  • 529 plans. California does not give a state deduction for 529 contributions, but the federal tax-free growth still shields all dividends and capital gains inside the account from NIIT.
  • Tax-exempt municipal bonds in taxable accounts. California double-tax-exempt munis (federal AND California state tax-exempt) avoid both layers of tax on the interest, and the interest is NIIT-exempt as well.

One important wrinkle: Roth conversions DO add to MAGI in the conversion year, even though the converted amount is technically retirement plan income (which is not itself net investment income). Roth conversion income is included in MAGI for the §1411 threshold test. The conversion does not create NIIT on the converted amount itself, but it CAN push your MAGI past the threshold and cause your existing investment income to become NIIT-taxable. Plan large conversions for low-income years.

Strategy 3: Convert Passive Activities to Active

The most powerful NIIT lever is the §469 material participation test. Income from a trade or business is excluded from net investment income if you materially participate in that business. The rules sit at IRC §469 and the underlying Treasury regulations.

The seven material participation tests, in shorthand: 500+ hours per year, substantially all the participation in the business, more than 100 hours and more than anyone else, significant participation under several activities aggregating to 500 hours, material participation in 5 of the prior 10 years, personal service activity material participation in any 3 prior years, or a facts-and-circumstances regular continuous substantial test. Hit any one and your share of that business income is active, not passive, and therefore not subject to NIIT.

Where this matters most for Bay Area clients:

  • Founder K-1 income. If you are a founder and operator of a partnership or S-corp, your K-1 income is almost always active. Founders sometimes accidentally treat their distributive share as passive and overpay NIIT on it. Document your hours.
  • Real Estate Professional Status (REPS). A taxpayer who spends more than 750 hours and more than half their personal services in real property trades or businesses, AND materially participates in their rental activities, can treat rental income as active. This removes the rental from passive NIIT exposure. The bar is high and the IRS scrutinizes it, but for a non-working spouse managing a portfolio of rentals it is achievable. We discuss it with our real estate clients individually.
  • Side LLC participation. If you have a K-1 from a side investment (a friend's business, a partnership stake) and you actually do meaningful work for it (board service, advisory, hiring help), tracking and documenting your hours can move that K-1 income out of NIIT.
  • Grouping elections under Reg. §1.469-4. Sometimes activities can be grouped to meet material participation collectively. Election is made on the return and is binding going forward; coordinate with a tax advisor before filing.

Worked Example: Bay Area Couple at a Liquidity Event

Consider a Palo Alto couple in their late 40s. Combined W-2 wages of $700,000 (both at FAANG-tier companies, one a director and one a principal engineer). Joint brokerage and ESPP-derived dividends of $100,000 across the year. One spouse sold $300,000 of long-held tech stock to put a down payment on a Los Altos house. No QSBS, no §121 exclusion (this is investment stock, not a primary residence).

The NIIT calculation:

  • MAGI: $700,000 + $100,000 + $300,000 = $1,100,000
  • Net investment income: $100,000 + $300,000 = $400,000
  • Threshold: $250,000 MFJ
  • MAGI excess: $1,100,000 - $250,000 = $850,000
  • Lesser of NII vs. excess: $400,000
  • NIIT due: $400,000 × 3.8% = $15,200

Then layer state tax. California treats the capital gain as ordinary income at top marginal rates, so the $300,000 gain alone draws roughly $39,900 of California tax (13.3% top bracket, mental health surcharge possible above $1M of taxable income). Federal long-term capital gains tax at 20% on the $300,000 gain is $60,000. Plus the $15,200 NIIT. Plus regular federal tax on the dividends and wages.

Total federal + state + NIIT on the $300,000 stock sale alone: roughly $115,000, or 38.4% of the gain. The NIIT line is small relative to the rest, but it is real cash and it is fully avoidable in some structures (charitable remainder trust, installment sale to a non-grantor trust, residency planning before the sale, donor-advised fund contribution of the appreciated stock).

One more wrinkle worth knowing: NIIT and AMT interact. AMT taxable income does NOT include NIIT itself, but high MAGI from large capital gains can push you into AMT exposure under separate calculations. We see this most often with founders mixing ISO exercises and stock sales in the same year. Our AMT post covers that intersection.

Sitting near the $250K MFJ threshold? We model the timing, account-placement, and active-vs-passive levers that reduce NIIT for Bay Area earners. Schedule a complimentary consultation.

What Goes Wrong Without a CPA

The most common NIIT mistake we see at intake: a Bay Area client converts $200K from a Traditional IRA to a Roth in October, not realizing the conversion income lands in MAGI for the §1411 threshold test. The conversion does not create NIIT on the converted amount, but it pushes the household's MAGI past $250K MFJ and turns the year's $40K of dividends and capital gains into NIIT-taxable income. The avoidable cost: $1,520 of NIIT that disappears if the conversion is split across two years.

DIY filing software handles the Form 8960 calculation mechanically. It does not flag the §469 material participation election that could remove K-1 income from the NII bucket, it does not surface the §1.469-4 grouping option, and it does not catch the Roth-conversion MAGI interaction described above. Those are the items where a planning engagement pays for itself many times over.

How NIIT Fits Into the Broader Plan

NIIT is a small tax (3.8%) on a potentially large base (all investment income above a low threshold). For most Bay Area earners it shows up as a quiet $3,000 to $30,000 line item on the return that nobody warned them about. Year over year it compounds. Across a career it is one of the largest avoidable federal taxes a tech earner pays.

The planning is not exotic. The same year-round attention that drives RSU sell-down, ESPP discount realization, charitable giving timing, and Roth conversion sequencing also drives NIIT optimization. The three strategies (timing, sheltering in qualified accounts, and converting passive to active) are the same three that show up in nearly every other tech-employee planning topic.

If you have any K-1 income, rental property, large dividend portfolio, or a planned stock sale at a post-IPO liquidity event or pre-IPO secondary, NIIT belongs on the agenda. We model it for every tax planning engagement at Silicon Valley Tax and identify the levers that actually move the number.

Frequently Asked Questions

Does NIIT apply to crypto?

Yes. Crypto held as an investment is treated as property under existing IRS guidance. Gains on the sale of crypto (Bitcoin, Ethereum, NFTs, anything held for capital appreciation) are capital gains and flow into net investment income for NIIT purposes. Some practitioners have explored §475(f) trader-in-securities arguments for active crypto traders, but the IRS has not confirmed §475(f) applies to crypto and the audit risk on that position is high. For nearly every individual investor, crypto gains are NIIT-eligible.

Can I deduct investment expenses against NIIT?

Form 8960 allows you to reduce net investment income by certain allocable expenses, even though the TCJA suspended most miscellaneous itemized deductions for regular tax and the One Big Beautiful Bill Act of 2025 made that suspension permanent. The most common allocable expenses are investment interest expense, the portion of state income tax allocable to investment income, and (in limited cases) investment advisory fees. The mechanics are on lines 9 and 10 of Form 8960. The deduction is generally limited to the amount actually deductible elsewhere on the return.

Does California have its own NIIT?

No. NIIT is a federal-only tax under IRC §1411. California does not have a state-level equivalent. California does, however, tax all capital gains as ordinary income at rates up to 13.3% (or 14.4% with the mental health services surcharge for taxable income above $1 million). So while California does not stack a NIIT-style surtax, the underlying state rate on investment income is already higher than most other states.

Do RSU sales trigger NIIT?

The vest itself is W-2 income (not investment income). But after vesting, the shares become a capital asset in your brokerage account. Any gain or loss between the vest-date FMV and your eventual sale price is a capital gain/loss and DOES flow into net investment income. Selling at vest produces essentially zero capital gain, so no NIIT. Holding for appreciation creates a capital gain that is NIIT-eligible. See our RSU vesting post for the full mechanics.

If my MAGI is just barely over the threshold, can I plan around it?

Yes, and this is one of the highest-impact moves a household can make. Maxing a Traditional 401(k), maxing the HSA, bunching charitable contributions, harvesting a capital loss late in the year, or deferring a vested RSU sale into next year can all push MAGI below the threshold and eliminate NIIT entirely for the year. If you are within $20,000 of the $250,000 MFJ line, run the numbers in October or November rather than discovering the gap at filing time. Our estimated tax payments post covers the timing discipline.

What about the gain on selling my house?

The §121 exclusion ($250,000 single / $500,000 MFJ) shelters that amount of primary residence gain from both regular tax AND NIIT, provided you meet the ownership and use tests. Gain above the §121 cap is subject to capital gains tax AND NIIT. For Bay Area homeowners who bought 20+ years ago and have $2M+ of appreciation, the post-exclusion portion of the gain is meaningful and the 3.8% NIIT on it adds up. Investment property (not a primary residence) does not get the §121 exclusion at all; the full gain is NIIT-eligible unless deferred via §1031.

Paying NIIT for the first time?

The 3.8% surtax compounds quietly over a tech career. We model the timing, account placement, and active vs. passive levers that bring the number down.