Yes, if your income is high enough, you pay an extra 3.8% federal tax on capital gains under the Affordable Care Act. The Obamacare tax on capital gains is officially called the Net Investment Income Tax (NIIT), and it kicks in when your modified adjusted gross income crosses $200,000 for single filers or $250,000 for married couples filing jointly.1Internal Revenue Service. Net Investment Income Tax The tax has been in effect since January 1, 2013, and because Congress never indexed those thresholds to inflation, more people fall into it every year.2Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Who Actually Owes the 3.8% on Capital Gains
The tax doesn’t hit your entire capital gain automatically. You pay 3.8% on the smaller of two figures: your net investment income for the year, or the amount your MAGI exceeds the threshold for your filing status.1Internal Revenue Service. Net Investment Income Tax
Your MAGI is generally your adjusted gross income with certain foreign-earned-income exclusions added back.3Internal Revenue Service. Modified Adjusted Gross Income Once it clears the threshold, the surtax applies:
- Married filing jointly or qualifying surviving spouse: $250,000
- Single or head of household: $200,000
- Married filing separately: $125,000
These numbers haven’t moved since 2013 and the statute contains no inflation adjustment.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax A household income that looked comfortably upper-tier when the tax was written now catches many dual-earner professionals who wouldn’t consider themselves wealthy.
Capital gains count as net investment income whether they come from selling stocks, bonds, mutual fund shares, or investment real estate.2Internal Revenue Service. Questions and Answers on the Net Investment Income Tax What doesn’t count: gains inside a 401(k), traditional or Roth IRA, 403(b), or governmental 457(b), since distributions from those accounts are excluded from NII entirely.5Internal Revenue Service. 2025 Instructions for Form 8960 – Net Investment Income Tax Gains from selling a business you actively run are also excluded, since active business income falls outside the NIIT.
What the Combined Rate Looks Like
The 3.8% stacks directly on top of your regular federal capital gains rate. For long-term gains, meaning assets held longer than a year, the base federal rates for 2026 are 0%, 15%, or 20% depending on taxable income.6Internal Revenue Service. Topic No. 409, Capital Gains and Losses The 20% bracket starts at $545,500 for single filers and $613,700 for married joint filers.7Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Add the NIIT and the top federal rate on long-term gains reaches 23.8%.
Short-term gains are worse. Assets held one year or less get taxed at ordinary income rates, topping out at 37% for 2026.7Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 With the 3.8% surtax layered on, a high-income taxpayer can face a combined federal rate of 40.8% on short-term gains. That gap between 23.8% and 40.8% is a strong reason to hold appreciated positions past the one-year mark when the option exists.
State taxes come on top of all of this. Most states tax capital gains as ordinary income, and the total federal-plus-state bill on short-term gains can exceed 50% in the highest-tax states.
Selling Your Home
The sale of a primary residence doesn’t automatically create NIIT exposure. Federal law lets you exclude up to $250,000 of gain on a home sale, or $500,000 for married couples filing jointly, if you owned and lived in the home for at least two of the five years before the sale.8Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence The excluded portion is ignored for NIIT purposes.2Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Gain above the exclusion does count as investment income, and the recognized gain can push your MAGI over the threshold even if your ordinary income wouldn’t have. Take a married couple with $200,000 in ordinary income who sell their home for a $600,000 profit. The first $500,000 is excluded. The remaining $100,000 is NII, and it lifts MAGI to $300,000. The MAGI excess over the joint threshold is $50,000. The NIIT is 3.8% of the smaller number, $50,000, for a bill of $1,900.2Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Investment properties and second homes get no such exclusion. The entire gain counts as NII.
Working the Numbers
The “lesser of” rule cuts both ways, and running two quick scenarios shows why.
Scenario one: A single filer with $270,000 in MAGI and $90,000 in capital gains from a passive partnership interest. The MAGI excess over the $200,000 threshold is $70,000. Since $70,000 is less than the $90,000 in NII, the tax base is $70,000. NIIT owed: $2,660.2Internal Revenue Service. Questions and Answers on the Net Investment Income Tax
Scenario two: A single filer with $205,000 MAGI and $40,000 of investment income. The MAGI excess is $5,000. Even though NII is $40,000, the tax base is the smaller figure. NIIT owed: $190.
If your MAGI is below the threshold, you owe nothing regardless of how large your capital gains are. If your MAGI is above the threshold but your investment income is small, the tax is capped at 3.8% of the actual investment income.
Net investment income is a net figure. You can subtract deductions allocable to that income before applying the 3.8% rate, including investment interest expense, rental property costs like depreciation and repairs, investment advisory fees, and the portion of state income tax attributable to investment income.9eCFR. 26 CFR 1.1411-4 – Definition of Net Investment Income Each dollar of deduction removes a dollar from the tax base.
Ways to Reduce What You Owe
The tax has two levers, MAGI and net investment income, and shrinking either shrinks the bill.
- Harvest capital losses. Selling losers to offset winners reduces net investment income directly. Loss carryforwards from earlier years work the same way.
- Use tax-deferred accounts. Contributions to 401(k)s, traditional IRAs, and HSAs lower MAGI and may drop you back under the threshold. Growth inside these accounts also stays outside the NIIT.
- Time large gains across years. Splitting a big sale over two tax years can keep each year’s MAGI closer to the threshold, reducing the total surtax compared to taking the gain all at once.
- Donate appreciated assets. Gifting stock or property directly to charity, or through a charitable remainder trust, avoids realizing the gain, removing it from both NII and MAGI.
- Claim every allocable deduction. Rental depreciation, margin interest, and advisory fees are often overlooked and reduce the base before the 3.8% is applied.
- Convert passive to active. If your investment income comes from a partnership or S corporation where you’re a silent partner, increasing your involvement to meet the material participation standard reclassifies that income as active business income, which is excluded.
Filing and Estimated Payments
You report the NIIT on IRS Form 8960 and attach it to your return whenever your MAGI exceeds the threshold.5Internal Revenue Service. 2025 Instructions for Form 8960 – Net Investment Income Tax Skipping the form or underreporting the tax can trigger penalties and interest.
The 3.8% isn’t withheld automatically. If you expect to owe it, adjust your W-4 or make quarterly estimated payments.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax The usual safe harbor applies: you avoid underpayment penalties if your total payments cover at least 90% of the current year’s liability or 100% of last year’s tax (110% if your prior-year AGI was above $150,000).10Internal Revenue Service. 2025 Instructions for Form 2210 – Underpayment of Estimated Tax by Individuals, Estates, and Trusts Penalties are calculated quarter by quarter, so catching up in December doesn’t erase a shortfall from April.
The problem shows up most often in years with a one-time capital gain: selling a business, unwinding a large stock position, or closing on an investment property. Regular payroll withholding covers salary just fine and leaves the surtax on the gain uncovered.
A Note on Trusts
The individual thresholds don’t carry over to trusts and estates. They owe the 3.8% on undistributed net investment income once their AGI exceeds the top trust bracket, which starts at just $16,000 for 2026.4Internal Revenue Service. Topic No. 559, Net Investment Income Tax If you’re a trustee or beneficiary dealing with capital gains inside a trust, the math is very different from an individual return, and income distributed to beneficiaries is taxed on their returns rather than the trust’s.