How are capital gains taxed for a Non-Resident Alien in the US? Exemptions?
Title: How are capital gains taxed for a Non-Resident Alien in the US? Exemptions? 1 Hello everyone, I've been trying to understand the US tax implications for my situation and could use some help. I know that if someone doesn't meet the Substantial Presence Test requirements and has been in the US for less than 183 days in the current tax year, they're considered a Non-Resident Alien for tax purposes. What I'm confused about is whether I need to pay capital gains tax on my investments or if I'm exempt as a Non-Resident Alien? I've been getting different answers online. Also, my company granted me shares as part of my compensation package, and I'm planning to sell some of them soon. Would the capital gains from these employer-provided shares be considered Effectively Connected Income (ECI)? Would really appreciate if someone could point me to some official IRS guidance or reputable sources on this. I want to make sure I'm compliant but also not paying taxes I'm not required to. Thanks in advance!
20 comments


Malik Thompson
5 This is an excellent question about a complex area of US tax law. The taxation of Non-Resident Aliens (NRAs) follows different rules than for US citizens or residents. For capital gains: Generally, NRAs are only taxed on capital gains that are "effectively connected with a US trade or business" (ECI). Most investment gains from selling stocks, bonds, or other securities are considered passive investment income, NOT ECI, and are generally exempt from US capital gains tax for NRAs. However, there's an important exception for your second question: When shares are received as employment compensation, the gains from selling those shares often ARE considered ECI because they're connected to your US employment. This means they would likely be taxable, typically at graduated rates similar to ordinary income. The IRS Publication 519 "U.S. Tax Guide for Aliens" covers this topic in detail: https://www.irs.gov/publications/p519 Also, be aware that tax treaties between the US and your home country might modify these rules, potentially providing better treatment. What country are you a resident of? That could affect the specific advice.
0 coins
Malik Thompson
•8 Thanks for the detailed explanation! I'm a resident of Singapore. You mentioned that gains from selling company shares would likely be ECI. Does it matter if I sell them after I've permanently left the US? For example, if I worked for a US company for 2 years, got RSUs, but sell them 3 years after leaving the country?
0 coins
Malik Thompson
•5 The timing of the sale relative to your US employment can definitely matter. If you sell the shares after permanently leaving the US, the analysis becomes more complex. If there's a clear separation between your US employment and when you sell the shares (like in your example of selling 3 years after leaving), there's a stronger argument that the gains are no longer effectively connected to US trade or business. However, the IRS could still consider the shares as compensation for services performed while in the US. Singapore has a tax treaty with the US which might provide additional protection. I'd recommend consulting with a tax professional who specializes in cross-border taxation between Singapore and the US for your specific situation. They can help determine if the gains would fall under the capital gains article of the tax treaty.
0 coins
Malik Thompson
10 After dealing with a similar situation last year, I can tell you that figuring out NRA tax obligations is incredibly confusing! I spent hours trying to understand if my investment gains were taxable or not. I eventually used https://taxr.ai and it honestly saved me so much stress. You upload your documents and it analyzes your specific tax situation as a non-resident alien. It even identified a tax treaty benefit I had no idea applied to me. For your employer shares question, it specifically looks at the connection between equity compensation and US-source income. My situation was with options rather than shares, but the analysis was spot-on and saved me from making a costly mistake.
0 coins
Malik Thompson
•16 Did it help with figuring out which forms you needed to file? I'm in a similar situation from India, and I'm totally lost on whether I need to file a 1040-NR or something else. Does it work for people from any country?
0 coins
Malik Thompson
•12 I'm suspicious of these tax AI tools. How accurate is it really? Did you have an actual tax professional review what it told you? I'd be nervous about relying on AI for something as complicated as international tax law.
0 coins
Malik Thompson
•10 It absolutely helped with identifying the right forms! It walked me through exactly what I needed to file based on my specific situation and income sources. It works for pretty much any country, and it factors in tax treaties too. I was also skeptical at first about using AI for tax advice. What convinced me was that it references specific IRS publications and tax code sections for every conclusion. I did actually have my accountant review the results, and she was impressed with how comprehensive the analysis was. She only had to make minor adjustments for my specific situation.
0 coins
Malik Thompson
16 Just wanted to follow up that I tried taxr.ai after seeing it mentioned here. It was incredibly helpful for my situation! I uploaded my documents and it clearly explained that as an NRA from India, my capital gains from regular stock investments weren't taxable, but the RSUs from my US employer were considered ECI. It even referenced the specific US-India tax treaty provisions that applied to my situation and explained exactly which parts of my gains were taxable and which weren't. The form guidance was spot-on too - saved me from incorrectly using the regular 1040 instead of the 1040-NR. Definitely worth checking out if you're dealing with cross-border tax issues!
0 coins
Malik Thompson
19 Something not mentioned yet - if you're trying to contact the IRS directly about your NRA status and capital gains questions, good luck! I spent WEEKS trying to get through to someone who actually understood international tax issues. I finally used https://claimyr.com and got through to an IRS agent in about 20 minutes. You can see how it works here: https://youtu.be/_kiP6q8DX5c It was absolutely worth it because the agent was able to confirm exactly how my employer-granted RSUs would be treated for tax purposes as an NRA. They explained the effectively connected income rules and directed me to the specific forms I needed. Saved me from potentially making a huge reporting error.
0 coins
Malik Thompson
•21 How does this service actually work? Do they just call the IRS for you? Couldn't you just call yourself and wait on hold?
0 coins
Malik Thompson
•12 This sounds too good to be true. The IRS hotline is notoriously impossible to get through. I've tried calling multiple times about my NRA status and always gave up after being on hold for hours. You're saying this service actually works?
0 coins
Malik Thompson
•19 It basically holds your place in the IRS phone queue and calls you when an agent is about to answer. You don't have to wait on hold yourself. I tried calling myself multiple times but could never stay on hold long enough - I'd always get disconnected after 1-2 hours of waiting. The service works exactly as advertised. They use an automated system to stay on hold for you, and when they detect that an agent is about to pick up, they call you and connect you directly. I was skeptical too, but when I got that call and was immediately talking to an IRS agent, I was honestly amazed. Saved me hours of frustration and I finally got my questions answered by someone who actually understood international tax issues.
0 coins
Malik Thompson
12 I have to admit I was completely wrong about both services mentioned here. After spending 3 more days trying to figure out my NRA capital gains situation and getting nowhere, I tried Claimyr out of desperation. Got connected to an IRS international tax specialist within 25 minutes who confirmed that my specific situation (selling shares years after leaving the US) qualified for exemption under my country's tax treaty. The agent even helped me understand exactly which form to file and which sections to complete. Honestly wish I'd just used this service weeks ago instead of banging my head against the wall trying to interpret tax publications myself. Would have saved so much stress!
0 coins
Malik Thompson
14 One thing to watch out for with NRA taxation - even if you're exempt from capital gains tax, you might still have filing requirements. I learned this the hard way. If you engaged in a US trade or business at any point during the tax year (like working for a US employer), you generally need to file Form 1040-NR even if you don't owe any tax. Not filing when required can cause problems later if you ever need to prove your tax compliance.
0 coins
Malik Thompson
•6 Is there a minimum income threshold for the filing requirement? Like if I only worked in the US for a month and made less than $5,000, do I still need to file?
0 coins
Malik Thompson
•14 There is a threshold, but it's different for NRAs than for citizens/residents. For NRAs who are employees, you generally need to file if your income is more than the personal exemption amount plus the standard deduction. For 2023, that was around $12,950. But there's a catch - if any US tax was withheld from your income and you want to claim a refund, you need to file regardless of how much you earned. Also, if you want to claim benefits from a tax treaty, you typically need to file even if you're below the threshold.
0 coins
Malik Thompson
17 Has anyone dealt with state taxes for NRAs? I understand the federal rules a bit better now, but I worked in California and they're notorious for aggressive tax collection. Do the same NRA exemptions apply at the state level?
0 coins
Malik Thompson
•5 Great question about state taxes. The NRA rules we've been discussing are federal tax rules, and states have their own tax systems that don't always align with federal treatment. California in particular is known for having one of the more aggressive state tax authorities (FTB). Generally, if income is sourced to California (like from working physically in CA), the state will want to tax it regardless of your federal NRA status. For capital gains specifically, California typically follows the "source" of the income. If your employer shares were granted while working in California, the state might consider the gains to be California-source income even after you've left.
0 coins
Evelyn Martinez
This thread has been incredibly helpful! As someone who just moved from the US back to my home country and is facing similar capital gains questions, I wanted to add a few points that might be useful: 1. **Documentation is key** - Keep detailed records of when you received company shares, your employment dates, and when you left the US. The IRS may need this to determine if gains are ECI. 2. **Vesting vs. Sale timing matters** - Even if shares vested while you were in the US, selling them after becoming an NRA can change the tax treatment. The "source" of the income becomes important. 3. **Watch out for Form 8833** - If you're claiming treaty benefits to reduce or eliminate US tax on capital gains, you might need to file this form along with your 1040-NR. 4. **FIRPTA considerations** - While most stock sales aren't affected, if you have any US real estate investments, there are different rules under the Foreign Investment in Real Property Tax Act. The tax treaty angle mentioned earlier is really important. Many countries have specific provisions for capital gains that can override the general ECI rules. Definitely worth looking into your specific country's treaty with the US. Thanks to everyone who shared their experiences - this kind of real-world insight is so much more valuable than trying to parse through IRS publications alone!
0 coins
Haley Bennett
•Thank you so much for adding these practical points! The documentation aspect is something I hadn't fully considered. I've been keeping some records but probably not comprehensive enough. Your point about Form 8833 is especially helpful - I had no idea there was a separate form required for claiming treaty benefits. Would you happen to know if there's a threshold for when this form is required, or is it needed whenever you claim any treaty benefit? Also, regarding the vesting vs. sale timing - in my case the RSUs vested over 4 years while I was working in the US, but I'm planning to sell them now that I'm back home. It sounds like this could work in my favor for tax purposes, but I want to make sure I understand the implications correctly. The FIRPTA mention is interesting too. I don't have real estate investments now, but it's good to know about for the future. This whole thread has been incredibly educational - thanks to everyone for sharing your experiences!
0 coins