Do I owe the 3.8% net investment income tax when I sell my RSUs?

Often, yes, but only on the gain, never on the vest. The net investment income tax is 3.8% of the lesser of your net investment income or the amount your modified adjusted gross income exceeds $200,000 single or $250,000 married filing jointly. Those thresholds have never been indexed for inflation, so most tech employees cross them on salary alone.
Key takeaways
- RSU vesting income is wages, and wages are excluded from net investment income, so the 3.8% tax never touches the vest itself; it only applies to gain above the vest-date cost basis when you later sell.
- The NIIT thresholds are $200,000 for single and head-of-household filers, $250,000 for married filing jointly and $125,000 for married filing separately, and the IRS confirms they are not indexed for inflation.
- No employer withholds the NIIT, so a tech employee who sells appreciated shares owes it through estimated payments or extra W-4 withholding, and the IRS says underpayment penalties can apply if neither is adjusted.
Does the net investment income tax apply to the RSU vest itself?
No. The value of shares on the vest date is compensation, reported in box 1 of your W-2, and the IRS lists wages among the items that are not net investment income. A $200,000 vest adds $200,000 of ordinary income and zero dollars of net investment income.
That vest still matters for the tax in two ways. First, it counts toward modified adjusted gross income, which for most employees is simply adjusted gross income, so a big vest can push you past the threshold in a year you would otherwise have stayed under it. Second, wages above $200,000 single or $250,000 joint carry a different surtax, the 0.9% Additional Medicare Tax, which employers must withhold once your wages at that employer pass $200,000 regardless of filing status. People mix the two up because both start at the same income lines. The 0.9% is on pay; the 3.8% is on investment income.
Which part of an RSU sale is taxed at 3.8%?
The capital gain: sale price minus the fair market value on the vest date, which is your cost basis because that value was already taxed as wages. If you sell on the vest day at the vest price, the gain is close to zero and so is the NIIT, whatever your salary.
The trap is on the brokerage statement, because the 1099-B for RSU shares often shows a $0 cost basis, and a return filed off that number reports the whole sale as gain. Every dollar of that phantom gain flows into net investment income on Form 8960, so the basis error does not just double-tax the vest, it adds 3.8% on top. The fix is an adjustment on Form 8949 before Form 8960 ever sees the number.
Gains from the disposition of stocks are net investment income to the extent they are taken into account in computing taxable income, and only after they are offset by capital losses. Short-term and long-term gains both count; the holding period changes the income-tax rate, not the 3.8%.
How is the 3.8% calculated when my salary already clears the threshold?
The tax is 3.8% of the smaller of two numbers: your net investment income, or your MAGI minus the threshold for your filing status. Once your wages alone are well past the line, the second number is large, and the tax simply becomes 3.8% of your gain.
Consider Mei-Lin, 38, a principal engineer in Seattle (an illustrative composite), single, with $320,000 of 2026 wages including her vests. She sells shares she has held for 14 months: $140,000 of proceeds against a $100,000 vest-date basis, a $40,000 long-term gain. Her MAGI is $360,000, which is $160,000 over the $200,000 line. Her net investment income is $40,000. The smaller number is $40,000, so the NIIT is $1,520.
The lesser-of rule bites differently lower down the income scale, which is why the same gain can cost three different amounts.
2026 single filer, $40,000 long-term RSU gain (illustrative)
Below the threshold
- Wages: $150,000
- MAGI: $190,000
- MAGI over $200,000: $0
- Net investment income: $40,000
- NIIT base (the lesser): $0
- NIIT at 3.8%: $0
Straddling the threshold
- Wages: $180,000
- MAGI: $220,000
- MAGI over $200,000: $20,000
- Net investment income: $40,000
- NIIT base (the lesser): $20,000
- NIIT at 3.8%: $760
Well past the threshold
- Wages: $320,000
- MAGI: $360,000
- MAGI over $200,000: $160,000
- Net investment income: $40,000
- NIIT base (the lesser): $40,000
- NIIT at 3.8%: $1,520

The middle row is the one most people get wrong. An engineer who expects "3.8% on my $40,000 gain" owes $760, not $1,520, because only $20,000 of income sits above the line.
What is the real federal rate on a long-term RSU gain in 2026?
For a single filer with taxable income between $49,450 and $545,500, the long-term capital gains rate is 15%; above $545,500 it is 20%. The joint-filer breakpoints are $98,900 and $613,700. Add the 3.8%, and the two rates that matter to a tech employee past the NIIT threshold are 18.8% and 23.8%.
2026 federal rates on a long-term gain
Taxable income under the 15% breakpoint, MAGI under the NIIT threshold
- Capital gains rate: 0%
- NIIT: 0%
- Combined: 0%
Single $49,451 to $545,500 (joint $98,901 to $613,700), MAGI over the threshold
- Capital gains rate: 15%
- NIIT: 3.8%
- Combined: 18.8%
Single over $545,500 (joint over $613,700)
- Capital gains rate: 20%
- NIIT: 3.8%
- Combined: 23.8%
Mei-Lin's taxable income is $360,000 minus the $16,100 standard deduction, $343,900, so her $40,000 gain costs $6,000 at 15% plus $1,520 of NIIT, $7,520 in total, an 18.8% federal rate on the gain. Washington has no personal income tax, so that is her whole bill on the sale; a California resident would add state tax at ordinary rates, since California gives no preferential rate to capital gains and has no NIIT of its own.
Note that the capital gains breakpoints are measured against taxable income, after deductions, while the NIIT threshold is measured against MAGI, before them. The two lines move independently, and the capital gains breakpoints are the ones that change each year.
Can a sell plan or harvested losses reduce the NIIT?
Yes, because the tax base is net gain, not gross gain. A systematic sell plan that sequences sales across tax years and chooses lots deliberately controls the NIIT the same way it controls the capital gains bill, and losses harvested elsewhere in the portfolio shrink the base directly.
Three levers do most of the work.
- Lot selection. Selling the lots with the highest vest-date basis first produces the smallest gain per share sold. For an employee with vests at many prices, choosing lots can cut the taxable gain on the same number of shares by half or more.
- Harvested losses. Capital losses offset capital gains before either reaches Form 8960. If Mei-Lin harvests $15,000 of losses in an index position the same year, her net gain falls to $25,000, her NIIT to $950, and her capital gains tax by another $2,250. A net capital loss beyond your gains reduces net investment income only to the extent it is allowed against ordinary income on Form 1040, which is capped at $3,000 a year. Here is when harvesting a loss beats waiting it out, and a story of harvested losses on a Meta engineer's RSUs that paid the tax on a vest.
- Year selection. A sabbatical year, a gap between jobs, or a year with no large vest can leave MAGI under the threshold, and a gain realized in that year carries no NIIT at all. The decision is whether the shares are ones you intended to sell anyway; the tax rate should never be the reason to hold or sell, only an input to when.
None of this is about whether to hold your employer's stock. Plenty of employees are bullish and keep most of what vests. It is about making sure that when a sale does happen, the gain, the lots and the year were chosen rather than defaulted.
Who withholds the NIIT, and when is it due?
Nobody withholds it. Your employer withholds on wages, and your broker withholds nothing on a sale, so the NIIT arrives with the rest of your tax at filing unless you plan for it. The IRS says the tax is subject to the estimated tax provisions and that taxpayers who expect to owe it should adjust withholding or estimated payments to avoid underpayment penalties.
For a tech employee that usually means one of two moves: an extra flat-dollar amount on the W-4 for the rest of the year, which counts as paid evenly across the year, or an estimated payment in the quarter of the sale, which does not. Either way, the 110% safe harbor is the test that switches the penalty off regardless of how large the bill turns out to be.
How to estimate your NIIT before a sale, in four steps
- Project MAGI for the year: salary, bonus, every vest already scheduled, interest and dividends. For most employees this is adjusted gross income.
- Subtract your threshold ($200,000 single or head of household, $250,000 joint, $125,000 separate). If the result is zero or less, there is no NIIT this year.
- Estimate net investment income: the gain on the planned sale using vest-date basis, plus dividends and interest, minus harvested losses.
- Multiply 3.8% by the smaller of step 2 and step 3, then decide whether a W-4 change or an estimated payment covers it, and check the safe harbor.
The tax is reported on Form 8960 and carried to Form 1040. Tax software fills it in automatically, which is exactly why so many people meet the NIIT for the first time as a line they did not expect on a return that is already filed.
FAQ
Is the net investment income tax threshold indexed for inflation? No. The IRS states that the $200,000, $250,000 and $125,000 thresholds are not indexed for inflation. They have been the same since the tax took effect in 2013, so each year more salaried tech employees cross them without any change in their investing.
Does the NIIT apply to ESPP or ISO shares when I sell them? The capital-gain portion of any stock sale is net investment income once you are over the threshold. The compensation portion is not: the bargain element reported as wages on a disqualifying ESPP or ISO disposition is excluded, while the whole gain on a qualifying ISO disposition is treated as capital gain and is included.
Do I pay the 3.8% if I sell my RSUs on the day they vest? Only on any gain between the vest price and the sale price, which for a same-day sale is usually a few dollars or a small loss. The vest value itself is wages and is never part of net investment income, no matter how high your income is.
Is the 3.8% charged on top of the 20% long-term capital gains rate? Yes. A single filer with taxable income above $545,500 in 2026 pays 20% on long-term gains plus 3.8% NIIT, a combined 23.8% federal rate. Below that breakpoint the combination is 15% plus 3.8%, or 18.8%.
Does California or Washington have its own NIIT on RSU sales? No state levies the 3.8% tax; it is federal only. California taxes capital gains as ordinary income at its regular rates on top of the federal bill, and Washington has no personal income tax, though it does have a separate capital gains excise tax on large long-term gains that is worth checking against your situation.
Alphanso Inc is a flat-fee fiduciary wealth advisory for employees with equity compensation (RSUs, ISOs, NSOs and ESPP); advisors are paid a flat annual fee, never a percentage of assets or commissions. If your return keeps producing a Form 8960 you did not plan for, the fix is a sell plan that sets the lots, the losses and the year before the trade, and payroll settings that cover the bill as it builds. That is active tax advisory with end-to-end implementation, for a flat annual fee. Book a call and bring last year's return.
Tracy Weston, CFP, EA, is a Senior Wealth Advisor at Alphanso, where she leads tax strategy and filing for employees with equity compensation across California, Washington and New York.

.png)
.jpg)
.png)
