Your capital gains may be subject to the 3.8% net investment income tax in addition to other income tax. You calculate this tax on the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds your filing status threshold. Gain excluded from your gross income for regular income tax purposes is also excluded from this tax.
How the tax applies to your capital gains
The net investment income tax, or NIIT, applies to individual taxpayers effective January 1, 2013. Your rate is 3.8%. Section 1411 imposes this tax in addition to other tax imposed under the income tax subtitle.
Your net investment income can include net gain from disposing of property, to the extent that gain is taken into account in computing taxable income. Your property gain is excluded under the business property exception when the property is held in a trade or business that is neither passive for you under section 469 nor a business trading financial instruments or commodities as defined in section 475(e)(2). Your gain from selling stock is among the capital gains that can be subject to NIIT.
Your calculation depends on both your net investment income and your modified adjusted gross income. Having capital gains does not by itself establish the amount subject to NIIT. The tax applies to the smaller of your net investment income and your income above the applicable threshold, if any.
Your income threshold depends on your filing status
You compare your modified adjusted gross income with the statutory threshold for your filing status. These thresholds are not indexed for inflation.
What modified adjusted gross income means for NIIT
For each taxable year, your modified adjusted gross income determines whether you have an excess over the threshold used in the NIIT calculation.
You use this modified adjusted gross income figure to determine your excess over the filing status threshold. Your net investment income is the separate figure used in the other part of the calculation.
What you include in net investment income
Your net investment income includes more than capital gains. Its statutory definition starts with specified gross income and net gain, then subtracts allowed deductions properly allocable to that income or gain. The result is the excess, if any.
Your specified income includes interest, dividends, annuities, royalties, and rents. An exception applies when that income is derived in the ordinary course of a trade or business outside the business categories covered by section 1411. Other gross income from a business within those covered categories is also included.
For your asset disposals, count only net gain included in your taxable income. It excludes gain attributable to property held in a trade or business outside the covered business categories. Rental income and other income from passive activities may be part of your net investment income.
You subtract deductions allowed under the income tax subtitle only when they are properly allocable to the included gross income or net gain. This deduction requirement is part of the statutory definition of net investment income.
How the business property exception applies
Your net gain calculation under section 1411 excludes gain attributable to property held in a trade or business not described in paragraph (2) of that section.
The participation tests relevant to your business activity
Your rental income is included in net investment income if your rental activity is not a section 162 trade or business or you do not materially participate, and qualifying as a real estate professional does not by itself establish a trade or business. You need both figures for this yearly comparison: investment receipts and gains after qualifying deductions, and modified adjusted gross income exceeding the filing limit. Your statutory investment income calculation combines specified gross income with net gain before subtracting properly allocable deductions allowed under the income tax subtitle. For your interest receipts, the ordinary course exception applies when the income comes from a trade or business not described in section 1411, paragraph (2). Your dividends fall within the same statutory income category and carry that ordinary course business exception. For your annuity income, inclusion likewise depends on the exception for income derived in the ordinary course of a business outside paragraph (2). Your royalties are also among the listed income types, subject to that exception for qualifying ordinary course business income. You omit rent earned in ordinary business operations when the enterprise falls outside section 1411, paragraph (2). Your other gross income from a trade or business described in paragraph (2) forms a separate part of the statutory sum. For your property dispositions, the statute includes net gain only to the extent taken into account in computing taxable income, with an exception for property held in a business not described in paragraph (2). You can subtract an expense here only if the income tax subtitle permits its deduction and you can properly allocate it to counted receipts or gains. You have net investment income under this definition only to the extent the specified income and net gain exceed those properly allocable deductions.
How your home sale exclusion affects NIIT
You do not include gain in NIIT when that gain is excluded from gross income for regular income tax purposes. This rule applies to gain excluded under section 121 on the sale of your principal residence.
The section 121 exclusion described in the approved source covers the first $250,000 of gain, or $500,000 for a married couple. When your gain is excluded under that provision, the excluded amount is also outside NIIT.
Distributions and income excluded from your net investment income
Your net investment income does not include distributions from plans or arrangements described in sections 401(a), 403(a), 403(b), 408, 408A, or 457(b). The statutory exception applies to any distribution from a plan or arrangement described in those sections.
Your net investment income also excludes an item taken into account in determining your self employment income for the same taxable year when tax is imposed on that income under section 1401(b). The exception depends on both the same year requirement and the section 1401(b) tax requirement.
How you calculate the amount subject to NIIT
You first determine your net investment income for the taxable year. You separately determine how much, if any, your modified adjusted gross income exceeds your filing status threshold. You then apply 3.8% to the smaller amount.
If your modified adjusted gross income does not exceed your threshold, you have no excess subject to this calculation. If it exceeds the threshold, the amount taxed still cannot exceed your net investment income for the year.
If you file for an estate or trust
If you calculate NIIT for an estate or trust, you use undistributed net investment income. The other side of the comparison is the excess, if any, of adjusted gross income as defined in section 67(e) over the amount at which the highest estate or trust tax bracket begins for that taxable year.
You apply the 3.8% rate to the lesser of those amounts. For tax year 2025, the estate and trust threshold is $15,650. An estate or trust with adjusted gross income below $15,650 is not subject to NIIT for that year.
How you report and pay the tax
You use Form 8960 and its instructions to compute NIIT. If you file as an individual, the tax is reported on, and paid with, your Form 1040. If you file for an estate or trust, you report and pay it with Form 1041.
Your NIIT is subject to estimated tax provisions. If you expect to be subject to NIIT as an individual or when filing for an estate or trust, the IRS states that you should adjust income tax withholding or estimated payments to account for the tax increase and avoid underpayment penalties.
Illustrative example of the lesser amount calculation
Illustrative example: You file jointly and have modified adjusted gross income of $300,000 and net investment income of $225,000. Your $250,000 threshold leaves an excess of $50,000. You compare that $50,000 with your $225,000 of net investment income. The smaller amount is $50,000, so your NIIT is $1,900, calculated as $50,000 multiplied by 3.8%.
From Richard C. Wilson
Tom Wheelwright on Active vs. Passive Income for Taxation IRS Reporting
Questions
Can your rental income be subject to NIIT?
Does your filing threshold rise with inflation?
Do you pay NIIT on home sale gain excluded under section 121?
Can your trader fund losses offset other net investment income?
Sources
- 26 U.S. Code Section 1411, Imposition of tax
- Questions and Answers on the Net Investment Income Tax
- Net Investment Income Tax
- Revisiting the Choice of Entity Decision After OBBBA's 2025 Tax Law Changes | Part 1
- Capital Gains Distributions: How Fund Payouts Are Taxed 2026
- Publication 527 (2025), Residential Rental Property
- Instructions for Form 8960 (2025)
- Topic no. 559, Net investment income tax
- With Net Investment Income, as Many Questions as Answers
