Skip to content
Go back

The 3.8% NIIT: Who Pays and How to Dodge

By KingPin 11 min read
The 3.8% NIIT: Who Pays and How to Dodge

The Tax That Ignores Your Paycheck and Eyes Your Portfolio

The Net Investment Income Tax (NIIT) is a flat 3.8% surcharge on investment income. You owe it only if your modified adjusted gross income (MAGI) crosses $200,000 as a single filer or $250,000 as a married couple filing jointly. Your salary and RSU income are not taxed by it. They push your MAGI over the line, and then your dividends, interest, and stock gains get hit.

That is the mechanism, and it catches a lot of tech workers by surprise. You have a $230,000 salary, a brokerage account, and a Form 1040 that suddenly has a line you’ve never seen. The good news is that you can often shrink the NIIT with legitimate moves.

Who Actually Owes It

The thresholds are set by statute (IRC §1411) and the IRS lists them in its NIIT guidance:

  1. Single or head of household: $200,000
  2. Married filing jointly or qualifying surviving spouse: $250,000
  3. Married filing separately: $125,000

These numbers are not indexed for inflation. The IRS says so directly. They have been frozen since the tax started in 2013, so every raise and every bull market pulls more people in. A $200,000 income bought a lot more in 2013 than it does now.

The formula is short:

NIIT = 3.8% x the lesser of (your net investment income) or (your MAGI minus the threshold)

The “lesser of” part matters. You never pay 3.8% on your whole income, and you never pay it on more investment income than you actually have.

MAGI is your adjusted gross income (AGI) from your Form 1040, plus back a few foreign income exclusions. For most US tech workers, MAGI is the same number as AGI. Contributions that lower your AGI, like pre-tax 401(k) deferrals, lower your MAGI too.

You calculate the tax on Form 8960 and report it on your Form 1040.

What Counts as Investment Income (and What Doesn’t)

The NIIT list is broader than “stocks.”

Counts as net investment income:

You subtract properly allocable expenses, such as investment interest, advisory fees, and rental expenses, to get to the “net” part.

Does not count:

Notice the pattern. Retirement account withdrawals are not investment income for NIIT purposes, even though they feel like it. Traditional 401(k) and IRA withdrawals, and Roth conversions, still raise your MAGI (qualified Roth distributions do not), and that shows up again in the traps section.

Worked Example 1: The Everyday Engineer

You’re single. Your wages, RSUs included, total $230,000. You also got $15,000 of dividends and realized gains in a taxable account.

  1. MAGI: $230,000 + $15,000 = $245,000
  2. Amount over the $200,000 threshold: $45,000
  3. Net investment income: $15,000
  4. The lesser of the two: $15,000
  5. NIIT: 3.8% x $15,000 = $570

Your wages paid no NIIT. But if you had earned $185,000 in wages instead, your MAGI would be $200,000 and the bill would be $0. Same portfolio, same dividends. MAGI sets the line, so your paycheck decides whether your portfolio gets taxed.

Worked Example 2: The Big Sale Year

You’re single, with $180,000 of wages. You sell a pile of company stock for a $120,000 gain.

  1. MAGI: $180,000 + $120,000 = $300,000
  2. Amount over the threshold: $100,000
  3. Net investment income: $120,000
  4. The lesser of the two: $100,000
  5. NIIT: 3.8% x $100,000 = $3,800

Here the threshold gap is the smaller number, so only $100,000 of your $120,000 gain gets hit. Once you’re far above the line, the NIIT stops being a partial tax and becomes a flat 3.8% on every dollar of investment income. Big sale years are where it costs real money.

Not the Same Tax as the 0.9% Additional Medicare Tax

People mix these up because the thresholds match. They are different taxes.

The Additional Medicare Tax is 0.9% on Medicare wages and self-employment income above $200,000 (single), $250,000 (joint), or $125,000 (married filing separately). Your employer starts withholding it once your wages pass $200,000 in a year, whatever your filing status. It hits your paycheck. The NIIT hits your portfolio.

A high earner with both wages and investments can owe both. In Example 1, your $230,000 of wages is $30,000 over the line, so you’d owe 0.9% x $30,000 = $270 of Additional Medicare Tax, on top of the $570 NIIT. In Example 2, your $180,000 of wages is under the line, so only the NIIT applies.

How You Pay It: Not Through Withholding

Your employer does not withhold the NIIT. Nobody does. It falls under the estimated tax rules, which means you need to include it in your quarterly estimated payments or raise your W-4 withholding to cover it.

If you skip this, you owe a lump sum in April, and possibly an underpayment penalty on top. If you know a big sale is coming, pay the estimated tax for that quarter. Better still, plan the sale so the NIIT bill shrinks before you have to pay it.

The Legitimate Dodges

Every strategy below does one of two things. It lowers your MAGI, or it lowers your net investment income. The lesser-of formula means that lowering either one can cut the tax, depending on which number is smaller.

1. Lower MAGI With Pre-Tax Contributions

Traditional 401(k) deferrals, HSA contributions (through payroll), and health FSA contributions all come out of your wages before they reach AGI. The 2026 employee 401(k) deferral limit is $24,500 (IRS, up from $23,500 in 2025).

Apply it to Example 2. If the $180,000 of wages was before your deferral, maxing the 401(k) lowers MAGI to $275,500.

  1. Amount over the threshold: $75,500
  2. NII: $120,000, so the lesser is $75,500
  3. NIIT: 3.8% x $75,500 = $2,869

That saves $931 ($3,800 minus $2,869), on top of the regular income tax you save. The condition: this only works while the gap is the smaller number. Once your MAGI is under the threshold, extra deferrals stop helping the NIIT.

2. Tax-Loss Harvesting

Losses offset gains dollar for dollar before they reach your NII. Take Example 2 and harvest $40,000 of losses elsewhere in the portfolio. Net gain: $80,000.

  1. MAGI: $180,000 + $80,000 = $260,000
  2. Amount over the threshold: $60,000
  3. NII: $80,000, so the lesser is $60,000
  4. NIIT: 3.8% x $60,000 = $2,280

That is $1,520 saved. Watch the wash-sale rule when you buy similar holdings within 30 days before or after the sale. The tax-loss harvesting post covers the mechanics.

3. Give Away Appreciated Stock Instead of Selling

If you give to charity anyway, donate shares with a big gain instead of cash. You never realize the gain, so it never enters NII or MAGI, and you can generally deduct the fair market value if you itemize, held the shares more than a year, and give to a public charity or donor-advised fund (capped at 30% of AGI, with a five-year carryforward). Selling first and donating the cash does the opposite: the gain lands on your return. The full math is in Donate Stock, Not Cash.

4. Spread the Gain Across Years

If a sale can wait until January, or you can sell some now and some later, you can keep each year’s MAGI closer to the threshold. An installment sale of a business or property spreads the gain over the payment years. With $180,000 of wages, a single $200,000 gain costs 3.8% x $180,000 = $6,840. Split into two $100,000 gains in two years, each year is $80,000 over the line, so you pay $3,040 twice, or $6,080. That saves $760, and more if one of those years has lower wages.

5. Time Gains Into Low-Income Years

A sabbatical, a layoff year, or the early years of retirement (before Social Security and RMDs) can have MAGI well under $200,000. Selling appreciated positions in those years can mean zero NIIT. FIRE folks have an edge here: if you control your income, you control where your MAGI lands.

6. Hold Munis and Place Assets Carefully

Tax-exempt municipal bond interest is not NII and is not in your MAGI. Bond funds that throw off taxable interest, and REITs that pay large non-qualified dividends, are better in a 401(k) or IRA, where the income is not NII at all. Put your high-turnover and high-yield holdings there, and let low-yield index funds sit in the taxable account.

The Traps

Roth conversions and traditional IRA withdrawals are not NII, but they raise MAGI. Say you’re single with $150,000 of wages, $30,000 of dividends, and a $60,000 Roth conversion.

  1. MAGI: $150,000 + $30,000 + $60,000 = $240,000
  2. Amount over the threshold: $40,000
  3. NII: $30,000, so the lesser is $30,000
  4. NIIT: 3.8% x $30,000 = $1,140

Without the conversion, MAGI is $180,000 and the NIIT is $0. The conversion isn’t taxed by the NIIT, but it dragged your $30,000 of dividends over the line. Add that $1,140 to the real cost of the conversion.

Rental income usually counts. If you own a rental and aren’t a real estate professional, rent is typically passive and counts as NII. Net rental income of $24,000 is $24,000 of NII, and 3.8% of it is $912. Real estate professionals who materially participate, and rentals that are a nonpassive trade or business, can fall outside the NIIT. The tests are strict, so that is a conversation with a tax pro, not a hope.

Trusts and estates hit the line much faster. They owe the NIIT on undistributed income once their AGI passes the point where the top bracket starts. For 2026, that point is $16,000 of income (Rev. Proc. 2025-32), compared with $200,000 for a single person. So a trust holding investments reaches the tax almost immediately.

The Short Version

The NIIT is a 3.8% tax on investment income, but only if your MAGI crosses a threshold that has not moved since 2013. Wages and RSUs don’t owe it directly. They set your MAGI, and your MAGI decides whether your portfolio is taxed. Control the MAGI with pre-tax contributions, control the gains with harvesting, gifting, and timing, and put the interest-heavy stuff in tax-advantaged accounts.

Run the numbers in November, not April. A $3,800 bill in a big sale year turns into $1,349 or less once you stack a maxed 401(k) with $40,000 of harvested losses ($275,500 minus $40,000 harvested leaves $235,500 MAGI, $35,500 over the line, times 3.8%). Boring planning, real money.

Common Questions

Does the NIIT apply to 401(k) withdrawals?

No. Distributions from a 401(k), 403(b), or IRA are not net investment income. Traditional distributions and Roth conversions can still raise your MAGI, though. A large one can push your other investment income over the threshold and trigger the 3.8%.

Do RSUs count toward the net investment income tax?

RSU income at vest is wages, so it is not net investment income. It does count toward MAGI. If it lifts your MAGI past $200,000 (single) or $250,000 (joint), your dividends and capital gains, including gains from selling vested shares later, become subject to the NIIT, up to the amount over the threshold.

Is the NIIT threshold adjusted for inflation?

No. The NIIT thresholds of $200,000 (single or head of household), $250,000 (joint), and $125,000 (married filing separately) are not indexed for inflation. They have stayed fixed since the tax began in 2013, so more taxpayers cross them every year as incomes rise.

Is the NIIT withheld from my paycheck?

No. Employers do not withhold the NIIT. You pay it through quarterly estimated tax payments or extra W-4 withholding, and you calculate it on Form 8960. If you skip those payments, you owe the full amount at filing time, plus a possible underpayment penalty.

Does the NIIT apply to rental income?

Usually yes. Net rental income counts as net investment income unless the rental is a nonpassive trade or business, such as for a real estate professional who materially participates. Most landlords with a day job fall outside that exception, so their rent is investment income for NIIT purposes.


Share this post on:

Send a Webmention

Written about this post on your own site? Send a webmention and it'll show up above once verified.


Previous Post
Target-Date Funds: Lazy Win or Fee Trap?
Next Post
Empower Review: Free Dashboard, Paid Pitch

Discussion

Powered by Garrul . Sign in with GitHub or Google, or post anonymously.

Related Posts