Calculateus

Net Investment Income Tax (NIIT) Calculator

Estimate the 3.8% Net Investment Income Tax on interest, dividends, capital gains and other investment income.

Result

Estimated NIIT Owed
$1,140.00
Amount Subject to NIIT
$30,000.00
MAGI Threshold
$200,000.00

NIIT applies at 3.8% on the smaller of your net investment income or the amount your MAGI exceeds the threshold ($200,000 single / $250,000 married filing jointly).

About the NIIT Calculator

High earners with substantial investment income face an extra 3.8% tax on top of regular capital gains and dividend tax, a surcharge many people don't discover until they owe it. Our Net Investment Income Tax Calculator checks whether you're above the threshold and estimates what you owe.

How It Works

The calculator finds the amount your Modified AGI exceeds the threshold for your filing status ($200,000 single, $250,000 married), then applies the 3.8% NIIT rate to whichever is smaller: your net investment income or that excess MAGI amount. Only the smaller of the two figures is ever taxed.

Excess MAGI = max(MAGI − threshold, 0) Taxable amount = min(net investment income, excess MAGI) NIIT = taxable amount × 3.8%

Formula & Methodology

NIIT was added by the Affordable Care Act specifically to help fund healthcare programs, applying only to investment-type income, not wages, and only above a fairly high MAGI threshold. The 'smaller of the two' rule is the key mechanic: the tax is capped at whichever is less, your actual net investment income or the amount your income exceeds the threshold, so someone with modest investment income but very high wages might owe NIIT only on their smaller investment income figure, while someone with huge investment income but MAGI just barely over the threshold owes it only on the excess over that threshold instead.

Step-by-Step: Calculating It By Hand

  1. 1Calculate your Modified Adjusted Gross Income (generally AGI plus certain add-backs like foreign earned income exclusions).
  2. 2Subtract the MAGI threshold for your filing status ($200,000 single, $250,000 married) to find your excess MAGI.
  3. 3Total your net investment income: interest, dividends, capital gains, rental and royalty income, and non-qualified annuities.
  4. 4Take the smaller of your net investment income or your excess MAGI as the taxable base.
  5. 5Multiply that taxable base by 3.8% to get your NIIT owed.

Examples

Investment income below excess MAGI

$230,000 MAGI (single) with $40,000 net investment income → $30,000 excess MAGI is smaller than the $40,000 investment income, so NIIT applies to the $30,000, for $1,140 owed.

Large investment income

The same $230,000 MAGI with $100,000 net investment income → the $30,000 excess MAGI is still the smaller figure, capping the NIIT base at $30,000 regardless of how much larger the investment income is.

Advantages

  • Correctly applies the 'lesser of the two' rule instead of just taxing all investment income
  • Uses the accurate MAGI thresholds by filing status
  • Highlights an extra tax many high earners forget to plan for
  • Useful alongside our Capital Gains and Dividend Tax calculators for a complete investment tax picture

Common Mistakes

  • Applying the 3.8% rate to all net investment income instead of the smaller of income or excess MAGI
  • Forgetting retirement account distributions don't count as net investment income
  • Not accounting for NIIT when estimating tax on a large one-time capital gain
  • Assuming NIIT thresholds adjust for inflation the way ordinary tax brackets do

Edge Cases to Watch For

  • Wages, self-employment income, and distributions from qualified retirement accounts like 401(k)s and IRAs are excluded from net investment income entirely.
  • The MAGI thresholds ($200,000 / $250,000) are not indexed for inflation, so more filers are pulled into NIIT territory over time as incomes rise with inflation.
  • Rental income can be excluded if you qualify as a real estate professional under IRS rules, which is a fairly high bar involving material participation requirements.
  • NIIT applies on top of, not instead of, regular capital gains and dividend tax, so a large investment gain can face both taxes simultaneously.

Common Use Cases

  • Estimating the extra 3.8% surtax on investment income for high earners
  • Planning around a large capital gain or dividend payout near the MAGI threshold
  • Understanding a NIIT line item on Form 8960
  • Coordinating investment sale timing with income from other sources
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

What counts as "net investment income" for this tax?

Interest, dividends, capital gains, rental and royalty income, and non-qualified annuities generally count - wages, self-employment income, and distributions from qualified retirement plans like 401(k)s and IRAs do not.

Conclusion

NIIT is easy to overlook because it's a separate form and a separate calculation from regular capital gains tax, but it can add a meaningful amount on top for anyone above the MAGI threshold with sizable investment income. Run a large planned sale or dividend event through this calculator before it happens, not after, so the surtax isn't a surprise at filing time.