Free to Use

Net Investment Income Tax (NIIT) Calculator

Calculate the 3.8% Medicare surtax on your investment income for 2025. Enter your filing status, Modified Adjusted Gross Income, and net investment income to see your NIIT liability, effective surtax rate, and a detailed breakdown.

Your total AGI including tax-exempt interest and certain foreign income adjustments.
Interest, dividends, capital gains, rental income, royalties, and non-qualified annuity income.

Real-World NIIT Scenarios

๐Ÿข High-Earning Professional with Investment Portfolio

A single software engineer has MAGI of $350,000 and net investment income of $60,000 from dividends, interest, and capital gains.

MAGI threshold for Single: $200,000

Excess MAGI = $350,000 - $200,000 = $150,000

Taxable Base = min($60,000, $150,000) = $60,000

NIIT = $60,000 ร— 3.8% = $2,280

Effective surtax rate on her investment income: 3.80% (full NIIT rate applies because her investment income is less than her excess MAGI).

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Married Couple with Rental Income

A married couple filing jointly has MAGI of $280,000 and net investment income of $100,000 from rental properties and capital gains.

MAGI threshold for MFJ: $250,000

Excess MAGI = $280,000 - $250,000 = $30,000

Taxable Base = min($100,000, $30,000) = $30,000

NIIT = $30,000 ร— 3.8% = $1,140

Effective surtax rate: 1.14% on their $100,000 investment income (only $30,000 of it is subject to the surtax because of the MAGI limitation).

๐Ÿ’ฐ Retiree with Large Capital Gain

A single retiree has MAGI of $210,000 (including a one-time capital gain of $50,000 from selling stock) and net investment income of $55,000.

MAGI threshold for Single: $200,000

Excess MAGI = $210,000 - $200,000 = $10,000

Taxable Base = min($55,000, $10,000) = $10,000

NIIT = $10,000 ร— 3.8% = $380

Only $10,000 of the capital gain triggers the surtax. The effective rate on total investment income is just 0.69%.

๐Ÿ“Š Comparison: Same Income, Different Filing Statuses

A taxpayer with MAGI of $300,000 and net investment income of $40,000.

If Single: Excess = $100,000 โ†’ NIIT = min($40K, $100K) ร— 3.8% = $1,520

If Married Filing Jointly: Excess = $50,000 โ†’ NIIT = min($40K, $50K) ร— 3.8% = $1,520

If Married Filing Separately: Excess = $175,000 โ†’ NIIT = min($40K, $175K) ร— 3.8% = $1,520

In this example, investment income is the binding constraint for all statuses โ€” the NIIT is the same $1,520 regardless of filing status.

Understanding the Net Investment Income Tax

The Net Investment Income Tax (NIIT) is a 3.8% Medicare surtax that applies to the lesser of your net investment income or the amount by which your Modified Adjusted Gross Income (MAGI) exceeds a threshold based on your filing status. It was introduced as part of the Affordable Care Act (ACA) and took effect in 2013.

The NIIT Formula

NIIT = 3.8% ร— min(Net Investment Income, MAGI โˆ’ Threshold)
Net Investment Income = Interest, dividends, capital gains, rental & royalty income, non-qualified annuity income, and passive business income
MAGI = Modified Adjusted Gross Income
Threshold = Filing-status-specific MAGI threshold (see below)

2025 NIIT Thresholds by Filing Status

Filing Status MAGI Threshold
Single $200,000
Head of Household (HOH) $200,000
Married Filing Jointly (MFJ) / Qualifying Widow(er) $250,000
Married Filing Separately (MFS) $125,000

How to Calculate NIIT Step by Step

1
Determine your MAGI threshold: Find the threshold for your filing status โ€” $200,000 (single/HOH), $250,000 (MFJ), or $125,000 (MFS)
2
Calculate excess MAGI: Subtract your threshold from your MAGI. If MAGI ≤ threshold, no NIIT is owed
3
Identify net investment income: Sum all investment income types โ€” interest, dividends, capital gains, rental income, royalties, and non-qualified annuity income
4
Find the taxable base: Take the lesser of your net investment income and your excess MAGI from step 2
5
Apply the 3.8% rate: Multiply the taxable base by 3.8% to get your NIIT liability

What Counts as Investment Income?

๐Ÿ“ˆ Included Income

Taxable interest, ordinary dividends, capital gain distributions, capital gains from selling assets, rental and royalty income, non-qualified annuity income, and passive business income.

๐Ÿšซ Excluded Income

Wages, salaries, self-employment income, unemployment compensation, Social Security benefits, tax-exempt interest, and distributions from qualified retirement plans (401(k), IRA, etc.).

๐Ÿ  Real Estate Exclusion

Gain on the sale of a principal residence that is excluded under Section 121 (up to $250K single / $500K MFJ) is also excluded from net investment income for NIIT purposes.

๐Ÿ’ผ Active Business Income

Income from a trade or business in which you materially participate is generally not treated as investment income for NIIT, unless it involves a passive activity.

Comparison Table: NIIT at Different Income Levels

The table below shows how NIIT varies for a single filer (threshold: $200,000) with different levels of MAGI and net investment income. Notice how the taxable base is always the lesser of the two amounts.

Scenario MAGI Net Inv. Income Excess MAGI Taxable Base NIIT Owed
Below threshold $180,000 $50,000 $0 $0 $0
Low excess, high investment income $220,000 $100,000 $20,000 $20,000 $760
High excess, low investment income $500,000 $15,000 $300,000 $15,000 $570
High excess, moderate investment income $400,000 $80,000 $200,000 $80,000 $3,040
Typical high-income scenario $350,000 $50,000 $150,000 $50,000 $1,900
MFS threshold lower $200,000 $40,000 $75,000 $40,000 $1,520
๐Ÿ’ฐ
NIIT Liability
Instantly compute your 3.8% Medicare surtax liability based on your filing status, MAGI, and net investment income using 2025 IRS thresholds.
๐Ÿ“Š
Effective Rate Analysis
See your effective surtax rate as a percentage of total investment income, helping you understand the true impact of NIIT on your portfolio.
๐Ÿ“‹
Income Breakdown
Understand what types of income are subject to the NIIT surtax โ€” interest, dividends, capital gains, rental income, royalties, and more.
๐Ÿ“ˆ
Comparison Scenarios
Compare NIIT liability across different income levels, filing statuses, and investment income amounts using the built-in comparison table.

What Is the Net Investment Income Tax (NIIT)?

The Net Investment Income Tax (NIIT) is a 3.8% surtax on investment income that applies to individuals, estates, and trusts with income above certain statutory thresholds. It was enacted as part of the Health Care and Education Reconciliation Act of 2010 (which amended the Affordable Care Act) and first took effect for tax years beginning after December 31, 2012. The NIIT is sometimes called the "Medicare surtax" or "unearned income Medicare contribution tax" because the revenue is directed to the Medicare Hospital Insurance Trust Fund.

Importantly, the NIIT is a surtax โ€” it is imposed in addition to any regular income tax you owe on your investment income. This means that investment income that is already subject to ordinary income tax rates or capital gains tax rates is also potentially subject to the additional 3.8% NIIT. For example, if you are in the 32% marginal tax bracket and owe NIIT, your effective tax rate on that investment income could be as high as 35.8%.

The NIIT applies to individuals with Modified Adjusted Gross Income exceeding $200,000 (single or head of household), $250,000 (married filing jointly or qualifying widow(er)), or $125,000 (married filing separately). These thresholds are not indexed for inflation โ€” they have remained unchanged since the tax was introduced in 2013 and are projected to remain at these levels for 2025.

Who Is Most Affected by NIIT?

High-income earners with significant investment portfolios are the most affected by the NIIT. This includes affluent professionals with substantial dividend and capital gain income, real estate investors with rental income, retirees with large retirement account distributions that push their MAGI above the threshold, and business owners who generate passive income from their investments. The surtax is particularly impactful for residents of high-tax states, where the combined federal, state, and NIIT burden on investment income can exceed 50% in some cases.

A common misconception is that the NIIT only applies to "wealthy" investors. In reality, a middle-income taxpayer who sells a highly appreciated asset โ€” such as a vacation home or a stock portfolio that has grown significantly โ€” can trigger the surtax in a single tax year. This is why tax planning around the timing of capital gains realization is so important for anyone approaching the MAGI thresholds.

When to Use the NIIT Calculator

Our NIIT calculator is designed for a wide range of real-world tax planning scenarios. Here are the most common situations where this tool provides valuable insights:

๐Ÿ“… Year-End Tax Planning

Before December 31, estimate your current-year NIIT liability to decide whether to realize additional capital gains or defer them to the next tax year. Knowing your MAGI "headroom" helps you make informed selling decisions.

๐Ÿก Real Estate Transaction Planning

When selling rental property or a second home, calculate the potential NIIT impact on your capital gain. The gain on a principal residence is excluded up to $250K/$500K, but gains on investment properties are fully subject to NIIT.

๐Ÿ’ผ Retirement Distribution Strategy

Large IRA or 401(k) distributions can push your MAGI above the NIIT threshold. Model different withdrawal amounts to minimize the combined tax burden from regular income tax and the NIIT surtax.

๐Ÿ“Š Portfolio Rebalancing

When rebalancing a taxable investment portfolio, compare the NIIT impact of selling appreciated assets versus holding and collecting dividends. Strategic tax-loss harvesting can offset gains and reduce NIIT exposure.

๐Ÿ‘ซ Marriage & Filing Status Changes

Getting married or divorced changes your filing status, which affects your NIIT threshold. Compare the NIIT implications of different filing statuses before year-end to optimize your tax outcome.

๐Ÿข Small Business Passive Income

If you own a business but do not materially participate in its operations, the income may be classified as passive investment income subject to NIIT. Use this calculator to estimate the surtax on your passive business earnings.

Frequently Asked Questions

Does NIIT apply to tax-exempt municipal bond interest?
No. Interest income from municipal bonds (state and local government bonds) that is exempt from regular federal income tax is also excluded from net investment income for NIIT purposes. However, tax-exempt interest is included in your Modified Adjusted Gross Income (MAGI) when determining whether your MAGI exceeds the threshold. This means that while the interest itself is not taxed by NIIT, it can push your MAGI above the threshold, causing other investment income to become subject to the surtax.
Does NIIT apply to retirement account distributions like 401(k) and IRA?
Generally, no. Distributions from qualified retirement plans โ€” including 401(k)s, traditional IRAs, Roth IRAs, 403(b) plans, and similar accounts โ€” are not considered net investment income for NIIT purposes. However, these distributions do count toward your MAGI, which means they can push your total income above the threshold and cause your other investment income to become subject to NIIT. For example, a large Required Minimum Distribution (RMD) from a traditional IRA could increase your MAGI enough to trigger NIIT on dividend and capital gain income from your taxable accounts.
What is the difference between NIIT and the Additional Medicare Tax?
The NIIT (3.8%) and the Additional Medicare Tax (0.9%) are two separate surtaxes created by the Affordable Care Act, and they apply to different types of income. The NIIT applies to investment income (interest, dividends, capital gains, etc.) for high-income taxpayers. The Additional Medicare Tax applies to earned income (wages, salaries, self-employment income) above $200,000/$250,000. Both use the same MAGI threshold structure, but they tax different income sources. It is possible to owe both surtaxes in the same year if you have both high earned income and high investment income.
Can I avoid NIIT by keeping my MAGI below the threshold?
Yes, in many cases. Since the NIIT only applies when your MAGI exceeds the filing-status-specific threshold, reducing your MAGI is the most direct way to minimize or eliminate the surtax. Strategies include: maximizing pre-tax retirement contributions (401(k), traditional IRA, HSA), using tax-loss harvesting to offset capital gains, investing in tax-exempt municipal bonds, managing the timing of asset sales to spread gains across multiple tax years, and converting traditional IRA assets to Roth IRA strategically (though Roth conversions themselves increase MAGI in the year of conversion). For married couples, filing separately generally reduces the threshold to $125,000 per spouse, which can sometimes result in lower combined NIIT compared to filing jointly, depending on the income split.
How is NIIT reported on my tax return?
The NIIT is reported on Form 8960 (Net Investment Income Tax โ€” Individuals, Estates, and Trusts) and is filed as an attachment to your Form 1040. You must file Form 8960 if your MAGI exceeds the applicable threshold for your filing status and you have net investment income. The form walks you through calculating your MAGI, identifying your net investment income, determining the taxable base, and applying the 3.8% rate. The total tax from Form 8960 is then transferred to your Form 1040 (Schedule 2, line 11) and is included in your total tax liability. The IRS has published detailed instructions for Form 8960, including worksheets and examples for complex situations.
Does NIIT apply to trusts and estates?
Yes. The NIIT also applies to estates and trusts. For an estate or trust, the threshold is the dollar amount at which the highest tax bracket begins for estates and trusts for the tax year. For 2025, this threshold is approximately $15,650 (indexed annually for inflation). This means that trusts and estates with undistributed net investment income and adjusted gross income above this relatively low threshold may owe NIIT. The surtax is computed on the lesser of the trust's undistributed net investment income or the excess of its adjusted gross income over the threshold amount.

โš ๏ธ Important Warning: The Net Investment Income Tax (NIIT) is a surtax โ€” it is imposed in addition to your regular income tax on investment income. It does not replace any existing taxes. The NIIT is separate from the Additional Medicare Tax on earned income. This calculator provides estimates based on 2025 thresholds and is for educational and planning purposes only. Tax laws are complex and subject to change. Consult a qualified tax professional for personalized advice regarding your specific tax situation. The IRS Form 8960 instructions should be consulted for complete rules and exceptions.