Federal · NRA 30%

The US Non-Resident Alien Capital-Gains Trap: 183 Days & the 30% Rate

Non resident alien capital gains 30% rule: spend 183+ days in the US in one tax year and you can owe a flat 30% tax on net US-source gains. Who it catches.

10 min read

A nonresident alien who is physically present in the United States for 183 days or more in a single tax year can owe a flat 30% US tax on net US-source capital gains, even without ever becoming a US tax resident. This is the rarely discussed second life of the 183-day rule: most people assume crossing 183 days makes you a resident, but this is a separate trap that applies precisely to people who are not residents.

It surprises traders, snowbirds with active brokerage accounts, and increasingly crypto investors who spend a long stretch in the US on a tourist or visa-exempt basis. The ordinary expectation is that a nonresident alien (NRA) pays no US tax on capital gains, usually true, but a single-year presence of 183 days flips the rule. This guide explains exactly when the 30% rate bites and how to avoid stumbling into it.

The general rule: NRAs usually pay no US capital-gains tax

Under the default regime, a nonresident alien's capital gains from the sale of stocks, securities, and most personal property are not subject to US tax. The US generally taxes NRAs only on two buckets of income: income effectively connected with a US trade or business (taxed at graduated rates), and certain fixed or determinable annual or periodical income, dividends, interest, rents, royalties, taxed at a flat 30% by withholding. Plain capital gains sit outside both buckets for most foreign investors.

That is why a non-US person can trade US-listed stocks through a foreign or even a US brokerage and pay no US tax on the gains (their home country may tax them instead). The mechanics live in Internal Revenue Code Section 871. The IRS lays out the framework in its tax guide for aliens, Publication 519. So far, so friendly, and this is what nearly every NRA investor relies on.

Important: this 30% capital-gains rule applies only to people who are nonresident aliens. If you cross the Substantial Presence Test and become a US resident alien, you are taxed on worldwide income at ordinary graduated rates instead, a completely different (and usually larger) exposure.

The exception: 183 days in one year

Section 871(a)(2) carves out an exception that catches a narrow but real group of people. A nonresident alien who is present in the United States for 183 days or more during the tax year is taxed at a flat 30% (or lower treaty rate) on the excess of US-source capital gains over US-source capital losses for that year.

  • It is a single-year test. Unlike the Substantial Presence Test, there is no three-year weighting. You count actual days of presence in the one tax year only.
  • It applies only while you remain an NRA. If those 183 days also make you a resident under the SPT, the 30% gains rule is moot, you are a resident and taxed differently.
  • It hits net gains, not gross. US-source capital losses offset US-source gains; only the net is taxed.
  • The rate is flat 30% with no graduated brackets and no preferential long-term capital-gains rate, though a tax treaty may reduce or eliminate it.

How can someone be present 183+ days and still be a nonresident alien? It happens more than you would think. Days as an exempt individual, students on F visas, scholars on J visas, certain teachers and trainees, do not count toward the SPT, so a person can rack up far more than 183 actual days yet remain an NRA for residency purposes. Those same actual days, however, do count for the 871(a)(2) test, which looks at raw presence.

Who actually gets caught

The classic victims are people whose residency status is suppressed by an exemption or a treaty but whose physical presence is high. Crypto traders are the modern poster child: a foreign national who spends most of the year trading from the US can trip both the day count and the US-source question at once.

ProfileDays in USResident under SPT?30% gains risk?
F-1 student trading actively200+ (exempt)No, exempt daysYes, on US-source gains
J-1 scholar with brokerage190 (exempt)No, exempt daysYes, on US-source gains
Snowbird, treaty resident abroad184Possibly, check closer connectionYes if still NRA
Tourist who overstays informally183+Likely yes (becomes resident)Usually moot, taxed as resident

Notice the pattern: the people most exposed are those who are present a long time but stay nonresident because exempt-individual rules or a treaty tie-breaker keep them out of residency. A snowbird who claims the closer-connection exception via Form 8840 to stay nonresident has, in doing so, kept themselves squarely inside the 30% gains rule if their actual presence reached 183 days.

Claiming nonresident status to avoid worldwide-income taxation does not exempt you from the 183-day capital-gains rule. The two rules are independent. Staying an NRA can be the very thing that exposes your US-source gains to the flat 30%.

What counts as a US-source gain

The 30% rule reaches only US-source capital gains, and the sourcing rules for personal property are counterintuitive. For most personal property sold by a nonresident alien, the gain is generally sourced to the seller's tax home, and a true NRA's tax home is usually abroad. That sourcing quirk is what spares many investors even when they cross 183 days.

  • Stocks and securities, gain is generally sourced where the seller's tax home is; for a genuine NRA that is often outside the US, but a long US stay can shift the analysis.
  • US real property, gains are taxed under a separate regime (FIRPTA) regardless of the 183-day rule, and are not the focus here.
  • Cryptocurrency, the IRS treats crypto as property, so general capital-gains sourcing applies; the analysis turns heavily on where your tax home sits during the year.
  • Foreign-source gains, not subject to the 30% rule at all, even in a 183-day year.

For crypto traders the practical risk is real but fact-specific. If you spend the bulk of the year physically in the US and your tax home has effectively shifted there while you remain an NRA on paper, US-source treatment of your gains becomes a live question, exactly the kind of edge case where day-by-day records matter. See our notes on building a crypto-trader residency plan.

Counting the 183 days correctly

The day count for this rule follows the familiar US convention: any part of a day physically present in the United States generally counts as a full day. Your arrival day counts, your departure day counts, and there is no proration. Crucially, the 183 figure here is actual days in the single tax year, not the weighted three-year figure used by the SPT.

That distinction trips people up constantly. You can fail the weighted SPT (and thus be a nonresident) while still blowing past 183 actual days, and it is the actual count that triggers the gains rule. Run both numbers separately with the 183-day calculator and the SPT calculator so you know which side of each line you fall on.

Track entry and exit dates as they happen. For this rule the question is binary, were you present 183 days or not, so a clean travel log is the difference between a confident filing and an expensive guess. A running day count beats reconstructing a year of flights from memory.

How to manage or avoid the trap

The cleanest defense is awareness before year-end, not after. Because the rule keys off a single calendar year, managing your presence and the timing of dispositions can change the outcome materially.

  • Watch the day count in real time. If you are approaching 183 actual days and intend to stay nonresident, know that gains realized in that year may face the 30% rate.
  • Mind the timing of sales. A gain realized in a year you were present under 183 days is generally outside the rule; pushing or pulling a disposition across a year boundary can matter.
  • Check your treaty. A US tax treaty with your home country may reduce the 30% rate or assign taxing rights elsewhere under the tie-breaker rules. Treaty positions are reported, not assumed.
  • Confirm your sourcing. If your tax home is genuinely abroad, many of your gains may be foreign-source and untouched, but a long US stay weakens that argument.
  • Don't conflate the tests. Passing the SPT makes you a resident (worldwide income); failing it but exceeding 183 actual days can leave you an NRA exposed to the 30% gains rule.

The bottom line: the 183-day rule has two faces. One makes you a resident; the other taxes a nonresident's US-source gains at a flat 30%. If you spend long stretches in the US while staying nonresident, count your actual days carefully. Use Tax Days to keep a real-time day count for every jurisdiction so you see this trap coming long before the IRS does.

FAQ

Frequently asked questions

Do nonresident aliens pay US capital-gains tax?

Generally no. A nonresident alien's capital gains on stocks and most personal property are usually not subject to US tax. The main exception is when the NRA is present in the US for 183 days or more in a single tax year, in which case net US-source capital gains can face a flat 30% tax.

What is the 30% capital-gains rule for nonresident aliens?

Under Internal Revenue Code Section 871(a)(2), a nonresident alien present in the US 183 days or more in one tax year is taxed at a flat 30% (or lower treaty rate) on the excess of US-source capital gains over US-source capital losses for that year.

How can someone be present 183 days and still be a nonresident alien?

Days as an exempt individual, students on F visas, scholars on J visas, certain teachers and trainees, do not count toward the Substantial Presence Test, so a person can have far more than 183 actual days yet remain a nonresident. Those actual days still count for the 30% capital-gains rule.

Does the 30% rule apply to crypto gains for a nonresident alien?

It can. The IRS treats cryptocurrency as property, so general capital-gains sourcing applies. If a nonresident alien is present 183+ days in a year and the gains are US-source, the 30% rule may apply. The outcome turns heavily on where the trader's tax home sits during the year.

Is the 183 days here the same as the Substantial Presence Test?

No. The Substantial Presence Test uses a weighted three-year formula. The 183-day capital-gains rule uses actual days in the single tax year only. You can fail the weighted SPT and still exceed 183 actual days, which is exactly what triggers this trap.

Can a tax treaty reduce the 30% nonresident capital-gains rate?

Often yes. A US tax treaty with the NRA's home country may reduce the rate or assign primary taxing rights to the home country under the residence tie-breaker rules. Treaty positions must be claimed and reported, not simply assumed.

Sources & further reading

Every rule on this page is drawn from primary sources. Verify the current law before making a residency decision.

  1. [1]Substantial Presence TestIRS
  2. [2]Publication 519, U.S. Tax Guide for AliensIRS
  3. [3]OECD Model Tax Convention, Article 4 (Resident) tie-breakerOECD