Will You Have to Pay the 3.8% Medicare Tax When You Sell Your House?

Find out about the Medicare tax on unearned income.

By , J.D. USC Gould School of Law
Updated 10/16/2024

Under the Patient Protection And Affordable Care Act (the "Affordable Care Act"), high-income taxpayers are subject to a Medicare tax on their "unearned income." This tax is also called the "net investment income tax" (NIIT). It helps fund the Affordable Care Act. Here's how the tax works.

What Is the NIIT?

The NIIT is a separate 3.8% income tax on unearned income (that is, income other than from a job or business in which you actively participate). Those subject to it, primarily higher-income taxpayers, must pay it in addition to their regular income taxes.

The NIIT isn't a tax on real estate transactions, so you don't have to calculate it or pay it when you buy or sell property. However, any gain you realize when you sell, for example, rental property might be subject to the tax— but it won't be due until you pay your income taxes for the year.

The Medicare Tax Only Affects High-Income Taxpayers

The tax applies only to people with relatively high incomes. If you're single, you must pay the tax only if your adjusted gross income (AGI) is over $200,000. Married taxpayers filing jointly must have an AGI over $250,000 to be subject to the tax. The threshold is $125,000 for married couples filing separately.

Your adjusted gross income is the number on the bottom of your IRS Form 1040. It consists of your income from almost all sources, including wages, interest income, dividend income, income from certain retirement accounts, capital gains, alimony received, rental income, royalty income, and unemployment compensation, reduced by certain "above the line" deductions such as IRA contributions and one-half of self-employment taxes.

What Income Is Taxed?

Even if your AGI exceeds the $200,000/$250,000 threshold, you'll be subject to the NIIT only if you have "net investment income." Indeed, you could earn millions of dollars and if none of it is net investment income you won't have to pay the tax.

Net investment income consists of:

  • net rental income (rents minus expenses)
  • income from investments, including interest, dividends, and annuities
  • income from any business in which you don't materially participate (aren't active in running), including real estate limited partnerships and other real estate investment businesses, and
  • net capital gains (gains less capital losses) you earn upon the sale of property that isn't part of an active business, including rental property, stocks and bonds, and mutual funds.

Net investment income doesn't include:

  • income from a business in which you materially participate (actively run), any self-employment income, or wages you earn from employment (this exception doesn't apply to rental activities, even if you materially participate in them; an exception is if you're a real estate professional)
  • tax-exempt income such as income from tax-exempt bonds, the amount of profit excluded from tax when you sell your principal residence ($250,000 for singles, $500,000 for married couples filing jointly), or income earned from renting your home for no more than 14 days during the year
  • withdrawals from retirement plans such as traditional or Roth IRAs, 401(k)s, or payouts from traditional defined-benefit pension plans, or
  • life insurance proceeds, veterans benefits, Social Security benefits, alimony, or unemployment benefits.

The Tax Is Imposed Only On a Portion of Investment Income

The Medicare tax is a 3.8% tax, but it is imposed only on a portion of a taxpayer's income. The tax is paid on the lesser of (1) the taxpayer's net investment income, or (2) the amount the taxpayer's AGI exceeds the applicable AGI threshold ($200,000 or $250,000).

Example. Burton, a single taxpayer, has a job that pays him $300,000 in wages. He also earned $50,000 in net investment income during the year. His AGI is $350,000. Burton must pay the 3.8% NIIT on the lesser of (1) his $50,000 of net investment income, or (2) the amount his $350,000 AGI exceeds the $200,000 threshold for single taxpayers—$150,000. Because $50,000 is less than $150,000, he must pay the 3.8% tax on $50,000. His NIIT for the year is $1,900 (3.8% × $50,000 = $1,900).

You only have to pay the NIIT on income that is more than the $200,000/$250,000 threshold. So, for those at the lower end of the AGI threshold, the NIIT is fairly small. For example, a single taxpayer with a $201,000 AGI, including $50,000 in rental income, would only pay the 3.8% tax on $1,000, for a $38 tax.

Getting Help With Your Taxes

If you need more help, talk to a tax professional, such as a certified public accountant or a tax attorney.

Talk to a Tax Attorney

Need a lawyer? Start here.

How it Works

  1. Briefly tell us about your case
  2. Provide your contact information
  3. Choose attorneys to contact you
Get Professional Help
Talk to a Tax attorney.
How It Works
  1. Briefly tell us about your case
  2. Provide your contact information
  3. Choose attorneys to contact you