Does the 3.8% NIIT apply to capital gains when selling my primary residence?
I'm getting really confused about this 3.8% Net Investment Income Tax and whether it applies when selling my house. I've owned my home for about 9 years and I'm looking at a pretty big gain even after the exclusions ($250k for single/$500k for married filing jointly). My regular job already puts me in the highest capital gains bracket, so I know I'm going to get hit hard. I've been looking at the IRS website and talking to friends who've sold recently, but I'm getting conflicting information. Some say the NIIT definitely applies to home sales above the exclusion, others say there are ways around it if the home is your primary residence. For context, I'm expecting about $320k in capital gains after exclusions, and my AGI from my job is around $315k (filing single). Anyone have experience with this or know exactly how NIIT applies to primary residence sales? I really don't want to be surprised with an extra tax bill on top of the capital gains tax I'm already expecting to pay.
21 comments


GalacticGuru
The 3.8% NIIT (Net Investment Income Tax) does typically apply to capital gains from selling your primary residence, but only on the portion that exceeds the exclusion amount and only if your income is above certain thresholds. For the NIIT to apply, you need to have a Modified Adjusted Gross Income above $200,000 if filing single or $250,000 if married filing jointly. Since you mentioned your AGI is around $315k (filing single), you'll likely be subject to this tax. Here's how it would work in your case: You'd get the standard $250k exclusion (since you're single), and then the remaining $320k in capital gains would potentially be subject to both capital gains tax and the 3.8% NIIT. So you'd pay your regular capital gains rate (likely 20% given your income level) PLUS the additional 3.8% NIIT on that $320k.
0 coins
Amara Nnamani
•So wait, to make sure I understand this correctly - if my home sale profit is UNDER the exclusion amount ($250k single/$500k married), then I wouldn't have to pay the NIIT at all on that money, right? Even if my income is above the NIIT threshold?
0 coins
GalacticGuru
•That's correct! If your profit from the home sale is completely covered by the exclusion amount ($250k for single filers or $500k for married filing jointly), then there's no capital gain to tax - and therefore no NIIT would apply to the sale. The NIIT only applies to the portion of capital gains that exceeds your exclusion amount. So in the original poster's case, only the $320k above their exclusion would be subject to both capital gains tax and the additional 3.8% NIIT.
0 coins
Giovanni Mancini
I was in almost the exact same situation last year and found https://taxr.ai incredibly helpful for figuring out all the implications of selling my primary residence. I was also confused about the NIIT since I was selling a home I'd lived in for 7 years with about $275k in gains after the exclusion. The tool analyzed my situation and confirmed I would indeed have to pay the NIIT on top of capital gains tax. What was really helpful though was that it showed me some options for offsetting some of the gain by properly accounting for home improvements I'd made over the years. I had receipts for a kitchen remodel and bathroom upgrades that I could use to increase my basis and reduce my taxable gain.
0 coins
Fatima Al-Suwaidi
•How exactly does this work? Does it just ask questions about your situation or do you need to upload documents? I'm trying to figure out if I need to hire a CPA for my home sale this year.
0 coins
Dylan Cooper
•I'm a bit skeptical of these online tools. How accurate was it compared to what you actually ended up owing when you filed? Did you double-check with a professional?
0 coins
Giovanni Mancini
•It asks you a series of questions about your situation first, then gives you the option to upload documentation if you want a more precise analysis. I started with just answering questions, then ended up uploading some of my improvement receipts and previous tax returns for a more complete picture. As for accuracy, I actually did take the report it generated to my CPA, and she was impressed with how thorough it was. She made a couple of minor adjustments based on some state-specific rules, but the federal tax calculations were spot on. The final amount I owed was within about $200 of what the tool predicted, which on a tax bill of that size is pretty accurate.
0 coins
Dylan Cooper
I wanted to follow up about my experience with taxr.ai after my initial skepticism. I decided to give it a try with my own home sale situation, and I'm honestly surprised by how helpful it was. The analysis broke down exactly how the NIIT would apply to my gain above the exclusion amount. What really impressed me was that it flagged some capital losses from investments I had that could be used to offset some of the gain from my home sale. It also prompted me to look for documentation of home improvements that I hadn't even considered. Between those two things, I was able to reduce my taxable gain by almost $45,000! The tool even generated a report that I can give to my tax preparer explaining all the calculations.
0 coins
Sofia Morales
If you're having trouble getting clear answers about the NIIT and home sales from the IRS website, you're definitely not alone. I spent WEEKS trying to call the IRS to get a straight answer about this exact situation. Always on hold forever, then disconnected. I finally used https://claimyr.com to get through to an actual IRS agent. You can see how it works in this video: https://youtu.be/_kiP6q8DX5c - basically they wait on hold for you and call when an agent is available. The agent I spoke with confirmed that yes, the 3.8% NIIT does apply to capital gains from a primary residence that exceed the exclusion amount if your income is above the threshold.
0 coins
StarSailor
•Wait, so there's a service that waits on hold with the IRS for you? How does that actually work? Do they just call you once they have someone on the line?
0 coins
Dmitry Ivanov
•That sounds too good to be true. I've been calling the IRS for weeks about a tax notice I got. I find it hard to believe there's some magic way to skip the line.
0 coins
Sofia Morales
•Yes, exactly! You enter your phone number and what you need help with, and they use some system to continuously call and navigate the IRS phone tree. When they finally get a real person, they call you and connect you directly to the agent. I got a call back in about 75 minutes, which beat the 3+ hours I spent on my own attempts. There's no line skipping involved - they're just doing the waiting for you. The IRS agent I spoke with was very helpful once I finally got through. She even emailed me a specific publication number that addressed my question about NIIT on home sales.
0 coins
Dmitry Ivanov
I need to eat crow here. After my skeptical comment, I decided to try Claimyr because I was desperate about this IRS notice. It actually worked! Got a call back in about 2 hours and was connected with an agent who resolved my issue. While I had them on the phone, I also asked about the NIIT on home sales since I'm planning to sell next year. The agent confirmed what others have said here - the 3.8% NIIT does apply to gains above the exclusion amount ($250k/$500k) if your income exceeds the threshold ($200k single/$250k married). She also mentioned that home improvements can increase your basis and potentially reduce the taxable gain, so keep ALL receipts for major renovations.
0 coins
Ava Garcia
One thing no one has mentioned yet is that there are ways to potentially avoid or reduce the NIIT impact when selling your primary residence. If you're planning ahead, you might consider: 1) Timing the sale in a year where your income is lower 2) Making larger retirement contributions to reduce your MAGI 3) Selling in installments over multiple tax years 4) Doing a 1031 exchange if you're planning to buy another property (though there are strict rules for primary residences) I sold my house last year with a $400k gain after exclusions, and by maxing out my 401k, HSA, and making some charitable donations, I was able to get my MAGI just under the threshold so the NIIT didn't apply.
0 coins
Liam Fitzgerald
•Thanks for these suggestions! I hadn't thought about timing the sale strategically. Do you know if doing a 1031 exchange works for primary residences? I thought those were only for investment properties.
0 coins
Ava Garcia
•You're right to question the 1031 exchange option - I should have been clearer. A 1031 exchange generally doesn't work for primary residences as they're not considered investment properties. However, there are some complex scenarios where it might be possible if you convert your primary residence to a rental property for a sufficient period before selling. For most people selling their homes, the better strategies are the other ones I mentioned: timing the sale in a lower-income year, maximizing deductions and retirement contributions to lower your MAGI, or potentially doing an installment sale where you receive payments over multiple years (which spreads out the taxable gain).
0 coins
Miguel Silva
Be careful about calculating your exact gain! I made a huge mistake when selling my house last year. Your gain isn't just (selling price - purchase price). The actual formula is: Selling price - Selling expenses (realtor fees, etc.) - Purchase price - Purchase expenses (closing costs you paid when buying) - Capital improvements during ownership = Your actual gain I initially thought I had a $280k gain after the exclusion, but after properly accounting for $12k in selling costs, $8k in purchase costs, and about $65k in documented improvements, my taxable gain was only $195k. That saved me thousands in both capital gains tax and NIIT!
0 coins
Zainab Ismail
•This is such good advice! I almost made the same mistake. Does anyone know if regular maintenance counts as capital improvements? Like replacing a water heater or fixing the roof?
0 coins
Oscar O'Neil
•Great question! Generally, regular maintenance like fixing a broken water heater or patching a roof leak doesn't count as a capital improvement - those are just repairs to maintain the property's current condition. However, if you completely replaced the roof or upgraded to a high-efficiency HVAC system, those would typically qualify as capital improvements since they add value or extend the property's useful life. The IRS distinction is whether it's a repair (maintaining current condition) versus an improvement (adding value/extending life). Keep detailed records either way - sometimes the line can be blurry and it's worth discussing with a tax professional!
0 coins
Paolo Rizzo
Thank you everyone for this incredibly detailed discussion! As someone who's been stressing about this exact situation, this thread has been a goldmine of information. I want to emphasize something that Miguel mentioned about calculating your actual gain - I see so many people (including myself initially) making the mistake of thinking it's just selling price minus what you paid. The reality is that your basis includes not just your original purchase price, but also: - Closing costs when you bought - Major capital improvements (kitchen remodels, new roofs, HVAC systems, etc.) - Selling expenses (realtor commissions, title fees, etc.) I've been keeping a spreadsheet of all my home improvements over the years, but after reading this thread I realized I forgot about my original closing costs from 9 years ago. Just found those documents and it's another $7,200 I can add to my basis! For anyone in a similar situation, I'd strongly recommend gathering ALL your documentation before panicking about the tax implications. Between the $250k/$500k exclusion and properly calculating your actual basis, your taxable gain might be much lower than you initially think. Also planning to try that taxr.ai tool that Giovanni and Dylan mentioned - seems like it could help me organize all this information properly before I meet with my tax preparer.
0 coins
Luca Greco
•This is such a helpful summary, Paolo! I'm actually in the early stages of considering selling my home next year and had no idea about including original closing costs in the basis calculation. That's potentially thousands of dollars I could have overlooked. One thing I'm curious about - when you mention keeping a spreadsheet of home improvements, do you also keep all the actual receipts and invoices? I've done some major work over the years but I'm worried I might not have kept all the documentation. How detailed do the records need to be for the IRS? Also, has anyone here actually been audited on a home sale? I'm wondering how thorough they get with verifying improvement costs and whether estimates or partial documentation would be acceptable in some cases.
0 coins