Who taxes capital gains for non-resident alien with no tax residency anywhere?

Trying to figure out a genuinely confusing situation. I hold US brokerage accounts and sold some ETFs this year with significant gains. I'm not a US citizen or green card holder, I don't pass the substantial presence test, and my home country lost my tax residency status when I left two years ago. So right now I have no tax residency anywhere officially. My broker sent a 1099-B and is asking me to certify my status. Who actually taxes capital gains for a non-resident alien with no tax residency anywhere? Does the US get to tax me on ETF gains just because the account is here? I've been going back and forth on whether I even need to file a 1040-NR. Would really appreciate any guidance from people who've dealt with this.

38 comments

Are the ETFs you sold US-listed? That matters a lot here. For a non-resident alien the US generally does NOT tax capital gains on the sale of stocks or securities traded on US exchanges — those aren't considered US-source income under the rules. But there are exceptions, including if you're a dealer in securities or if the gain is effectively connected with a US trade or business. What does your broker have on file for you — a W-8BEN or a W-9?

Yes, US-listed ETFs, all on established exchanges. I submitted a W-8BEN when I opened the account. No US business activity at all, just holding and trading from abroad.

W-8BEN is the right form. That certifies you as a foreign person. Under that status, capital gains from US-listed securities generally aren't subject to US withholding or tax for a non-resident alien who isn't present in the US for 183 days in the tax year under the special NRA rule. You likely don't owe US tax on those ETF gains, but keep reading this thread — there are nuances.

Wait, doesn't the 183-day rule flip it? Like if you're physically in the US for 183 days in the same year as the gain, the US DOES tax those capital gains for a non-resident alien at a flat rate? I want to make sure I understand the threshold correctly.

Correct on the concept. There's a special rule for non-resident aliens — if you are present in the US for 183 days or more during the tax year, US-source capital gains become taxable. That's separate from the substantial presence test for residency. The instructions for Form 1040-NR and Publication 519 cover this. If the poster wasn't in the US 183 days this year, that rule doesn't apply.

I was in the US for maybe 20 days total this year. So that particular 183-day NRA capital gains rule shouldn't catch me.

The piece everyone's dancing around is what 'no tax residency anywhere' actually means legally. Some countries tax based on source of income even if you're not a resident. Others have treaties with the US. I had a similar tangle last year — US brokerage, left my home country, wasn't sure what I owed where. I uploaded my 1040-NR draft and my W-8BEN to taxr.ai and it flagged that my residency claim on the W-8BEN and the country I'd put on the return didn't line up, which would've caused a withholding problem I hadn't noticed. Saved me a conversation with my broker. For you: do you have a passport country or any country where you file, even a nil return?

My passport is from a country that has a US tax treaty, but I genuinely stopped being a tax resident there under their domestic rules when I left. I'm not filing anything there currently. It's a real limbo.

Treaty benefits for non-resident aliens usually require you to BE a resident of the treaty country at the time. If you've lost that status under their domestic law, you likely can't claim treaty protection on a W-8BEN. That's a detail worth confirming with a tax professional who knows both countries' rules — an international tax CPA or enrolled agent.

Does your broker know you filed a W-8BEN citing that country? Because if the IRS ever looks at a W-8BEN claiming treaty benefits for a country where you no longer qualify as a resident, that creates a certification problem.

The W-8BEN I submitted doesn't claim a treaty rate — I left that section blank because I wasn't sure I qualified. So I think I'm okay on that front at least.

Blank treaty section is actually the safer move in your situation. You're just certifying foreign status, not claiming a reduced rate. Capital gains on US securities for a non-resident alien without a treaty claim and without 183 days in the US generally aren't subject to US tax regardless.

To be honest the 'no tax residency anywhere' situation is more common than people admit, especially with digital nomads, and the answer usually turns out to be: the US doesn't tax those gains, but your passport country MIGHT still have a claim under its own domestic law even if you think you left. Have you actually gotten a formal ruling or just assumed you lost residency there?

I filed a formal deregistration in my home country and received confirmation. So it's documented, not just assumed. That was the step I took specifically to avoid any continued obligation there.

Coming at this from a slightly different angle — even if the US doesn't tax the gain, do you need to file a 1040-NR at all? When I had US-source income questions as a non-resident, I gave Taxr my broker statements and my prior 1040-NR and it built me a checklist of which income types triggered a 1040-NR filing requirement and which didn't, with the specific lines on the form. Helped me understand I only needed to file because of dividend income, not the capital gains piece. For you the question is whether any of your income from US sources reaches the threshold that requires filing.

This is the right question. Capital gains that aren't taxable to a non-resident alien generally don't create a 1040-NR filing requirement on their own. But if the account generated dividends, those ARE typically subject to US withholding at 30 percent (or treaty rate) and do create reporting obligations. Check whether your 1099-B also came with a 1099-DIV.

There is a 1099-DIV with a small dividend amount. The broker withheld tax on it already. So I may actually need to file a 1040-NR just to report that withholding and potentially get a refund if I overpaid, even if the capital gains themselves aren't taxable.

Stateless tax residency is genuinely a gap in the international system. No OECD country wants to admit it, but it's real. The practical outcome for US brokerage accounts is usually: US taxes dividends and certain interest via withholding, doesn't touch capital gains for a non-resident alien who isn't here 183 days and has no US business connection.

Are the ETFs you sold equity ETFs or bond ETFs? Bond ETFs or funds holding US Treasury obligations can complicate the source-of-income analysis. Equity index ETFs are pretty clean — the gains are treated the same as the underlying stock for source purposes.

All equity ETFs tracking stock indices. No bond funds. So I think the source analysis is straightforward — treated as gains on US-listed stock, which aren't US-source income taxable to a non-resident alien.

One thing nobody's mentioned: FIRPTA. If any of those ETFs were US Real Property Holding Corporations or REITs, different rules apply. FIRPTA can subject a non-resident alien to US tax on gains that would otherwise be exempt. Check the fund prospectuses.

Good catch. Publicly traded REIT interests held by non-resident aliens have some FIRPTA exemptions depending on ownership percentage and whether the REIT is domestically controlled, but it's not automatic. Worth verifying for any REIT ETF.

What country are you physically living in right now? Even without formal tax residency, some countries assert the right to tax you if you're habitually residing there above a certain number of days, regardless of formal registration.

I move around a lot — no single country more than 90 days this year. So no country's day-count threshold for deemed residency applies to me. It's genuinely fragmented.

That's the classic digital nomad gap. You may technically owe nothing anywhere, which sounds great until you need to open a bank account or prove tax compliance for something else. Worth keeping a travel log and your deregistration documents together.

The Form 8949 and Schedule D questions only come up if you actually need to report the gains. If US capital gains aren't taxable to you as a non-resident alien and you're filing a 1040-NR only because of withheld dividends, the capital gains don't go on Form 8949 at all — they just don't appear on the return.

Technically correct but worth checking the 1040-NR instructions for the specific year. There are situations where gains effectively connected with a US trade or business DO go on Schedule D (with Form 8949), not Schedule NEC, of the 1040-NR. If there's truly no US business connection, the gains simply don't belong on the return.

Has your broker flagged any backup withholding issues? Sometimes when a W-8BEN is on file but hasn't been re-certified within the validity period, brokers start withholding on proceeds too. W-8BEN has to be renewed every three years or upon certain changes in circumstance.

Mine is current — I re-certified last year. But that's a good reminder because I hadn't tracked the expiration date actively.

The honest answer is that for a non-resident alien with no US trade or business, no 183-day US presence, and capital gains from US-listed equity securities, the United States simply does not tax those gains. That is the rule under US domestic law. The question of who else taxes them — that's your problem to solve with the laws of wherever you're resident, or not, and no US form fixes that.

Harsh but accurate. The US tax side is actually the cleaner question here. The harder question is whether the poster has any obligation to file or pay somewhere else, and that's outside what any US tax community can fully answer. An international tax professional in the passport country is worth at least a consultation.

Agreed. I think I've got enough to handle the US side now — file a 1040-NR to get back the withheld dividend tax, don't report the capital gains because they're not US-taxable to me, keep the W-8BEN current. The other-country question I'll take to a local advisor.

Just to flag Publication 519 (US Tax Guide for Aliens) on irs.gov has a full chapter on investment income for non-resident aliens. It walks through which types of income are US-source, which are not, and how the 183-day capital gains rule works. Worth reading alongside whatever else you do.

Circling the original question one more time: 'who taxes capital gains for a non-resident alien with no tax residency anywhere' — the US answer is: nobody, as long as the conditions hold (US presence of fewer than 183 days, no US business connection, equity securities on established markets, no FIRPTA property). The gap in global tax coverage is real and legal, just document everything.

Document is the key word. Keep the deregistration letter, the travel records, the W-8BEN acknowledgment from the broker, and a note of your day counts by country for each year. If anyone ever asks — broker, future bank, future country of residence — you want that trail.

Does anyone know if the new 1099-DA rules for digital assets change anything here for a non-resident alien? Like if the ETF exposure were through a crypto product instead of a traditional fund?

The 1099-DA is for digital assets specifically. The irs.gov page on digital assets covers the reporting rules for brokers. For a non-resident alien, whether crypto gains are US-source or not is a separate analysis from equity ETFs — the situs rules for digital assets are still developing. That would be its own thread honestly.

Fair point, different question entirely. Didn't mean to derail — the main thread answer has been really useful.