So let’s talk about a tax that most people have never heard of until the year it costs them tens of thousands of dollars. It’s called the Net Investment Income Tax, or NIIT, and if you’ve owned your Bay Area home for twenty or thirty years and you’re starting to think about selling, this one has your name on it. I bring it up with nearly every longtime homeowner I sit down with, and the reaction is almost always the same: a long pause, and then some version of “wait, there’s another one?”
Yes, there’s another one. The good news is that the NIIT is one of the more manageable taxes in the stack if you see it coming. The bad news is that almost nobody sees it coming, because for most of your life it simply doesn’t apply to you, and then in one single year, the year you sell the house, it shows up with its hand out. Let’s walk through what it is, who it hits, why it exists in the first place, and what you can actually do about it.
Key Takeaways
Summary: The Net Investment Income Tax adds 3.8% to the taxable gain when a longtime Bay Area homeowner sells, because the sale pushes income past thresholds that haven’t moved since 2013. Rebuilding your cost basis, timing the sale for a low-income year, and spreading the gain across tax years are the main ways to reduce it, and they work best when planned years ahead.
What Is the Net Investment Income Tax?
The Net Investment Income Tax is a 3.8% federal surtax on investment income, created under Section 1411 of the Internal Revenue Code. It sits on top of your regular capital gains tax; it doesn’t replace anything, it just stacks. Think of it as a toll booth that only appears on the road once your income crosses a certain line.
Here’s the mechanical part, and it’s worth understanding because the mechanics are where the planning opportunities live. The NIIT applies to the lesser of two numbers: your net investment income for the year, or the amount by which your modified adjusted gross income (MAGI) exceeds a threshold. That threshold is $200,000 for single filers and $250,000 for married couples filing jointly. Whichever of those two numbers is smaller, you pay 3.8% of it.
And what counts as investment income? More than you’d think. Interest, dividends, capital gains, rental income, royalties, annuity income, and passive business income all land in the bucket. What doesn’t count is just as important: wages, Social Security benefits, self-employment income from a business you actively run, and distributions from retirement accounts like your 401(k) or IRA. Keep that last one in mind, though, because there’s a wrinkle. Retirement account distributions aren’t investment income themselves, but they do raise your MAGI, which can push you over the threshold and expose your other investment income to the tax. It’s a bit like a teammate who never scores but keeps setting up the other team; you have to watch him anyway.
Who Does the NIIT Impact?
On paper, the NIIT is a tax on high earners. A $250,000 threshold for a married couple sounds like it’s aimed at somebody else. In practice, here in Silicon Valley, it’s aimed at two groups: households with strong dual incomes, who bump into it every April, and, more importantly for our purposes, ordinary longtime homeowners who cross the threshold exactly once in their lives, in the year they sell the family home.
Here’s why. When you sell a home you’ve held for decades in Los Gatos or Cupertino or San Jose, the taxable gain from that one transaction gets added to your income for the year. A retired couple living comfortably on $90,000 a year can suddenly have a seven-figure MAGI, and for that one tax year, the IRS treats them exactly like the highest earners in the country. Sadly, there’s no carve-out for “we only look rich this year.”
And there’s a detail that makes this worse every single year: the NIIT thresholds are not indexed for inflation. Congress set $200,000 and $250,000 back when the tax took effect in 2013, and they haven’t moved since. If that sounds familiar, it should. It’s the same story as the Section 121 home sale exclusion, frozen at $250,000 and $500,000 since 1997 while Bay Area home values multiplied several times over. Every year these fixed numbers stand still, inflation drags more ordinary households across the line without anyone in Washington lifting a finger. A tax that was sold as a tax on the wealthy has become, for homeowners in high-cost markets, a tax on staying put for thirty years.
One more group worth mentioning: trusts and estates get hit at a dramatically lower threshold, one that kicks in around the top trust tax bracket, which is a tiny fraction of the individual thresholds. Most families holding a home in a standard revocable living trust don’t need to worry, since those are taxed to you as an individual while you’re living. But if there’s an irrevocable trust in your family picture, or you’re settling an estate, this is a conversation to have with your tax professional sooner rather than later.
Why Does the NIIT Exist?
The NIIT was born in 2010 as part of the legislation that accompanied the Affordable Care Act, and it took effect on January 1, 2013. You’ll sometimes hear it called the “Medicare surtax,” and the nickname tells you the story Congress was telling at the time. Wage earners pay Medicare taxes on every paycheck, but investment income, the kind of income that tends to flow to wealthier households, contributed nothing toward Medicare. The 3.8% rate wasn’t pulled out of a hat; it matches the combined Medicare tax rate on wages, including the additional Medicare tax high earners pay. The idea was to make a dollar of dividends carry the same load as a dollar of salary.
Whether it worked out that way is a fair question. Technically, NIIT revenue goes to the general fund rather than into the Medicare trust fund, so the “Medicare tax” label is more branding than plumbing. And because Congress never indexed the thresholds, the tax reaches further down the income ladder every year, catching households the original drafters probably never pictured, including retired schoolteachers in Willow Glen whose only crime was buying a house in 1985 and taking good care of it.
I’ll leave the politics to others. What matters for you is simpler: the tax exists, it isn’t going anywhere on its own, and the year you sell your home is very likely the year it finds you.
What the NIIT Looks Like When You Sell Your Home
Let’s put real numbers on it, because 3.8% sounds small until you see what it’s 3.8% of.
Say you and your spouse bought your home in 1988 for $300,000 and you sell it this year for $2.5 million. Your gain is $2.2 million. The Section 121 exclusion knocks out $500,000, leaving $1.7 million of taxable gain (we’ll set aside basis adjustments for the moment, though as I’ll explain in a minute, you shouldn’t). Your MAGI for the year is now far beyond the $250,000 threshold, so the NIIT applies to the full $1.7 million of investment income. That’s 3.8% of $1.7 million, or about $64,600, stacked on top of the 20% federal capital gains rate and California’s ordinary income treatment, which runs as high as 13.3%. The NIIT alone, a tax you may never have heard of before this article, costs more than many people’s first house.
That’s the blindside. Now let’s talk about the playbook.
How Can You Avoid or Reduce the NIIT?
The first move is to shrink the gain itself, because every dollar you remove from taxable gain escapes the NIIT, the federal capital gains tax, and California’s tax all at once. That starts with rebuilding your cost basis. Every capital improvement you’ve made over the decades, the roof, the addition, the kitchen, the sewer lateral, the retrofit, adds to your basis and comes straight off the gain. Families who do the paperwork archaeology, and I’ve watched them do it, routinely document hundreds of thousands of dollars in improvements. At a combined tax rate that can approach 37%, finding $300,000 of basis in the garage file cabinet is worth over $100,000 in real money. Nobody gets paid better per hour than the person who finds the 2003 remodel receipts.
The second move is to manage the threshold side of the equation, and this is where timing earns its keep. Remember, the NIIT only applies once your MAGI crosses the line, and it applies to the lesser of your investment income or the amount over the line. Selling in a year when your other income is low, say, the gap years after you stop working but before Social Security and required minimum distributions begin, keeps more room under the threshold. For the same reason, be careful about stacking a big IRA withdrawal, a Roth conversion, and a home sale into the same tax year. Those retirement distributions aren’t investment income, but they inflate your MAGI and expose more of your gain to the surtax. Spreading the events across tax years can save real money for the price of a calendar.
The third move, for larger gains, is to spread or redirect the gain itself. An installment sale, where you carry financing for the buyer and receive payments over a period of years, spreads the gain across multiple tax years, and in each of those years the threshold test starts fresh. A charitable remainder trust can convert a highly appreciated home into a lifetime income stream while removing the gain from the year of sale, which suits families with charitable intentions anyway. And if the property is a rental rather than your residence, a 1031 exchange defers the gain, and the NIIT along with it, entirely. These are sophisticated tools with real tradeoffs, which is exactly why the five-years-out conversation beats the five-weeks-out conversation every time.
The Bottom Line
The Net Investment Income Tax is a 3.8% surtax that was designed for the wealthy and, thanks to frozen thresholds and Bay Area appreciation, now waits at the finish line for almost every longtime homeowner who sells. You can’t repeal it, but you can plan around it: rebuild your basis, watch your MAGI in the year of sale, and put the calendar to work spreading or timing the gain. The families who pay the most are almost never the ones with the biggest gains; they’re the ones who found out about the tax in escrow.
Frequently Asked Questions
Does the NIIT apply to the part of my gain covered by the home sale exclusion?
No. Gain you exclude under Section 121, up to $250,000 for a single filer or $500,000 for a married couple, isn’t subject to the NIIT. The surtax only applies to the taxable gain left over after the exclusion.
If I’m retired and live on a modest income, can the NIIT still apply to me?
Yes. The NIIT looks at your income for the year of the sale, not your usual lifestyle. The taxable gain from selling your home counts toward your modified adjusted gross income, so a sale can push you well past the threshold even if your income in every other year is far below it.
Does California have its own version of the NIIT?
No. The NIIT is a federal tax only. California doesn’t have a separate surtax on investment income, but it does tax capital gains as ordinary income at rates up to 13.3%, so the state bill on a large gain is significant on its own.
Do my IRA withdrawals and Social Security count as investment income?
They aren’t investment income, so the NIIT isn’t charged on them directly. They can still raise your modified adjusted gross income, though, which can push you over the threshold and expose more of your home sale gain to the surtax. That’s why the timing of withdrawals and Roth conversions matters in the year you sell.
What happens if I sell after my spouse has passed away?
Two things change. In California, community property generally gets a full step-up in basis when the first spouse dies, which can wipe out much of the gain. On the other hand, once you file as a single taxpayer, your exclusion drops to $250,000 and your NIIT threshold drops to $200,000. A surviving spouse who sells within two years of the death can still claim the full $500,000 exclusion, so the timing is worth discussing with your tax professional.
Does the NIIT apply when my children inherit and sell the house?
Usually very little of it. Heirs receive a stepped-up basis equal to the home’s value at the date of death, so if they sell soon afterward there is often little or no taxable gain for the NIIT to apply to. If the house is sold out of an irrevocable trust or an estate instead, the much lower trust and estate threshold can come into play.
Does the NIIT apply to a rental property I own?
Yes. Rental income and the gain from selling a rental are both investment income for NIIT purposes, and a rental doesn’t qualify for the Section 121 exclusion. A 1031 exchange into another investment property defers the gain and the NIIT along with it.
How far ahead should I start planning for the NIIT?
Ideally several years before you sell. Gathering improvement records, arranging your retirement withdrawals, and setting up tools like an installment sale or charitable remainder trust all take time, and most of them can’t be done once you’re already in escrow.
Senior Friendly Homes in Silicon Valley South
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25