Skip to content
Kestrel Bay Retirement Advisors logo 5,467 reviews

Net investment income tax on a stock sale at Kestrel Bay Retirement Advisors

Written by the Kestrel Bay Retirement Advisors team · Last reviewed · 9 min read

Kestrel Bay Retirement Advisors treats the net investment income tax on a stock sale as a 3.8% charge on gain above your vest-date basis, owed when modified AGI tops $250,000 joint or $200,000 single. The 3.8% applies to the smaller of net investment income or the amount modified AGI exceeds the threshold, so splitting a sale across working years saves nothing when wages already clear the line.

The old advice to sell part in December and part in January is incomplete for a high-earning employee with released RSUs. The thresholds are set by statute and are not indexed for inflation, so check the current IRS figures and run the sale through Form 8960 before placing an order. Kestrel Bay Retirement Advisors prepared this page for tech employees with stock options who are 10 to 15 years from retirement and want to cut one-stock risk without paying more tax than they have to.

A $100,000 cash gift that left the 3.8% untouched

Making a cash gift to a donor-advised fund to shrink the 3.8% tax leaves it exactly where it was, because an itemized deduction does not lower modified AGI. A careful couple, one year after a large RSU release, may give $100,000 in cash expecting the deduction to shelter a later stock sale. It does not. On $100,000 of gain, that is $3,800 of net investment income tax they expected to avoid and still owed.

Giving appreciated shares with $100,000 of embedded gain to the donor-advised fund could keep that gain off the return, avoiding $3,800 of NIIT before considering capital-gains tax. The charity must be able to accept the shares, and the transfer needs to occur before a binding sale; stock-gifting mechanics deserve their own review.

Before Kestrel Bay Retirement Advisors recommends a lot to sell or a lot to give, we put both choices through the Form 8960 calculation for the current year and the retirement years you expect to use. A deduction can lower taxable income while leaving MAGI, and this tax, untouched.

The tax follows realized gain and MAGI, not good intentions.

How much of a tech paycheck counts as investment income?

RSU value at vest is wages reported on your W-2, so it is not net investment income. The ordinary-income portion of a disqualifying employee stock purchase plan sale follows the same rule. But once you sell shares, gain above the value already taxed at vest, or above the applicable ESPP basis, generally becomes net investment income.

Capital gains, qualified dividends, ordinary dividends, interest, and passive rental income generally count. Wages, a state teacher pension, Social Security, and withdrawals from an IRA or 401(k) generally do not count as investment income. The catch is that wages and retirement withdrawals can still raise modified AGI enough to expose every dollar of investment gain to the 3.8% charge.

Keep NIIT separate from the 0.9% Additional Medicare Tax. That tax applies to wages above $250,000 for a joint return, and an employer generally begins withholding when one employee’s wages exceed $200,000. It is a different calculation from the one on IRS Form 8960.

W-2 income creates basis, then changes the threshold

Additional Medicare Tax is a separate line

How do four lines of arithmetic price a stock sale?

The Form 8960 calculation is short enough to sketch before you sell, although your return may include adjustments that change the final result. First, add wages, pension income, interest, dividends, and planned gain to estimate modified AGI. Second, subtract the applicable threshold: $250,000 for joint filers, $200,000 for single filers, or $125,000 for married people filing separately.

Third, compare that excess with total net investment income and use the smaller figure. Fourth, multiply that smaller amount by 3.8%. The NIIT is paid with the tax return on Form 8960, but RSU withholding does not automatically cover it, so an estimated payment using IRS Form 1040-ES or additional W-4 withholding may be appropriate.

For RSU shares, your basis is usually the vest-date value already included in wages. A 1099-B can show a basis that needs adjustment; using $0 when your true basis is higher overstates gain. Our calculator can help with a quick estimate, but use trade confirmations and payroll records to prepare the final numbers.

Use the smaller number

Fix RSU basis before multiplying

Two couples, one $300,000 gain, a $7,600 gap

The comparison assumes married filing jointly, a $250,000 threshold, and no other investment income. It shows why the same $300,000 gain can call for opposite timing decisions. Tax rates on capital gains and state tax are outside this illustration.

Gwen and Sam are hypothetical, ages 52 and 53. Gwen is a software-company VP of sales whose double-trigger RSUs released after an IPO; Sam teaches high school and expects a state pension. A year later, their remaining shares are $300,000 above vest-date value and their wages total $470,000. Step 1: selling all shares takes MAGI to $770,000, or $520,000 above $250,000. Step 2: net investment income is $300,000. Step 3: the smaller number is $300,000, and $300,000 × 3.8% equals $11,400. Selling $150,000 in each of two working years still produces $11,400 because wages alone exceed the threshold.

A second hypothetical couple has the same $300,000 gain but only $150,000 of wages. One sale produces MAGI of $450,000, an excess of $200,000, and NIIT of $7,600. If they sell $150,000 in each of two years, each year’s MAGI is $300,000, the excess is $50,000, and NIIT is $1,900 each year, or $3,800 total. Their $100,000 of annual headroom gets used twice.

If modified AGI without the sale already exceeds $250,000 on a joint return or $200,000 on a single return, every dollar of investment gain pays 3.8%. Spreading sales across working years does not lower NIIT; only years below the threshold, or gain that is never realized, change that result.

Why Gwen and Sam cannot split their way out

The lower-wage couple can use two years

A sale calendar matters only when at least one year has room below the NIIT threshold.

If … then …: how the 3.8% applies to extra sale gain, married filing jointly, $250,000 threshold
If your situation isThen extra gainMove that fits
Wages exceed $250,000All pays 3.8%Splitting years saves no NIIT
MAGI under $250,000Only excess gainSplit sale for headroom
Pension near $60,000About $190,000 NIIT-freeRealize gain to headroom
Shares given to DAFGain never realizedNo NIIT on gain
Cash gift to DAFMAGI unchangedNIIT unchanged

Ten years of holding to save $11,400

Gwen and Sam could wait until Gwen retires at 62. If Sam’s pension is about $60,000 and they realize $150,000 of gain a year, MAGI could sit near $210,000, under the joint threshold; two such years could realize the full $300,000 with no NIIT. The cost of that plan is not tax but time: the shares stay in one company for about a decade.

The price is a decade of single-stock exposure. On shares worth about $800,000, a 1.5% decline is about $12,000, already more than the $11,400 NIIT saved by waiting. Share prices can drop, and the position can end up worth less than the amount put into it.

We would rather pay 3.8% now on shares that leave too much of a household’s net worth in one company, then reserve future headroom for lots that can sensibly wait. A known tax is unpleasant; a concentrated-stock loss is not refundable. Concentrated stock positions deserve a separate risk review when the sale decision is this large.

At roughly $210,000 of joint MAGI, Gwen and Sam would sit under today’s first Medicare IRMAA tier, which is $218,000 joint for 2026 premiums. That tier is indexed, so check the current figure for their retirement years. IRMAA uses MAGI from two years earlier, so gain realized at 63 sets the premiums they pay at 65. This timing is covered in Medicare planning.

The retirement-year opening

Tax savings are not the only cost

How much do easy errors cost?

Holding vested RSUs solely for long-term treatment while wages already exceed $250,000 does not remove NIIT from future growth. Every dollar of later growth can carry the 3.8% charge on top of the applicable capital-gains rate. On $200,000 of growth, the NIIT alone is $7,600.

Skipping an estimated payment after a large June sale can lead to an underpayment penalty and interest through April. Splitting a sale between December and January when MAGI already exceeds the threshold simply pushes part of the bill into the next return. It does not make the 3.8% disappear.

Specific-lot selection matters. Selling high-basis shares first, when lots have different gains, can preserve lower-gain shares for a later headroom year and reduce the net investment income used in the Form 8960 calculation. Some states tax gains too, so check your state’s rules before using federal math as the full answer.

Long-term treatment does not erase NIIT

A default lot choice can waste headroom

What age do couples start planning headroom years?

This conversation often begins between ages 50 and 55, when a retirement date is close enough to estimate lower-income years with some honesty. For Gwen and Sam, at 52 and 53, the question is current because their shares are large and Sam’s pension creates a fairly visible income floor.

In many homes, the spouse without the equity raises it first after seeing the Form 8960 line on a joint return. Sam may ask why his steady pension never counts as investment income while Gwen’s sale does. That is the useful home conversation: which shares are too risky to hold, and which lots could wait for a year with real tax headroom.

Before speaking with a CPA, advisor, or plan administrator, gather these items: RSU vest confirmations showing the vest-date value, the 1099-B for each sale, payroll records and last year’s W-2, Sam’s pension estimate, and a list of share lots with their basis.

Bring the pension into the discussion

Questions that produce usable numbers

  • The retirement year each spouse expects
  • Expected pension and Social Security income
  • A rough list of share lots and gains
  • Planned gifts during the next three years
  • Is my 1099-B basis adjusted for vest income?
  • Is my Additional Medicare Tax under-withheld?
  • How much room below $250,000 do our first retirement years leave?
  • Should a Q3 estimated payment or W-4 withholding cover NIIT?
  • Which lots does the plan sell by default?

One question about your headroom years for Kestrel Bay Retirement Advisors

Ask: how many of our share lots can wait for years when our MAGI is under $250,000, and how many are too much risk to hold that long? Kestrel Bay Retirement Advisors answers by running both lists through this year’s Form 8960 math and expected retirement-year income.

We explain the advisory fee when we first speak and put it in a written agreement before any work starts. The client minimum is $400K in investable assets.

A sale calendar matters only when at least one year has room below the NIIT threshold.

Your questions about net investment income tax stock sale, answered

If I sell vested RSU shares in December, when do I actually pay the 3.8% tax?

The sale belongs on the tax return for the calendar year in which it closes, and NIIT is calculated on IRS Form 8960 with that return. If the sale creates a large balance due, use Form 1040-ES or added wage withholding before year-end; waiting until the April filing date can create an underpayment penalty.

Is a 3.8% tax big enough to change when I sell company stock?

A 3.8% charge equals $3,800 on $100,000 of taxable gain, so timing can matter when a lower-income year is close and the position is not dangerously concentrated. It should not be the only reason to retain a large employer-stock position. Capital-gains tax, state tax, and a share-price decline may matter more.

How much stock gain can a married couple realize in a year before the net investment income tax applies?

A married couple has room only to the extent its modified AGI before the sale is below the statutory $250,000 threshold. With $150,000 of wages, the first $100,000 of gain generally uses that room, assuming no other investment income. Check the current IRS Form 8960 instructions because deductions do not necessarily reduce modified AGI.

This information is general education only and does not account for your specific circumstances, goals or finances. It is not investment, tax or legal advice. Investing involves risk, including the possible loss of principal. Before making any financial decision, consult a qualified professional about your own situation.

Request information