Pay Medicare Tax Capital Gains Guide – If you’re selling stocks, real estate, or other investments in the US and have higher income, you may owe an additional Medicare tax on capital gains known as the Net Investment Income Tax (NIIT). This 3.8% surtax applies on top of regular capital gains taxes and can significantly impact your tax bill. This comprehensive guide explains everything you need to know about paying Medicare tax on capital gains for tax years 2025 and 2026, based on official IRS guidance.
Whether you’re a single filer, married couple, or investor planning a large sale, understanding the rules helps you avoid surprises and plan smarter.
What Is the Medicare Tax on Capital Gains?
The Medicare tax on capital gains refers to the 3.8% Net Investment Income Tax (NIIT). Enacted under the Affordable Care Act, it applies to certain investment income—including capital gains—for higher-income individuals, estates, and trusts.
Unlike the 1.45% Medicare payroll tax on wages (or the 0.9% Additional Medicare Tax on earned income), the NIIT targets unearned investment income such as:
- Capital gains from stocks, bonds, mutual funds, and real estate
- Dividends and interest
- Rental and royalty income
- Passive business income
It is not a payroll tax and does not apply to wages or active business income. The NIIT stacks on top of your regular federal capital gains tax rates (0%, 15%, or 20%).
Who Has to Pay the 3.8% NIIT on Capital Gains?
You owe the Medicare tax on capital gains only if both conditions are met:
- You have net investment income (including capital gains)
- Your modified adjusted gross income (MAGI) exceeds the IRS thresholds
The NIIT applies to US citizens, resident aliens, estates, and certain trusts. It does not apply to non-resident aliens in most cases.
2025–2026 NIIT Income Thresholds (Unchanged Since 2013)
The MAGI thresholds are not adjusted for inflation and remain fixed:
- Single or Head of Household: $200,000
- Married Filing Jointly or Qualifying Surviving Spouse: $250,000
- Married Filing Separately: $125,000
These limits apply to your MAGI (generally your AGI plus any foreign earned income exclusion). If your MAGI is below the threshold, you owe zero NIIT—even on large capital gains.
Pro Tip: These thresholds are based on MAGI, not taxable income. High deductions or retirement contributions can help keep you under the limit.
How to Calculate Medicare Tax on Capital Gains?
The NIIT equals 3.8% of the lesser of:
- Your total net investment income (NII), or
- The amount by which your MAGI exceeds the threshold
Simple Example
- Married couple filing jointly: MAGI = $280,000 (threshold = $250,000)
- Net investment income (mostly long-term capital gains) = $60,000
- Excess MAGI = $30,000
- NIIT owed = 3.8% × $30,000 = $1,140
You pay the tax only on the smaller amount. Use IRS Form 8960 to calculate it precisely.
Short-Term vs. Long-Term Capital Gains and the NIIT
- Long-term capital gains (assets held >1 year): Taxed at preferential rates of 0%, 15%, or 20% + possible 3.8% NIIT
- Short-term capital gains (assets held ≤1 year): Taxed as ordinary income (up to 37%) + possible 3.8% NIIT
The NIIT applies equally to both short-term and long-term gains if you meet the income test. For 2025 tax year (returns filed in 2026), most taxpayers pay no more than 15% on long-term gains unless taxable income exceeds roughly $533,400 (single) or $600,050 (joint).
How to Report and Pay the Medicare Tax on Capital Gains?
- Calculate your net investment income and MAGI.
- Complete Form 8960 (Net Investment Income Tax—Individuals, Estates, and Trusts).
- Attach Form 8960 to your Form 1040 or 1040-SR.
- Report the tax on Schedule 2 (Form 1040), line 12.
- Pay any balance due when you file (or via quarterly estimated taxes to avoid penalties).
Download the latest Form 8960 and instructions directly from IRS.gov. Tax software like TurboTax or professional preparers automatically handle this for most filers.
Special Cases: Home Sales and Other Exclusions
Good news for homeowners: The NIIT does not apply to capital gains excluded under the Section 121 exclusion ($250,000 single / $500,000 joint on your primary residence). Only any taxable gain above the exclusion counts toward net investment income.
Other exclusions include:
- Tax-exempt interest (municipal bonds)
- Distributions from qualified retirement accounts (IRAs, 401(k)s)
- Social Security benefits and veterans’ benefits
Proven Strategies to Minimize or Avoid Medicare Tax on Capital Gains
Smart planning can reduce or eliminate the 3.8% NIIT:
- Tax-loss harvesting: Sell losing investments to offset gains and lower net investment income.
- Defer gains: Use 1031 exchanges for real estate or Opportunity Zone investments.
- Donate appreciated assets: Give stocks directly to charity instead of selling (avoids both capital gains tax and NIIT).
- Maximize retirement contributions: Lower your MAGI with traditional IRA or 401(k) contributions.
- Invest in municipal bonds: Interest is excluded from both MAGI and net investment income.
- Timing sales: Spread large gains across multiple years to stay under thresholds.
- Roth conversions: Strategic planning in lower-income years (consult a tax advisor).
Always consult a qualified tax professional—these strategies depend on your full financial picture.
Frequently Asked Questions About Medicare Tax on Capital Gains
Is the Medicare tax on capital gains the same as the Additional Medicare Tax?
No. The 0.9% Additional Medicare Tax applies only to wages and self-employment income. The 3.8% NIIT is separate and targets investment income.
Do I owe NIIT if I’m retired?
Yes, if your MAGI (including investment income) exceeds the thresholds.
Does the NIIT apply to crypto or NFT sales?
Yes—treated as capital assets, so gains count as net investment income.
Can I claim the NIIT as a deduction?
No, it is not deductible against regular income tax.
Final Tips for US Investors in 2026
The Medicare tax on capital gains remains a key consideration for anyone with investment income above the fixed thresholds. By understanding Form 8960, tracking your MAGI, and using legal tax-planning strategies, you can keep more of your hard-earned investment profits.
For the most accurate advice, review your situation with a CPA or enrolled agent and always refer to the latest IRS Form 8960 instructions. Tax laws can evolve, but the core NIIT rules have remained stable for over a decade.
Disclaimer: This guide is for educational purposes only and is not tax or financial advice. Consult a licensed professional for your specific circumstances.
Stay informed and file on time—your future self (and your wallet) will thank you!