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.
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.
Scenario A against your current inputs
| Line | Scenario A | Current |
|---|
Change any input above to see the difference.
Keep this result. The link reopens this calculator with these inputs, and the printout carries the year-by-year figures and sources.
What this number misses: the income that crosses the threshold is also taxed at regular rates, can raise Medicare premiums two years later, and the thresholds are not indexed for inflation. See what to check next
Keep this result
Save these figures as a PDF, or copy a link that reopens the NIIT calculator with your inputs.
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.
| Conversion | MAGI with it | NIIT | NIIT 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.
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.
Take these numbers to your advisor
Send your advisor this calculation. The link opens it with your inputs filled in, so the conversation starts from your numbers.
Income Lab is software for financial advisors and their teams, and walkthroughs are for financial advisors only.
Email me this report
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)
- 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.
- Threshold (line 14). Read from the table below for the filing status.
- Excess (line 15). MAGI minus the threshold. If that is zero or less, there is no tax.
- Smaller amount (line 16). The smaller of net investment income or the excess.
- Tax (line 17). Line 16 times 3.8%.
| Filing status | Threshold |
|---|---|
| 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.
| Line | What the form says | Amount |
|---|---|---|
| 12 | Net investment income | $90,000 |
| 13 | Modified adjusted gross income (see instructions) | $270,000 |
| 14 | Threshold based on filing status (see instructions) | $200,000 |
| 15 | Subtract line 14 from line 13. If zero or less, enter -0- | $70,000 |
| 16 | Enter the smaller of line 12 or line 15 | $70,000 |
| 17 | Net 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.
| Counts as net investment income | Does not count |
|---|---|
| Interest, dividends, rental and royalty income | Wages and self-employment income |
| Gains from selling stocks, bonds and mutual funds, and capital gain distributions from mutual funds | Social Security benefits and unemployment compensation |
| Gain from selling investment real estate, including a second home that is not a primary residence | Distributions from qualified plans and IRAs (sections 401(a), 403(a), 403(b), 408, 408A and 457(b)) |
| Non-qualified annuities | Tax-exempt interest |
| Income from businesses that trade financial instruments or commodities, or that are passive activities for the taxpayer | Operating income from a nonpassive business |
| Gains from selling interests in partnerships and S corporations where the taxpayer was a passive owner | Alimony and Alaska Permanent Fund dividends |
| Home sale gain above the section 121 exclusion | Home 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.
Have a different question? Ask it here.
Notes and sources
- 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.
- 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.
- Instructions for Form 8960 (2025) and Form 8960 (2025), lines 13 to 17 for individuals.
- IRS Publication 590-A (2025), on including converted amounts in gross income.
- Results are rounded to the cent. This is an educational estimate of federal tax rules, not tax advice.
Learn the rules
- Net Investment Income Tax in Retirement: What Advisors Must Plan ForThe 3.8% NIIT reaches deeper into ordinary retirements every year because its thresholds never adjust. 2026 rules, math, and the threshold stack system.
- State Taxes in Retirement: The Complete Guide for Financial AdvisorsState taxes in retirement vary by $2,000+ per year. See how all 50 states tax Social Security, pensions, and IRA income in 2026.
- 2027 Tax Brackets and Standard DeductionThe 2027 federal tax brackets for all filing statuses, the standard deduction with the 65 and older amounts, capital gains rates, and the change from 2026.
Related calculators
- Capital gains tax calculatorFree capital gains tax calculator for 2026 and 2027: the 0%, 15% and 20% rates stacked on retirement income, plus the 3.8% NIIT, taxable Social Security and IRMAA.
- QCD calculatorQualified charitable distribution (QCD) calculator: the QCD allowed, the RMD it covers, the 2026 and 2027 limits, and the tax saved against a cash gift.
- Widow tax penalty calculatorFree widow's penalty calculator: compare a joint return with the survivor's single return for 2026 or 2027 and see the added federal tax, rate and deduction.
Plan Roth conversions year by year
See how Roth conversions, investment income and taxes play out across a whole retirement.