Income Lab

Free tool · Retirement taxes

Net investment income tax calculator (3.8% NIIT)

The net investment income tax is 3.8% of the smaller of two amounts: the client's net investment income, or the amount the client's modified adjusted gross income (MAGI) is over a threshold. The threshold is $200,000 for single and head of household filers, $250,000 for married filing jointly and qualifying surviving spouses, and $125,000 for married filing separately. The IRS says these thresholds are not indexed for inflation. For example, a single filer with $270,000 of MAGI and $90,000 of net investment income owes $2,660: 3.8% of the $70,000 of MAGI over the threshold.

Before any conversion entered below. For most people this is adjusted gross income from Form 1040. It differs with excluded foreign earned income, certain foreign corporation holdings, or an adjustment a trust or estate reports in box 14, code H, of Schedule K-1 (Form 1041) (Form 8960 instructions, lines 7 and 13).

Interest, dividends, capital gains, rents, royalties and non-qualified annuities, less expenses allocable to them (Form 8960 line 12).

The taxable amount. It is added to the MAGI above but is not net investment income, so the result shows the NIIT with it and how much of it the conversion adds.

Whole dollars. The form opens on the IRS's own single-filer example.

NIIT for this return

$2,660

3.8% × $70,000

Threshold
$200,000
MAGI over the threshold
$70,000
Net investment income
$90,000
Amount taxed (the smaller)
$70,000

MAGI over the threshold ($70,000) is smaller than net investment income ($90,000), so the tax is figured on $70,000.

NIIT calculator · Income Lab

Printed . Reopen these inputs:

An educational estimate, not tax or investment advice.

What this calculator does not cover

  • Working out net investment income itself. Enter the figure from Form 8960 line 12; the calculator does not sort income into investment and non-investment items, allocate deductions, or apply passive activity rules.
  • MAGI adjustments for the foreign earned income exclusion, for holdings in controlled foreign corporations or passive foreign investment companies, and for box 14, code H, amounts on a Schedule K-1 (Form 1041) from a trust or estate.
  • Estates and trusts, which use a different threshold, and nonresident aliens, who are not subject to the tax.
  • Regular income tax, the 0.9% Additional Medicare Tax, and state taxes.

At other amounts

What would a conversion add to the NIIT?

The calculator run again at other conversion amounts, with the filing status, MAGI and net investment income above. The NIIT starts once MAGI passes the threshold, grows 3.8 cents per dollar, and stops growing once all of the net investment income is taxed.

NIIT at each conversion amount for the inputs above. The darker bar is the amount entered.
NIIT at other conversion amounts, for the inputs above. The highlighted row is the amount entered.
ConversionMAGI with itNIITNIIT the conversion adds
$0$270,000$2,660$0
$5,000$275,000$2,850$190
$10,000$280,000$3,040$380
$15,000$285,000$3,230$570
$20,000$290,000$3,420$760
$25,000$295,000$3,420$760
$30,000$300,000$3,420$760
$35,000$305,000$3,420$760

Source: Form 8960 (2025), lines 13 to 17, run at each amount; 26 U.S.C. § 1411(c)(5), conversions are not net investment income.

Before you act on this number

What this number misses

The 3.8% is one line on the return. The income that triggers it moves other lines too.

  • Regular income tax comes first. A long-term capital gain is generally taxed at 0%, 15% or 20% before the 3.8% is added. A Roth conversion is taxed at ordinary rates; it is not investment income, but it raises the MAGI that can bring other investment income under the 3.8%. Either way, the NIIT is only part of what the income costs. Source: IRS Topic 409, capital gains and losses, IRS Publication 590-A, Instructions for Form 8960.
  • The same income can raise Medicare premiums two years later. A gain or a conversion that raises MAGI for the NIIT also raises the income Social Security uses to set the IRMAA surcharge on Part B and Part D, two years before the premium year. Source: 20 CFR 418.1135(a).
  • The thresholds do not move. The $200,000 and $250,000 thresholds are written into the statute and are not indexed for inflation, so a client whose income rises with prices can cross them over time. Source: IRS, Questions and Answers on the Net Investment Income Tax.
  • Timing is the lever. Spreading a gain or a conversion across two tax years can keep MAGI at or under the threshold in each, as the worked cases on this page show. Source: Instructions for Form 8960.
Tax Lab's strategy comparison for a demo household: Roth Conversions to fill 32% Brkt against Taxable, Tax-Deferred, Tax-Free. Four outcome cards: Average Tax Rate saves 7.5%, Total Taxes saves $1.1 million, Total Net Income goes up $1.1 million, Net Legacy goes up $1.5 million.
From the product. Tax Lab's strategy comparison for a demo household, on demo data.

How Income Lab does this for your clients

This calculator prices one year. Which year each conversion or sale lands in is a question for the multi-year plan.

Tax Lab models Roth conversions with bracket management to a target bracket.

Every module reads and writes the same client plan, so a change such as a Roth conversion updates taxes, the IRMAA check and the guardrails without re-entry.

Who is this calculation for?

See the whole plan in a walkthrough

The free trial lasts 14 days and gives you full Pro access, including Penny.

How this is calculated

How is net investment income tax calculated?

NIIT = 3.8% × the smaller of (net investment income) or (MAGI − threshold, not below zero)

  1. MAGI (line 13). Adjusted gross income, unless the taxpayer excludes foreign earned income or owns certain controlled foreign corporations (CFCs) or passive foreign investment companies (PFICs). Then the Form 8960 instructions modify it: excluded foreign earned income is added back, net of certain disallowed deductions, and the CFC and PFIC rules can raise or lower it. One of them reads, "Decrease AGI by the amount of any section 951(a), 951A, or 1293(a) inclusions." A beneficiary of a trust or estate also adjusts MAGI by an amount reported in box 14, code H, of Schedule K-1 (Form 1041), as the instructions for line 7 say.
  2. Threshold (line 14). Read from the table below for the filing status.
  3. Excess (line 15). MAGI minus the threshold. If that is zero or less, there is no tax.
  4. Smaller amount (line 16). The smaller of net investment income or the excess.
  5. Tax (line 17). Line 16 times 3.8%.
NIIT threshold by filing status
Filing statusThreshold
Single$200,000
Head of household$200,000
Married filing jointly$250,000
Qualifying surviving spouse$250,000
Married filing separately$125,000

The IRS's own words on the thresholds: "Taxpayers should be aware that these threshold amounts are not indexed for inflation." Section 1411(b) sets $250,000 for joint returns and surviving spouses, half of that for married filing separately, and $200,000 in any other case.

Sources: 26 U.S.C. § 1411(a)(1) and (b); IRS NIIT questions and answers, question 3; Instructions for Form 8960 (2025), lines 7, 13 and 14; Form 8960 (2025), lines 15 to 17. Current as of 2026-11-17.

Form 8960, line by line, for the IRS example

The calculator opens on the single filer in the IRS's own example. Here is the same return on the lines of Form 8960 for individuals.

Form 8960 lines 12 to 17: single filer, $270,000 of MAGI, $90,000 of net investment income
LineWhat the form saysAmount
12Net investment income$90,000
13Modified adjusted gross income (see instructions)$270,000
14Threshold based on filing status (see instructions)$200,000
15Subtract line 14 from line 13. If zero or less, enter -0-$70,000
16Enter the smaller of line 12 or line 15$70,000
17Net investment income tax for individuals. Multiply line 16 by 3.8% (0.038).$2,660

Line 16 is the smaller of the two amounts, and here the $70,000 of MAGI over the threshold is smaller than the $90,000 of investment income, so $20,000 of that income goes untaxed by the NIIT. The rule: when the excess is the smaller amount, every dollar of MAGI over the threshold costs 3.8 cents; when investment income is smaller, all of it is taxed and lowering other income does not help until MAGI falls below the threshold plus the investment income.

Source: Form 8960 (2025), lines 12 to 17, line labels as printed; the example from IRS NIIT questions and answers, question 20.

What counts

What counts as net investment income?

The two lists below are the IRS's general ones. The Form 8960 instructions and the regulations hold the detailed rules.

Common income that counts and does not count as net investment income
Counts as net investment incomeDoes not count
Interest, dividends, rental and royalty incomeWages and self-employment income
Gains from selling stocks, bonds and mutual funds, and capital gain distributions from mutual fundsSocial Security benefits and unemployment compensation
Gain from selling investment real estate, including a second home that is not a primary residenceDistributions from qualified plans and IRAs (sections 401(a), 403(a), 403(b), 408, 408A and 457(b))
Non-qualified annuitiesTax-exempt interest
Income from businesses that trade financial instruments or commodities, or that are passive activities for the taxpayerOperating income from a nonpassive business
Gains from selling interests in partnerships and S corporations where the taxpayer was a passive ownerAlimony and Alaska Permanent Fund dividends
Home sale gain above the section 121 exclusionHome sale gain excluded under section 121

Investment expenses properly allocable to the income reduce it, and gains count to the extent capital losses do not offset them.

Source: IRS NIIT questions and answers, questions 8 to 11 and 13.

Worked cases

Does the NIIT apply to capital gains?

Yes. A capital gain is net investment income, and it also raises MAGI, so one sale can push a client over the threshold and supply the income that is taxed.

A hypothetical worked case: a single filer has $150,000 of MAGI, including $10,000 of dividends, and sells stock for a $100,000 long-term gain. Before the sale, MAGI is under the $200,000 threshold and the NIIT is $0. After it, MAGI is $250,000, which is $50,000 over the threshold, and net investment income is $110,000. The smaller amount is $50,000, so the NIIT is $1,900, on top of the capital gains tax on the sale.

The rule for this client: the first $50,000 of gain keeps MAGI at or under the threshold and costs no NIIT. Past that, each $1,000 of gain adds $38. Selling half of the position in each of two tax years puts $50,000 of gain in each year, keeps MAGI at $200,000, and brings the NIIT to $0 in both years, if the client's other income holds.

Rental income, worked

A hypothetical married couple filing jointly has $300,000 of MAGI, including $30,000 of net rental income from a property they do not actively run as a business. MAGI is $50,000 over the $250,000 threshold, more than the rental income, so all $30,000 of it is taxed: $1,140. The rule here runs the other way: with investment income as the smaller amount, the NIIT stays at 3.8% of it until MAGI falls by more than $20,000.

These cases leave out the regular capital gains rates, state tax and any capital losses that offset the gain. For the gain itself, the net unrealized appreciation calculator shows the long-term capital gains brackets, and the tax bracket calculator shows the ordinary brackets.

Sources: IRS NIIT questions and answers, questions 8 to 11, on gains and rental income as net investment income; Form 8960 (2025), lines 13 to 17.

Planning notes

Why do retirees run into the NIIT?

The tax needs two things at once: net investment income, and MAGI over the threshold. In retirement that often comes down to the years when MAGI jumps. A large capital gain, such as from selling stock or investment real estate, does both: it is net investment income, and it raises MAGI.

Roth conversions work differently. The taxable amount of a conversion is included in gross income, so it raises MAGI. But the conversion is not net investment income, because section 1411(c)(5) excludes distributions from IRAs and other qualified plans. The conversion itself is never subject to the NIIT, but it can push MAGI over the threshold, and then investment income that was already there is taxed.

A worked case: a married couple filing jointly has MAGI of $230,000, including $40,000 of net investment income. They are under the $250,000 threshold, so the NIIT is $0. If they add a $60,000 taxable Roth conversion, MAGI becomes $290,000, which is $40,000 over the threshold. The smaller of $40,000 and $40,000 is $40,000, so the NIIT becomes $1,520, on top of the regular income tax on the conversion.

The rule for this couple: conversion dollars that keep MAGI at or under the threshold cost no NIIT, so the first $20,000 of the conversion was NIIT-free. Past that, each $1,000 converted adds $38 of NIIT, until MAGI is $40,000 over the threshold and all of the investment income is taxed. Here that point is a $60,000 conversion, so converting more would add no more NIIT. The $1,520 of NIIT came to about 2.5% of the $60,000 converted.

To run this rule for a client, enter MAGI before the conversion and the planned conversion in the calculator above: it shows the NIIT-free room, the cost per $1,000 past it, and the conversion size at which the cost stops growing.

Social Security benefits are not net investment income either, but the taxable part counts in MAGI. The taxable Social Security calculator shows how much of the benefits are taxable, and the IRMAA calculator shows how the same MAGI affects Medicare premiums. For the full rules and more retirement cases, read the net investment income tax guide for retirees.

The calculator prices one conversion in one year. Sizing conversions across several years, so each year's MAGI lands where the advisor intends, is a plan-level question. Tax Lab in Income Lab models Roth conversions with bracket management to a target bracket.

Sources: 26 U.S.C. § 1411(c)(5); IRS Publication 590-A (2025), "Conversions"; Instructions for Form 8960 (2025), line 13; IRS NIIT questions and answers, questions 9 and 10.

In the client meeting

How advisors use this with clients

  • Start from the two numbers on the return. Take MAGI from Form 1040 and net investment income from last year's Form 8960 line 12, then run the calculator. If MAGI is under the threshold, the answer is the room left, not the tax.
  • Name which amount is smaller. When MAGI over the threshold is smaller, every added dollar of income costs 3.8 cents more. When investment income is smaller, the tax is fixed at 3.8% of it, and the lever is the investment income itself.
  • Price the year's big decisions together. A sale with a large gain and a Roth conversion in the same year stack in MAGI. Enter the conversion in the calculator to see what it adds, and look at the Roth conversion calculator and the IRMAA calculator for the same income.
  • Remember the thresholds do not move. They are not indexed for inflation, so clients whose income grows with inflation cross them over time.

Questions

Questions about the NIIT

What is the net investment income tax?

It is a 3.8% tax under section 1411 of the tax code on certain net investment income of individuals, estates and trusts whose income is above set thresholds. It took effect on January 1, 2013. For an individual, the tax is 3.8% of the smaller of net investment income or the amount by which modified adjusted gross income is over the threshold.

What are the NIIT thresholds?

$250,000 for married filing jointly and qualifying surviving spouses, $125,000 for married filing separately, and $200,000 for single and head of household filers. The amounts are written into the statute, and the IRS states that they are not indexed for inflation.

Is a Roth conversion subject to the net investment income tax?

The conversion itself is not net investment income: the statute excludes distributions from IRAs and other qualified plans. But the taxable amount of a conversion is included in gross income, so it raises adjusted gross income and, for most people, the modified adjusted gross income the NIIT uses. A conversion can therefore push MAGI over the threshold and expose investment income that was already there to the 3.8% tax.

Are Social Security benefits or IRA withdrawals net investment income?

No. The IRS lists Social Security benefits, wages, tax-exempt interest and distributions from qualified plans and IRAs among the common types of income that are not net investment income. The taxable part of Social Security benefits, and the taxable amount of a Roth conversion, still count in MAGI.

Does the NIIT apply when a client sells a home?

Only to gain that is taxable. The IRS says the NIIT does not apply to gain excluded under section 121, the home sale exclusion of up to $250,000, or $500,000 for a married couple. Gain above the exclusion is net investment income. Gain from selling a second home that is not the client's primary residence is included, like gain on other investment real estate.

How does NIIT tax work?

It applies only when two things are true in the same year: the client has net investment income, and modified adjusted gross income is over the threshold for the filing status. The tax is then 3.8% of whichever is smaller. In the IRS's own example, a single filer with $270,000 of MAGI and $90,000 of net investment income is $70,000 over the threshold, so the tax is $2,660.

Who pays the 3.8% net investment tax?

Individuals, estates and trusts with net investment income whose modified adjusted gross income is over the threshold: $200,000 for single and head of household filers, $250,000 for married filing jointly and qualifying surviving spouses, and $125,000 for married filing separately. Estates and trusts use a different threshold, and nonresident aliens are not subject to the tax.

Does NIIT apply to capital gains?

Yes. Gains from selling stocks, bonds, mutual funds and investment real estate are net investment income, and a large gain also raises MAGI. In this page's worked case, a single filer with $150,000 of MAGI who sells stock for a $100,000 gain owes $1,900 of NIIT on top of the capital gains tax. Gain on a home sale excluded under section 121 is not included.

Is net investment income tax based on AGI or taxable income?

Neither exactly. It is based on modified adjusted gross income (MAGI), which for most people is adjusted gross income from Form 1040. MAGI is adjusted only for excluded foreign earned income, certain foreign corporation holdings, and some trust and estate items. Deductions taken after adjusted gross income, such as the standard deduction, do not lower it.

How do I avoid net investment income tax?

The tax needs MAGI over the threshold, so the levers are the size and timing of income. Spreading a large gain over two tax years can keep MAGI at or under the threshold in each: in this page's worked case, selling half of the gain in each year brings the NIIT from $1,900 to $0. Income that is not net investment income, such as IRA withdrawals, still counts in MAGI, so a Roth conversion in the same year can expose investment income that was untaxed. For the strategies in detail, see the net investment income tax guide for retirees on this site.

How is the NIIT reported and paid?

Individuals figure it on Form 8960 and report it with Form 1040. The IRS says the tax is subject to the estimated tax provisions, so people who expect to owe it may need to adjust withholding or estimated payments to avoid an underpayment penalty.

Notes and sources

  1. 26 U.S.C. § 1411, imposition of tax: (a)(1) the individual tax, (b) the thresholds, (c) net investment income, (d) modified adjusted gross income.
  2. IRS, Questions and Answers on the Net Investment Income Tax: thresholds, what is and is not included, and worked examples in questions 11, 19 and 20.
  3. Instructions for Form 8960 (2025) and Form 8960 (2025), lines 13 to 17 for individuals.
  4. IRS Publication 590-A (2025), on including converted amounts in gross income.
  5. Results are rounded to the cent. This is an educational estimate of federal tax rules, not tax advice.

Plan Roth conversions year by year

See how Roth conversions, investment income and taxes play out across a whole retirement.