PennyCompass

Net Investment Income Tax Calculator

Free NIIT calculator. 3.8% surtax on net investment income above MAGI thresholds ($200K single / $250K MFJ).

Published

Compute 3.8% NIIT for high-income filers with investment income.

NIIT

Your breakdown

Updates live as you type
Step Amount

The surtax that hides inside a good year

The Net Investment Income Tax is a flat 3.8% levy created under Section 1411, and it surprises people because nothing on a paycheck withholds for it. It shows up at filing on Form 8960, bolted onto your regular income tax and your capital gains tax. The catch that trips up most filers is the word "lesser." You do not pay 3.8% on all of your investment income, and you do not pay it on your whole income over the threshold. You pay it on whichever of those two numbers is smaller. This tool runs exactly that comparison so you can see which side is binding before your accountant tells you in April.

One detail worth knowing because it quietly pulls more households into the tax every year: the $200,000 single and $250,000 married-filing-jointly thresholds have never been indexed for inflation. Congress set them in 2013 and they have not moved since. Wage growth and rising portfolio values keep dragging more middle-upper earners across a line that was originally aimed at the genuinely wealthy.

A single filer at $250,000, step by step

Take the default scenario: a single filer with modified adjusted gross income of $250,000 and $40,000 of net investment income, which here is interest, dividends, and capital gains. The threshold for a single filer is $200,000. The tool finds the MAGI excess, finds the smaller of that and the investment income, and applies 3.8%.

Here the investment income ($40,000) is smaller than the income overage ($50,000), so the investment income is the base. If this filer had only $20,000 of investment income, the tax would fall to $760, because the smaller number now drives the result. That asymmetry is the whole point of the calculator.

Levers that move your bill

Because the tax keys off MAGI and off the type of income, you have more control than you might think. A few moves that genuinely change the number: harvest capital losses to shrink net investment income, hold appreciated assets rather than selling them in a high-income year, and route savings into a Roth where qualified withdrawals never count as investment income. Income from a business in which you materially participate is not investment income, so active business owners often sit outside the tax even at high earnings. Tax-exempt municipal bond interest also stays out of the base entirely, which is part of why munis appeal to people in this zone.

Who is this for? Anyone whose income is climbing toward six figures and who holds a taxable brokerage account, a rental, or is planning a large stock sale. The classic mistake is treating a one-time event, the sale of a business, an inherited home, a big RSU vest, as if it only triggers capital gains tax. That same event can push MAGI over the line and switch on NIIT for the year, so the marginal cost of the sale is higher than the headline capital gains rate alone.

Does NIIT apply to the sale of my primary home?

Only on gain above the Section 121 exclusion. If you are single you can exclude up to $250,000 of gain on a primary residence you have owned and lived in for two of the last five years, or up to $500,000 if married filing jointly. Gain under that exclusion is not investment income and never reaches NIIT. Only the portion above the exclusion can be pulled in, and even then only if your MAGI clears the threshold.

Do retirement account withdrawals count?

Distributions from a 401(k), traditional IRA, or Roth are not net investment income, so they are never directly subject to NIIT. The trap is indirect: a large traditional IRA or 401(k) withdrawal raises your MAGI, which can lift you over the threshold and expose your other investment income, like brokerage dividends and gains, to the 3.8% tax. The withdrawal itself is exempt, but it can be what tips the rest of your portfolio income into the surtax.

Frequently asked questions

What counts as investment income?
Interest, dividends, capital gains, rental and royalty income, non-qualified annuities. NOT: wages, business income (active), Social Security, retirement distributions, tax-exempt interest.
What types of investment income are subject to NIIT?
Interest, ordinary dividends, qualified dividends, short-term and long-term capital gains, passive rental income, passive business income, and non-qualified annuities are all included in the NIIT base. Wages, salaries, active business income, Social Security benefits, qualified dividends from active pass-through businesses in which you materially participate, and tax-exempt interest are not included. The distinction between passive and active business participation is often the deciding factor for business owners.
Do Roth IRA withdrawals trigger NIIT?
No. Qualified Roth IRA distributions are excluded from gross income entirely and are not treated as net investment income for NIIT purposes. Only investment income earned in taxable brokerage accounts, or taxable portions of retirement distributions from traditional accounts, can be subject to the 3.8% surtax. A large Roth conversion does raise MAGI for the year, which could push your other investment income over the threshold, but the Roth withdrawal itself is never in the NIIT base.
How can I reduce my exposure to NIIT?
Because NIIT applies to investment income, converting taxable bond interest to tax-exempt municipal bond interest removes that income from the base entirely. Deferring capital gains through opportunity zone investments or installment sales spreads or delays exposure. Increasing the share of your income from active business participation, rather than passive investments, keeps more earnings out of the NIIT calculation. Tax-deferred annuities can also shift gain recognition to future years. The core lever is converting passive investment income into income that does not meet the statutory definition of net investment income.

Related calculators

Embed this calculator on your site (free)

Paste this code into your page. The calculator stays up to date automatically and links back to PennyCompass.

Calculator by PennyCompass