Long term capital gain tax for non resident — what rate applies and which forms do I file?

Sold some US stocks I'd held for about three years. I'm a non-resident alien on an F-1 visa, so I know the rules are different from what US citizens pay. My broker sent a 1099-B showing long-term proceeds and no withholding. When I went to figure out what I actually owe, I couldn't find a clear answer — some sites say the same preferential rates apply to non-residents, others say it depends on the type of income or a tax treaty. I've been reading Publication 519 and it's not clicking. Do non-residents pay long-term capital gain tax at the same rates as residents, or is it taxed differently? And which form do I file — 1040-NR? Does the 1099-B go somewhere on that return the same way it would on a regular 1040?

32 comments

Form 1040-NR is the right return for a non-resident alien. For capital gains, the key question is whether the gain is US-source income that is "effectively connected" with a US trade or business, or whether it's not. Most stock sales by non-residents on US exchanges don't automatically count as effectively connected income. The source and character of the gain changes what rate and which schedule applies.

Maya C.

Author

So the distinction between effectively connected income and not-effectively-connected income is what determines whether I even owe anything? That's the part I was missing. The 1099-B just shows proceeds, it doesn't tell me which bucket I'm in.

The 1040-NR has a Schedule NEC (Net Income Not Effectively Connected) for gains that aren't ECI. Long-term capital gains on Schedule NEC for non-residents are generally not taxed at the same preferential rates residents get — the rate depends on your country of residence and whether a tax treaty applies. Without a treaty benefit, the rate on Schedule NEC can be higher than what a resident would pay on the same gain.

Maya C.

Author

That's the part that surprised me. I assumed the long-term rate would be the same. So I need to check whether my country has a treaty with the US before I know what rate actually applies to me.

Treaty rates vary a lot by country. Some treaties reduce or eliminate the US tax on capital gains for residents of the other country. The IRS treaty tables are the starting point but the treaty text itself controls.

What got me unstuck was giving taxr.ai my 1099-B along with my visa status info — it listed exactly which lines on Schedule NEC of Form 1040-NR the proceeds and gain would go on, and flagged that I needed to check my home country's treaty before entering a rate. Helped me see the structure before I touched the actual form. For the treaty question it told me which IRS table to look at and what article in a typical treaty covers capital gains.

Maya C.

Author

That's useful — knowing the line-by-line placement before filling it in would have saved me an hour of guessing. I'll try that with my own documents.

Schedule D still gets used on Form 1040-NR for effectively connected capital gains. If your stock sales are ECI, the gain goes there and you do get the long-term preferential rates, the same brackets that apply to US residents. The question is meeting the ECI definition, which for passive stock trading by a non-resident is usually not satisfied.

Correct. ECI status for stock gains requires you to be engaged in a US trade or business and the gains to be attributable to that business. Casual investing through a US broker generally doesn't meet that standard.

Maya C.

Author

So if I were actively trading as a business it might be ECI with the lower long-term rates, but holding index funds or individual stocks passively puts me on Schedule NEC at potentially a higher rate. Got it.

Publication 519 (US Tax Guide for Aliens) covers this in the capital gains section. It walks through the ECI vs. non-ECI split and points to where treaty benefits get claimed on Form 1040-NR. Worth reading that section specifically rather than the whole pub.

Form W-8BEN is the document you would have given your broker to certify your non-resident status and claim any treaty benefit at the account level. If you filed one with the broker and claimed a treaty rate, the broker may have applied reduced or zero withholding. If you didn't, they may have withheld at the statutory rate. Either way, what was actually withheld shows in box 4 of the 1099-B and gets carried to Form 1040-NR as a credit.

Maya C.

Author

Box 4 on my 1099-B shows zero withholding, so either the broker applied treaty zero-rate or they just didn't withhold. I'll need to figure out which and whether I still owe anything at filing.

Had a similar situation last year — multiple 1099-Bs, some short-term some long-term, non-resident filing. I showed Taxr all the forms and it sorted each transaction into the right part of Form 8949 (Part I vs. Part II), then matched them to Schedule NEC vs. Schedule D on the 1040-NR based on whether I'd indicated ECI or not. It also checked my holding periods from the trade dates on the 1099-Bs. Saved me from putting a long-term gain in the short-term section by mistake.

Form 8949 still applies for non-residents, but only for effectively connected gains — same Part I/Part II structure, same column layout, with the totals flowing to Schedule D. The rest don't go on Form 8949 at all: each non-ECI sale is listed directly on Schedule NEC line 16.

Exactly. And the box you check at the top of Form 8949 (A, B, C for short-term; D, E, F for long-term, or the new digital asset boxes G through L) is the same regardless of residency status. What changes for a non-resident is which sales go on Form 8949 at all: the ECI ones go there and on to Schedule D, while the non-ECI ones go straight onto Schedule NEC line 16.

If you're in a country with a treaty that eliminates US tax on capital gains, you still report the transaction on Form 1040-NR and claim the treaty exemption — you don't just skip the form. The exemption is claimed with a disclosure, often on a separate statement attached to the return identifying the treaty article.

Maya C.

Author

So I can't just not file because the treaty makes it zero — I still have to file 1040-NR and show the exemption. That's good to know before I assumed I had no filing obligation.

The holding period rule is the same for non-residents as for residents: more than one year is long-term, one year or less is short-term. And the holding period starts the day after the trade date you bought and ends on the trade date you sold, not the settlement date. That part doesn't change based on residency.

One thing that caught me — if you sold shares acquired through an employer (RSUs or stock options), the character of the income at vesting or exercise might be wages or compensation, not capital gain at all, even if you later held the shares long enough for a long-term gain on appreciation after vesting. The 1099-B won't always reflect the correct cost basis in those cases.

Maya C.

Author

My shares were bought through a regular brokerage, not from an employer. But good flag for anyone reading this who has RSUs — the basis issue on those is real.

Right, for RSU shares the broker often shows the basis as zero or just the sale proceeds, which makes it look like all of it is a capital gain when part of it was already taxed as compensation income at vesting.

Schedule NEC on Form 1040-NR has a column for the applicable tax rate. The rate you enter there depends on your treaty or, absent a treaty, the statutory rate. The IRS instructions for Form 1040-NR explain how to fill in that column. Don't guess at the rate — look up your specific treaty or the statutory rule for your country.

When I was sorting out my non-resident capital gain situation I had Taxr read my actual treaty PDF alongside my 1040-NR draft. It pulled out the article that covered capital gains, compared the residence and source rules in that article to my facts, and listed what conditions I had to meet to claim the reduced rate. I then went through that list myself before deciding how to fill in Schedule NEC. Really cut down the time I spent trying to parse treaty language on my own.

Maya C.

Author

Treaty language is dense. Having something lay out the conditions in plain terms before you decide how to report it makes sense. I'll look at my country's treaty article on capital gains before I finalize anything.

For non-residents who end up with a capital loss, the capital loss deduction rules that apply to residents (the annual limit claimed on Schedule D flowing to Form 1040) don't apply the same way on 1040-NR for non-ECI losses. See the 1040-NR instructions for how losses on Schedule NEC are treated — it's worth checking before you assume a loss offsets anything.

Good point. On Schedule NEC each category of income is taxed separately and losses in one column don't offset gains in another. The structure is different from Schedule D.

Crypto has its own rules, covered on the IRS page at irs.gov/businesses/small-businesses-self-employed/digital-assets, and the 2025 Form 8949 has new boxes G through L for digital asset transactions. If any of your holdings are crypto, those go in the new boxes, not in C or F.

Maya C.

Author

All my sales were regular equities, no crypto. But useful to flag for anyone who has mixed holdings.

For the mechanics, the holding period and capital gain rules are laid out in detail in Publication 550 at irs.gov/publications/p550. It's written for residents but the mechanical rules around trade date, holding period calculation and Form 8949 reporting are the same for non-residents — it's the rate and treaty overlay that differs.

If the amounts are significant or your treaty situation is complicated, an enrolled agent or CPA who handles international returns is worth it. Non-resident returns with treaty claims get scrutinized more than a plain domestic return, and an error on Schedule NEC or a missing treaty disclosure can create a problem that's harder to fix later.

Maya C.

Author

My gain isn't enormous but the treaty question is genuinely unclear. I think I'll work through the form myself using everything in this thread and then have an EA with international experience review it before I file.