Net Investment Income Tax: How to Calculate What You Owe

The net investment income tax (NIIT) is a flat 3.8% tax that applies when your income crosses certain thresholds and you have investment income. You calculate it by comparing two numbers, your net investment income and the amount your modified adjusted gross income (MAGI) exceeds your filing-status threshold, then multiplying the smaller of those two numbers by 3.8%. The math itself is straightforward once you know which income counts and which deductions reduce it.

Who Owes the Tax

The NIIT only kicks in if two conditions are true in the same tax year: you have net investment income, and your MAGI is above the threshold for your filing status. Those thresholds are:

  • Single or head of household: $200,000
  • Married filing jointly or qualifying surviving spouse: $250,000
  • Married filing separately: $125,000

These thresholds are not adjusted for inflation, so they’ve remained the same since the tax took effect in 2013. That means more taxpayers cross them each year as wages and investment returns grow. If your MAGI falls below your threshold, you owe nothing regardless of how much investment income you have.

What Counts as Investment Income

Gross investment income includes interest, dividends, capital gains, rental and royalty income, and income from non-qualified annuities. If you sell stocks at a profit, collect rent on a property you own, or earn dividends from a brokerage account, all of that flows into the calculation.

Several common income sources are excluded. Distributions from qualified retirement accounts like 401(k)s and IRAs are not subject to the NIIT (though they still count toward your MAGI, which can push you over the threshold). Tax-exempt municipal bond interest is also excluded. Wages, self-employment income from a business in which you actively participate, Social Security benefits, and alimony are not considered investment income for NIIT purposes. However, wages and self-employment income do increase your MAGI, so a big bonus year can indirectly trigger the tax on investment income that would otherwise escape it.

Deductions That Reduce Net Investment Income

You don’t pay the 3.8% on your gross investment income. You first subtract deductions that are “properly allocable” to that income, meaning expenses directly tied to producing it. What remains is your net investment income. Eligible deductions include:

  • Investment interest expense: interest on money borrowed to buy taxable investments
  • Investment advisory and brokerage fees
  • Rental and royalty expenses: property management costs, depreciation, repairs, and insurance on rental properties
  • State and local income taxes allocable to investment income
  • Tax preparation fees related to investment income

Keep in mind that the Tax Cuts and Jobs Act suspended the miscellaneous itemized deduction for unreimbursed expenses through 2025, which limits some of these deductions on your regular return. However, for NIIT purposes, certain properly allocable expenses can still reduce net investment income even when they aren’t deductible elsewhere. The instructions for Form 8960 walk through exactly which deductions apply.

The Calculation Step by Step

Here’s the formula broken into clear steps. Suppose you’re a single filer with a MAGI of $260,000 and $45,000 in net investment income.

Step 1: Find your net investment income. Add up all qualifying investment income (interest, dividends, capital gains, rental income, royalties, non-qualified annuity income). Subtract any properly allocable deductions. In this example, that number is $45,000.

Step 2: Calculate your excess MAGI. Subtract your filing-status threshold from your MAGI. For a single filer: $260,000 minus $200,000 equals $60,000.

Step 3: Take the smaller number. Compare net investment income ($45,000) to the excess MAGI ($60,000). The smaller amount is $45,000.

Step 4: Multiply by 3.8%. $45,000 times 0.038 equals $1,710. That’s the NIIT you owe.

This design means you never pay more than 3.8% of your actual investment income, and you never pay more than 3.8% of the amount your income exceeds the threshold. The tax targets whichever figure is lower.

A Second Example: When Excess MAGI Is Lower

Now suppose you’re married filing jointly with a MAGI of $270,000 and $80,000 in net investment income. Your excess MAGI is $270,000 minus $250,000, which is $20,000. Your net investment income ($80,000) is much larger, so you use the smaller number: $20,000. Multiply $20,000 by 3.8%, and the tax is $760. Even though you had $80,000 in investment income, you’re only taxed on the $20,000 slice that pushed you above the threshold.

How to Report It: Form 8960

You report and calculate the NIIT on IRS Form 8960, which you attach to your Form 1040. The form has three parts. Part I totals your investment income and subtracts allocable deductions to arrive at net investment income. Part II computes your MAGI and subtracts your threshold. Part III compares the two figures, takes the smaller one, and multiplies by 3.8%.

Your tax software will typically generate Form 8960 automatically if your income triggers it. If you’re filing by hand or reviewing your return, pull the form’s instructions from the IRS website. They specify line by line which types of income go where and which deductions to include.

Ways to Reduce the Tax

Because the NIIT depends on two variables, you can reduce it by lowering either your net investment income or your MAGI. A few practical strategies:

Contributing more to pre-tax retirement accounts like a 401(k) or traditional IRA reduces your MAGI directly. If that contribution pushes your MAGI below your threshold, you eliminate the NIIT entirely.

Harvesting capital losses offsets capital gains, which reduces net investment income. If you sell a losing investment to offset a winning one, the gain that flows into the NIIT calculation shrinks accordingly.

Shifting some investments into tax-exempt municipal bonds removes that income from the NIIT calculation, since municipal bond interest is excluded from gross investment income.

Timing matters too. If you’re close to the threshold, bunching income into a year when you’ll already be over (or deferring it into a year when you’ll be under) can change whether the tax applies. For example, delaying the sale of an appreciated asset into a year when your other income is lower could keep your MAGI below the line.

NIIT and Estimated Tax Payments

The NIIT is not withheld from paychecks or investment distributions automatically. If you expect to owe it, you should factor it into your quarterly estimated tax payments or ask your employer to increase your income tax withholding using Form W-4. Underpaying throughout the year can result in an estimated tax penalty when you file.