Net Investment Income Tax (NIIT) Calculator
Created by: Ethan Brooks
Last updated:
Calculate the 3.8% Medicare surtax on net investment income for taxpayers above the MAGI threshold. Enter income by category and see your NIIT base, surtax owed, and how close you are to the $200K/$250K threshold.
Net Investment Income Tax (NIIT) Calculator
FinanceCalculate the 3.8% Medicare surtax on net investment income for taxpayers above the MAGI threshold.
For most U.S. filers, MAGI equals AGI
Net Investment Income by Category
Taxable interest — not tax-exempt muni interest
Passive rental net income only
Royalties, passive business, annuities, etc.
What Is a Net Investment Income Tax (NIIT) Calculator?
A Net Investment Income Tax (NIIT) Calculator determines whether the 3.8% Medicare surtax applies to your investment income and calculates the exact amount owed.
NIIT applies to taxpayers with modified AGI above $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately), on the lesser of net investment income or the excess of MAGI above those thresholds.
Net investment income includes interest, dividends (both qualified and ordinary), short- and long-term capital gains, net rental income from passive activities, and other passive income.
Conspicuously excluded are wages, self-employment income, IRA and 401(k) distributions, Social Security benefits, and municipal bond interest — though some of these items still count toward MAGI when determining whether the threshold is crossed.
The "lesser of" rule is the key concept: if you have $100,000 in net investment income but your MAGI is only $5,000 above the threshold, your NIIT base is $5,000, not $100,000.
Conversely, if your MAGI is $80,000 above the threshold but you only have $30,000 in net investment income, your NIIT base is $30,000.
This asymmetry makes threshold proximity the critical planning variable — not the magnitude of investment income alone.
How NIIT Is Calculated
NIIT = 3.8% × min(net investment income, MAGI − threshold).
Net investment income is the sum of all applicable income categories (interest, dividends, capital gains, net rental income, other passive income) less any allowed deductions directly allocable to that income.
MAGI for NIIT purposes is generally the same as regular AGI for U.S. citizens and permanent residents, with the addition of foreign earned income exclusion amounts and certain other add-backs that apply to specific situations.
NIIT Formula
NIIT base = min(net investment income, MAGI − filing status threshold)
NIIT amount = 3.8% × NIIT base
Thresholds: $200,000 single/HOH, $250,000 married joint, $125,000 married separate
Net investment income = interest + dividends + capital gains + rental + other passive income
Example Scenarios
High Investment Income, MAGI Near Threshold
Filing status: single. MAGI: $215,000. Net investment income: $60,000 (LT capital gains $40,000, dividends $20,000). MAGI above threshold: $215,000 − $200,000 = $15,000. NIIT base = min($60,000, $15,000) = $15,000. NIIT = 3.8% × $15,000 = $570. Though there is $60,000 in NII, only the $15,000 above the threshold is the NIIT base — limiting the tax to $570 rather than the $2,280 it would be if calculated on all NII.
MAGI Well Above Threshold
Filing status: married filing jointly. MAGI: $500,000. Net investment income: $80,000 (dividends $30,000, LT gains $35,000, rental income $15,000). MAGI above threshold: $500,000 − $250,000 = $250,000. NIIT base = min($80,000, $250,000) = $80,000. NIIT = 3.8% × $80,000 = $3,040. Here MAGI excess is larger than NII, so NIIT applies to all net investment income. Combined with a 20% LTCG rate, qualified dividends and long-term gains effectively face a 23.8% combined rate.
How People Use This Calculator
- Investors with AGI near the NIIT threshold planning year-end capital gain realizations to stay below or manage their exposure.
- Rental property owners determining whether their rental income is subject to NIIT and whether real estate professional status could eliminate it.
- Tax planners modeling the NIIT impact of a large one-time capital gains event such as a business sale or real estate sale.
- High-income taxpayers evaluating whether tax-loss harvesting would reduce NIIT by lowering net investment income or capital gains.
- Roth conversion planners modeling whether a conversion will increase MAGI enough to trigger NIIT on other investment income.
- Tax preparers calculating Form 8960 inputs before completing the NIIT on the return.
Tips for Managing NIIT Exposure
Tax-loss harvesting directly reduces net investment income — harvesting $10,000 of losses against $10,000 of gains reduces both your capital gains tax and eliminates $380 of NIIT.
It is one of the few strategies that simultaneously reduces both the regular income tax and the surtax, making it especially valuable for investors with MAGI well above the threshold.
Long-horizon investors approaching the NIIT threshold should consider concentrating large capital gain realizations in low-income years (such as early retirement before Social Security or RMDs begin) rather than in high-income years when both the 20% LTCG rate and 3.8% NIIT apply.
Multi-year income smoothing is often more tax-efficient than realizing large gains in a single high-income year.
Frequently Asked Questions
What is the Net Investment Income Tax (NIIT)?
The Net Investment Income Tax is a 3.8% Medicare surtax on net investment income for taxpayers with modified adjusted gross income (MAGI) above specific thresholds: $200,000 for single filers and heads of household, $250,000 for married filing jointly, and $125,000 for married filing separately. It was enacted as part of the Affordable Care Act in 2010 and took effect in 2013. NIIT is separate from the regular income tax and is calculated on Form 8960.
What types of income are subject to NIIT?
Net investment income subject to NIIT includes: interest income, ordinary dividends, qualified dividends, short-term and long-term capital gains, rental income from passive activities, royalties from passive activities, and income from passive trade or business activities. It does not include wages, salaries, self-employment income, active business income, Social Security benefits, tax-exempt municipal bond interest, distributions from IRAs or qualified retirement plans, or alimony received.
How is the NIIT amount calculated?
NIIT equals 3.8% multiplied by the lesser of (A) your total net investment income or (B) the amount by which your MAGI exceeds the threshold for your filing status. The "lesser of" rule means that if your MAGI is only slightly above the threshold, you only pay NIIT on the excess above the threshold, not on all net investment income. For example, if you have $50,000 in net investment income and your MAGI is $210,000 (single filer), the NIIT base is the lesser of $50,000 or ($210,000 − $200,000) = $10,000. NIIT = 3.8% × $10,000 = $380.
Does NIIT apply to qualified dividends and long-term capital gains?
Yes — qualified dividends and long-term capital gains are subject to NIIT if they are part of your net investment income and your MAGI exceeds the threshold. This is why the highest-income investors can effectively face a 23.8% tax rate on qualified dividends and long-term capital gains (20% capital gains rate plus 3.8% NIIT), rather than the 20% rate alone. The regular capital gains tax and NIIT are calculated independently — you can owe NIIT even on income that would be taxed at 0% for regular capital gains purposes if it pushes your MAGI above the threshold.
Does rental income count as net investment income for NIIT?
Net rental income is subject to NIIT if the rental activity is a passive activity — meaning you do not materially participate in the management of the property. If you qualify as a real estate professional (750+ hours per year and more than half your working time in real estate activities) and materially participate in the specific rental activity, rental income from that activity is excluded from net investment income and exempt from NIIT.
Are IRA and 401(k) distributions subject to NIIT?
No — distributions from IRAs, 401(k) plans, 403(b) plans, and other qualified retirement plans are not net investment income and are therefore not subject to NIIT. However, these distributions do increase your MAGI, which can push more of your other investment income above the NIIT threshold. This is one reason Roth IRA conversions done before income rises are strategically valuable: Roth distributions in retirement do not increase MAGI or trigger NIIT.
Can I reduce my NIIT exposure through planning?
Several strategies can reduce NIIT. Tax-loss harvesting to offset capital gains reduces net investment income directly. Investing in municipal bonds shifts interest income to tax-exempt income excluded from NII (though munis still count toward MAGI for the threshold comparison). Qualified opportunity zone investments can defer or eliminate capital gains subject to NIIT. Maximizing contributions to tax-deferred retirement accounts lowers MAGI, potentially keeping you below or closer to the threshold. Active real estate participation can reclassify rental income out of the NIIT base.
Sources and References
- Internal Revenue Service. "Form 8960: Net Investment Income Tax." Instructions for individuals.
- Internal Revenue Service. "Questions and Answers on the Net Investment Income Tax."
- U.S. Congress. "Affordable Care Act, Section 1402 — Additional Medicare Tax."