Free expat tax extension icon
FREE TAX EXTENSION
Extend your tax deadline to October 15 in minutes – avoid late filing penalties.
Request extension

Capital gains tax for nonresident aliens: US stocks, property, and FIRPTA

Capital gains tax for nonresident aliens: US stocks, property, and FIRPTA

Most nonresident aliens do not pay US capital gains tax on portfolio investments like US stocks, bonds, or mutual funds. The two main exceptions are gains effectively connected with a US trade or business (ECI) and gains realized while you are physically present in the US for 183 days or more in the tax year.

US real estate is the main FIRPTA exception: most foreign sellers are subject to withholding, and the gain is generally treated as effectively connected income, but several withholding exceptions and nonrecognition rules can apply.

This guide explains when non-resident capital gains tax applies, how the rules differ for stocks versus real estate, what FIRPTA withholding really means, and which forms to file. The rules below follow IRS Publication 519, the official guide to US tax for nonresident aliens.

Do nonresidents pay capital gains tax in the US?

In most cases, nonresident aliens are taxed only on US-source income, and capital gains on portfolio investments (stocks, bonds, mutual funds) are generally not US-taxable when the gain is not effectively connected with a US business and the seller spends fewer than 183 days in the US that year.

The main exception is US real estate, which is generally taxable under FIRPTA, though several withholding exceptions and nonrecognition rules can apply.

The rules depend on three things: the type of asset, where the gain is sourced, and whether the income is effectively connected with a US trade or business.

At a glance: NRA capital gains tax by asset type

For most NRAs, only US real estate and ECI-type business gains trigger US tax – pure portfolio gains usually do not.

Asset sold US capital gains tax for NRAs? Why
US stocks, bonds, and mutual funds Generally no Not a US-source for NRAs unless the ECI or 183-day rule applies
US real estate Yes Generally taxed as ECI under FIRPTA (IRC §897); withholding and nonrecognition exceptions apply
Foreign real estate No Foreign-source income
Foreign stocks No Foreign-source income
Cryptocurrency Usually no Treated as personal property; no US tax unless ECI or 183-day rule applies
Business assets (ECI) Yes Taxed at graduated US rates on Form 1040-NR
US partnership interests Often yes Often taxable to the extent the partnership's gain would be ECI; transfers may also trigger §1446(f) or §1445(e)(5) withholding depending on the partnership's assets

Who is a nonresident alien for US tax purposes?

A nonresident alien (NRA) is someone who is not a US citizen and who does not meet either the green card test or the substantial presence test for the year, unless a special election or dual-status rule applies.

The two residency tests 

You become a US tax resident for the year if you meet either of these:

  • Green card test – you are a lawful permanent resident at any point during the year.
  • Substantial presence test – you spent at least 31 days in the US this year, plus a weighted total of 183 days across the current year, one-third of last year's days, and one-sixth of the days from the year before.

If neither applies, you are an NRA. US citizens are not subject to these tests – they are taxed on worldwide income regardless of residency. Days on F, J, M, or Q visas are usually excluded from the substantial presence count under the "exempt individual" rule.

US citizens abroad are not NRAs

The US taxes citizens on worldwide income regardless of where they live. An American in Berlin or Bangkok still files the regular Form 1040, not Form 1040-NR, and the NRA capital gains rules in this guide do not apply to them.

Visa holders often switch status fast

Most foreign workers on US visas cross into resident-alien status quickly:

  • H-1B visa holders typically meet the substantial presence test in their first full calendar year in the US.
  • TN visa holders follow the same path and are taxed like residents from that point forward.

The capital gains tax rules for a nonresident alien covered in this article apply only while you genuinely qualify as an NRA. The moment you meet the substantial presence test or receive a green card, you are taxed on worldwide capital gains like any US resident.

How the US capital gains tax works for nonresident aliens

The framework rests on three tests: what type of asset you sold, where the gain is sourced, and whether the gain is effectively connected with a US trade or business. Run through these in order, and you will know whether you owe US non-resident capital gains tax or not.

Test 1: asset type

The asset itself sets the floor. Real estate sits inside FIRPTA, so US property is generally taxable, though withholding exceptions and nonrecognition rules can apply. Personal property and securities follow the sourcing rules instead, and most NRAs walk away with no US tax on portfolio gains.

Test 2: source of the gain

The source is where the IRS treats the income as arising, not where the trade was executed. For an NRA, gain from selling personal property is generally sourced to the seller's tax home, which means a foreign tax home produces a foreign-source gain that the US does not tax.

US real estate is the main exception: gain from a US real property interest is generally treated as effectively connected income under IRC §897, and withholding and nonrecognition exceptions can still apply.

Test 3: ECI or FDAP?

Two categories cover almost all NRA income:

  • FDAP – Fixed, Determinable, Annual, or Periodical income (interest, dividends, rents, royalties). Taxed at a flat 30% on gross, often reduced by treaty.
  • ECI – income effectively connected with a US trade or business. Taxed at the same graduated rates that US residents pay, after deductions.

Capital gains do not fit cleanly into either bucket. By default, they are not FDAP and not ECI, so they fall outside the US tax net for an NRA. They become taxable only when one of three things happens: the asset is US real estate, the gain is connected to a US business the NRA actively runs, or the 183-day rule kicks in for that tax year.

This is why the capital gain tax in the US for non-resident individuals usually depends less on the trade itself and more on the seller's status and presence in the country.

The numbers and forms come into play on Form 1040-NR, which is the return NRAs use to report taxable US-source income – the broader tax rules for resident and nonresident aliens explain how the two regimes differ in practice.

Capital gains tax on US stocks for nonresidents

For most NRAs, the answer is simple: no US tax. Gains on US stocks, ETFs, and mutual funds are not US-source income for a nonresident alien when the trade is not connected to a US business and the seller is in the US for fewer than 183 days that year. A French investor who buys Apple shares from Paris and sells them at a profit owes nothing to the IRS on the gain.

When the gain becomes taxable

Three triggers flip the result:

  • 183-day rule – an NRA physically present in the US for 183+ days in the tax year owes a flat 30% on US-source net capital gains, or a lower treaty rate. This is separate from the substantial presence test.
  • ECI – if you trade as a US business (rare for individual investors), the gain is effectively connected and taxed at graduated rates.
  • Residency start date – if you become a US resident during the year, gains realized after your residency start date are taxed under the resident rules on worldwide income. Before residency begins, the sale-of-personal-property source generally follows the seller's tax home.

This is the core of the capital gains tax on US stocks for non-residents rule: the asset is US-issued, but the gain is sourced to the seller, not to the issuer.

Dividends are different

Dividends from US stocks are not capital gains – they are FDAP income and face 30% withholding at the source, often reduced to 15% (or lower) under a tax treaty. The broker withholds before the money reaches you, and the rate depends on the W-8BEN you file.

Selling the stock and receiving a dividend on the stock are taxed under two completely different regimes.

The 183-day rule for NRA capital gains

If you are an NRA and you spend 183 days or more in the US during the tax year, your US-source capital gains face a flat 30% tax (or a lower treaty rate). This rule lives in IRC §871(a)(2) and applies even though you remain a nonresident for every other purpose.

This is not the substantial presence test

The two rules share a number but do completely different things:

  • Substantial presence test – uses a weighted three-year day count to decide whether you become a US tax resident at all.
  • 183-day capital gains rule – separate from the substantial presence test. If you are a nonresident alien and are physically present in the US for 183 days or more during the tax year, your net US-source capital gains can be taxed at 30% (or a lower treaty rate).

You can be an NRA under the first rule and still get hit by the second. That is the trap.

How the 30% works

The tax is flat, on net US-source capital gains, with no standard deduction and no carryover of prior-year losses. A few mechanics worth knowing:

  • It applies to gains realized while you are an NRA, even on trades executed before you arrived in the US.
  • A treaty can cut the rate or eliminate the tax – check the capital gains article in your country's US treaty.
  • It is reported on Schedule NEC of Form 1040-NR.

Who actually trips this rule

The classic case is a foreign student or scholar who is "exempt" for substantial-presence purposes but physically in the US for the full academic year. They remain an NRA, yet any US stock or crypto sale during the year may be exposed to the 30% rate if their tax home is in the United States.

The same logic catches diplomats, employees of foreign governments, and long-stay business visitors. The cleaner the picture of who counts as an NRA in your specific situation, the easier it is to see whether the 183-day rule applies in any given year.

Capital gains tax on US property sales for nonresidents

Yes – nonresident aliens pay US capital gains tax when they sell US real estate, and the IRS collects most of it up front through 15% withholding at closing under FIRPTA.

The capital gains tax on property sales for non-residents is one of the few situations where an NRA generally cannot avoid US tax through sourcing or treaty positioning. However, withholding exceptions and nonrecognition rules can apply.

What FIRPTA actually does

The Foreign Investment in Real Property Tax Act of 1980 plugged a gap that let foreign owners sell US property and walk away tax-free. IRC §897 now treats gain from the sale of a US real property interest (USRPI) as effectively connected income, so a foreign seller is taxed at graduated US rates as if they were running a US business.

A USRPI is broader than just a house or piece of land. It includes direct ownership of US real estate, certain leasehold and option interests, and stock in a US real property holding corporation, meaning a corporation whose US real property interests are at least 50% of the combined fair market value of its US real property interests, foreign real property interests, and business assets.

Two layers: withholding and tax

These are different numbers and easy to confuse:

  • Withholding (IRC §1445) – the buyer, not the seller, must withhold 15% of the gross sale price and send it to the IRS within 20 days of closing. The buyer is personally liable if they fail to withhold.
  • Actual tax (IRC §897) – the seller's real liability is calculated on the gain (sale price minus basis). Long-term real estate gains are often taxed at 0%, 15%, or 20%, but some real-estate-related gains can be taxed at a higher special rate, including unrecaptured section 1250 gain at up to 25%, plus possible state tax

The withholding is a deposit against the tax bill, not the tax itself. If 15% of the gross price exceeds the actual tax on the gain, which happens often, especially on properties held a long time, the seller files a return and gets the difference back as a refund.

Reduced and zero withholding rates

The 15% headline rate is not always the right number:

  • No withholding required – if the amount realized is $300,000 or less, the buyer is an individual, and the buyer will actually use the property as a residence under the IRS occupancy rules.
  • 10% – if the amount realized is $1 million or less and the same personal-residence conditions are met.
  • 15% – the default, for everything else and all corporate buyers.

Sellers can also apply for a withholding certificate from the IRS on Form 8288-B before closing. If approved, it caps withholding at the seller's expected actual tax liability, which avoids parking cash with the IRS for a year.

Why this matters in practice

The cash-flow problem is the real story here. A foreign seller closing on a $1.5 million property faces $225,000 of withholding on the day of sale, even if the actual gain is only $200,000 and the real tax bill is closer to $40,000. That extra $185,000 sits with the IRS until the return is filed and processed.

This is why capital gains tax on property sales for non-residents rarely ends at the closing table. The withholding is just step one – the seller still has to file a US tax return to settle up, claim the refund, and meet the related compliance obligations covered in the next section.

FIRPTA withholding vs actual capital gains tax

FIRPTA withholding is an advance payment toward your final tax bill, not the tax itself. The buyer sends 15% of the gross sale price to the IRS at closing on Form 8288; the seller settles the actual liability later on Form 1040-NR.

The two numbers rarely match. Withholding is calculated on the full sale price; the tax is calculated on the gain.

Example: NRA sells a US condo

A French NRA sells a Miami condo for $800,000. She bought it in 2015 for $500,000 and made $50,000 of improvements (adjusted basis: $550,000).

  • Long-term capital gain: $250,000
  • FIRPTA withholding at closing: $120,000 (15% of $800,000)
  • Actual federal tax on the gain: Actual federal tax on the gain: about $30,248, assuming 2025 single filing status, no other taxable income, no depreciation recapture, no NIIT, and no state tax.  
  • Refund after filing Form 1040-NR: ~$89,752

If the basis were much lower, withholding could fall short, and the seller would owe the difference on the return. Either way, the cleanup happens at filing.

A withholding certificate (Form 8288-B) lets the IRS pre-approve a number closer to the actual tax, so neither side has to park cash with the IRS for a year.

Forms used after a US property sale

A FIRPTA sale generates a stack of paperwork – at minimum, the buyer files Forms 8288 and 8288-A at closing, and the seller later files Form 1040-NR to settle the actual tax. An NRA seller without a US tax ID also needs Form W-7 to get an ITIN, or the refund cannot be processed.

What each form does

  • Form 8288 – the buyer's withholding return. Filed within 20 days of closing, along with the 15% deposit.
  • Form 8288-A – the buyer's statement showing how much was withheld. The IRS stamps Copy B and returns it to the seller as proof of withholding.
  • Form 8288-B – the seller's pre-closing application for a reduced or zero withholding rate. If approved, withholding is capped at the expected actual tax instead of 15% of the gross price.
  • Form 1040-NR – the seller's annual return, where the gain is reported, the actual tax is calculated, and the credit for FIRPTA withholding is claimed.
  • Form W-7 – ITIN application. Required if the seller has no SSN and no existing ITIN.

The ITIN bottleneck

Without a TIN or ITIN, refund processing is delayed because the IRS will not release the stamped Copy B of Form 8288-A until the TIN is provided.

Apply for the ITIN as soon as there is a legally binding contract and, if possible, submit it with the FIRPTA package. Waiting until the 1040-NR is due can delay refund processing.

Filing and refund timing

The seller files Form 1040-NR for the year the sale closed, by April 15 (June 15 if no US wages and the seller is abroad on the due date). Refund timing depends on how quickly the ITIN and stamped Form 8288-A are available; processing can be delayed if either item is missing.

Pro tip:
Apply for Form 8288-B before closing whenever the expected actual tax is meaningfully below 15% of the sale price. The certificate caps withholding at the projected liability, which keeps cash with the seller instead of locking it up at the IRS for a year-plus refund cycle.

 

TFX handles FIRPTA filings end-to-end – withholding certificates, ITIN applications, and Form 1040-NR.
Learn more
TFX handles FIRPTA filings end-to-end – withholding certificates, ITIN applications, and Form 1040-NR.

Capital gains tax for foreign investors in US real estate funds, REITs, and partnerships

The capital gains tax for foreign investors in US real estate often follows them through indirect ownership, not just direct deeds. If you hold US property through a fund, REIT, corporation, or partnership, FIRPTA can still apply.

When indirect ownership triggers FIRPTA

Three structures account for most surprises:

  • US Real Property Holding Corporations (USRPHCs) – stock in a corporation whose US real property interests are at least 50% of the combined fair market value of its US real property interests, foreign real property interests, and business assets is itself a USRPI.
  • REITs – distributions and sales tied to a non-domestically-controlled REIT can be taxable under IRC §897(h). A domestically controlled REIT/QIE is generally one where less than 50% in value of its stock was held, directly or indirectly, by foreign persons during the applicable testing period.
  • Partnership interests – if a US partnership holds USRPIs, the foreign partner's share of gain on sale is treated as if they sold the underlying real estate.

The publicly traded exception

Foreign investors in widely held REITs and listed real-estate companies often qualify for an exemption: if the stock is regularly traded on an established US securities market, the shares are not treated as a USRPI provided the NRA owns 5% or less of the class, or 10% or less for REIT stock. Cross the applicable threshold – or hold the same stake through a partnership that pushes you over the line – and the exception disappears.

Practical warning

Buying into a US real-estate fund as an NRA is not the same as buying Apple stock. The fund's underlying assets, the entity type, and your ownership percentage all change the tax outcome. Before signing into a syndication, REIT, or US LLC that owns property, ask three questions: is this a USRPHC, is the REIT domestically controlled, and what happens at exit?

Pro tip:
Ask the sponsor for their FIRPTA position in writing before you wire funds. A US fund qualifies as a US real property holding corporation – and its equity becomes a USRPI under IRC §897(c)(2) – when US real property interests make up at least 50% of the combined fair market value of its real property and business assets. The withholding result depends on the entity type and transaction. A direct sale of a US real property interest by a foreign person generally triggers 15% withholding on the amount realized, but REIT, corporate, partnership, and fund exits can follow different FIRPTA withholding rules.

Capital gains tax on foreign investments for nonresidents

The US does not tax nonresident aliens on foreign-source capital gains. If you live in Spain and sell shares of a German company or a London flat, the IRS has no claim on the gain – the income is foreign-source and falls outside the US tax net entirely.

Why foreign-source gains stay outside the US tax

Source follows the seller's tax home for personal property. An NRA with a tax home in Madrid sells foreign stocks: the gain is sourced to Spain, not the US, regardless of which broker executed the trade. The same logic covers capital gains tax for foreign shares, foreign mutual funds, foreign real estate, and foreign business interests.

This is the structural difference between NRAs and US citizens. Americans abroad pay US tax on worldwide gains under citizenship-based taxation; NRAs do not.

The two situations that change the answer

Foreign-source gains become US-taxable when one of two things happens:

  • The gain is ECI – tied to a US trade or business that the NRA actively runs. Rare for portfolio investors, but it catches foreign assets used in a US business.
  • Residency status changes mid-year – moving to the US and meeting the substantial presence test pulls you into worldwide taxation from the residency starting date forward. Gains realized after that date on foreign assets are now US-taxable.

The capital gains tax on foreign investments hinges on timing. A Singapore investor who sells foreign stocks while still abroad owes nothing to the IRS. The same investor selling the same stocks two months after relocating to New York – and meeting substantial presence – is taxed on the post-move gain like any US resident.

What capital gains tax rate applies to nonresident aliens?

There is no single capital gain tax rate for non-resident sellers – the rate depends on what was sold, where the seller's tax home sits, and whether a treaty applies. The same NRA can pay 0%, 15%, 20%, or 30% on different transactions in the same year.

For most NRAs, portfolio capital gains are taxed at 0% – the punishing 30% rate only applies if the 183-day rule is triggered, and US real estate is taxed at the same graduated rates US residents pay.

Situation Rate How it's calculated
Non-ECI portfolio gains (foreign tax home, under 183 days) 0% Not US-source for the NRA – no US tax
US-source gains under the 183-day rule 30% flat Net gains, no deductions or carryovers; lower under treaty
ECI gains (US trade or business) Graduated, up to 37% Taxed like a US resident, deductions allowed
US real estate (FIRPTA) 0%, 15%, or 20% long-term Graduated rates on the gain; 15% withholding at closing
Short-term ECI or FIRPTA gains Up to 37% ordinary rates Held one year or less
Treaty-modified gains Varies Per the US tax treaty with the seller's country

 

The long-term capital gain tax for non-resident sellers on US real estate or ECI gains follows the standard 0%/15%/20% brackets – $0 to $48,350 at 0%, $48,351 to $533,400 at 15%, above that at 20% for single filers. The same brackets apply to NRAs filing Form 1040-NR with long-term capital gains in the ECI bucket.

Treaties can override every row in the table. Some US treaties exempt capital gains entirely (other than US real estate), some reduce the 30% rate to 15% or 10%, and some leave the default in place. Check the capital gains article of your country's treaty before assuming a rate.

When does a nonresident need to file a US tax return for capital gains?

An NRA files a US tax return for capital gains whenever the IRS has either a tax claim or money to refund. In practice, that means filing Form 1040-NR for a taxable US-source gain, a FIRPTA sale with taxable gain or withholding to claim, ECI gains from a US business, refundable withholding, or a treaty position to claim.

The five filing triggers

You file Form 1040-NR if any one of these applies:

  • FIRPTA sale – a US real property sale often requires Form 1040-NR because you may need to report a taxable gain or claim credit for withholding, but a loss sale does not automatically require a return unless tax was withheld or another filing trigger applies.
  • Capital gains under the 183-day rule – US-source gains realized while present in the US for 183+ days, taxed at the flat 30% rate. Reported on Schedule NEC.
  • ECI capital gains – gains effectively connected with a US trade or business, taxed at graduated rates on page 1 of Form 1040-NR.
  • Refund of overwithholding – FIRPTA withholding exceeds actual tax, or a broker withheld 30% on a gain that was not actually US-source. The return is the only way to get it back.
  • Treaty-based position – claiming a reduced or zero rate under a tax treaty requires Form 1040-NR and Form 8833, where disclosure is required by the IRS instructions.

Schedule NEC vs. page 1

The two parts of Form 1040-NR handle different income types:

  • Page 1 – ECI, taxed at graduated rates with deductions allowed. FIRPTA gains live here.
  • Schedule NEC – non-ECI US-source income, taxed at the flat 30% (or treaty rate). The 183-day rule capital gains on land here.

Putting a gain in the wrong section changes both the rate and the deductions allowed, so the classification matters before the math.

Filing deadline

NRAs with US wages file by April 15. NRAs without US wages file by June 15. Both can extend to October 15 with Form 4868. After a FIRPTA sale, the return is due in the year following the closing – not at closing itself.

The non-resident capital gains tax return ends up doing two jobs at once: it calculates the actual liability and reclaims any excess deposit the IRS is holding. Skip the filing and the deposit stays with the IRS.

Can tax treaties reduce capital gains tax for nonresidents?

Tax treaties can reduce or eliminate the US capital gains tax in some situations, but FIRPTA gains on US real estate almost always stay taxable regardless of the treaty. The 30% flat rate under the 183-day rule and certain ECI gains are where treaties do the most work.

What treaties typically change

Most US tax treaties have a capital gains article that reassigns taxing rights. The common patterns:

  • Portfolio gains – often taxable only in the seller's country of residence, which can drop the 30% US rate to 0%.
  • Real estate gains – almost always remain taxable in the country where the property sits, which preserves FIRPTA.
  • Business asset gains – usually taxable in the country where the underlying permanent establishment is located.
  • Ship, aircraft, and container gains – often exempt in the source country under specific articles.

The exact wording differs by country. The IRS tax treaty tables summarize the rates, but only the treaty text itself controls.

Why FIRPTA usually survives the treaty

US treaties consistently carve out gains from real property. The OECD model treaty – the basis for most US treaties – assigns taxing rights on real estate gains to the country where the property is located. Even treaties that exempt all other capital gains keep US real estate inside the US net, so FIRPTA withholding still applies at closing.

How to actually claim a treaty benefit

Two things have to happen:

  • File Form 1040-NR for the year of the gain.
  • Attach Form 8833 only when your treaty claim requires disclosure; the IRS instructions list exceptions, so not every treaty-based capital-gains claim needs Form 8833.

Skipping Form 8833 when required can trigger a $1,000 penalty per failure, even if the treaty position itself is correct. Brokers and FIRPTA withholding agents do not apply treaty rates on their own – the burden is on the seller to file and claim.

Also read. US tax treaties

Common mistakes nonresidents make with capital gains tax

Six errors come up over and over in NRA capital gains filings, and most of them cost money. The pattern is usually the same: someone assumes a rule that applies to US residents also applies to them, or vice versa.

The recurring mistakes:

  • Treating FIRPTA withholding as the final tax. The 15% deposit at closing is not the bill. The actual tax is on the gain, not the gross price – and the refund only comes if Form 1040-NR is filed.
  • Skipping Form 1040-NR after a US property sale. A FIRPTA sale often requires a return to report a taxable gain or reclaim excess withholding, but a loss sale does not automatically trigger a filing requirement unless tax was withheld or another trigger applies
  • Confusing the 183-day rule with the substantial presence test. Same number, different rules. Being "exempt" under SPT (typical for F or J visas) does not exempt you from the 30% rate under IRC §871(a)(2).
  • Treating US dividends like capital gains. Dividends are FDAP with 30% withholding (often reduced by treaty); portfolio capital gains usually are not US-taxable for an NRA at all.
  • Claiming a refund without an ITIN. No tax ID, no refund. File Form W-7 alongside or before the FIRPTA paperwork, not after.
  • Assuming US citizens abroad are NRAs. They are not. Citizens pay US tax on worldwide income regardless of where they live, and file Form 1040, not 1040-NR.

Examples: how the NRA capital gains tax works

Three short scenarios from TFX's NRA filings show how the same rules produce very different outcomes depending on residency, presence, and asset type.

Example 1: Foreign investor sells US stocks

Based on a TFX client scenario: a French resident with a tax home in Paris sells $200,000 worth of US tech stocks through a US broker, realizing a $60,000 long-term gain. She spent zero days in the US during the tax year.

  • US-source for sourcing rules? No gain is sourced to her tax home (France).
  • ECI? No.
  • 183-day rule? No.
  • US tax owed: $0. The broker may withhold 30% on dividends (potentially reduced by treaty), but the capital gain itself is outside US tax.

Example 2: NRA sells a US condo

Based on a TFX client scenario: a UK resident sells a Miami condo for $750,000. He bought it in 2017 for $500,000 (adjusted basis after improvements: $520,000), generating a $230,000 long-term gain.

  • FIRPTA withholding at closing: $112,500 (15% of $750,000).
  • Actual federal tax on the gain: ~$27,248 (0% on the first $48,350; 15% on the remaining $181,650 for a single filer with no other income)
  • Refund after filing Form 1040-NR: ~$85,252

The buyer files Forms 8288 and 8288-A. The seller files Form 1040-NR the following year, applies the withholding as a credit, and claims the refund.

Example 3: F-1 student spends 183+ days, sells US stock

Based on a TFX client scenario: an Indian student on an F-1 visa is in the US for 280 days during the year. She sells US stock and realizes a $15,000 short-term gain.

  • NRA status? Yes – F-1 days are exempt from substantial presence.
  • 183-day rule? Yes – physically present 183+ days.
  • US tax owed: The 30% rate applies only if the student's tax home is in the United States; physical presence alone is not always enough. If the tax home is in the US, the tax would be 30% × $15,000 = $4,500, potentially reduced by the US-India treaty.
  • Reported on: Schedule NEC of Form 1040-NR.

She remains a nonresident for every other purpose, but the 30% capital gains rate may still apply if her tax home is in the United States. This is the trap that catches most foreign students who trade actively while studying in the US.

These three patterns cover most of the US capital gains tax for foreign investor situations that show up in practice – low or zero tax for offshore investors, FIRPTA-driven outcomes for property, and the 183-day trap for visa holders.

Understanding capital gains tax for foreign residents is the first step toward avoiding costly surprises at closing or at filing.

Need help calculating FIRPTA refunds, treaty positions, or 1040-NR filings?
Learn more
Need help calculating FIRPTA refunds, treaty positions, or 1040-NR filings?

FAQ

1. Are non-residents subject to capital gains tax in the US?

Usually not on portfolio investments. The answer depends on three things: asset type, source of the gain, and ECI status. NRAs with a foreign tax home and fewer than 183 days in the US generally owe nothing on US stock or bond gains. US real estate is the main exception – FIRPTA generally applies, though withholding exceptions and nonrecognition rules can apply.

2. How does the capital gains tax for non-residents differ from the rules for US residents?

US residents pay tax on worldwide capital gains at graduated rates. NRAs are taxed only on specific US-source gains – primarily real estate under FIRPTA, ECI from a US business, and US-source gains realized during a 183+ day stay. Foreign-source gains are outside the US tax net entirely.

3. Are US stocks taxable under US capital gains tax for foreigners?

Generally no. Portfolio gains on US stocks are not taxed unless the seller has US-source ECI or spends 183+ days in the US during the tax year. Dividends from US corporations paid to NRAs are generally FDAP income subject to 30% withholding, often reduced by treaty. US tax residents report dividends under resident rules instead.

4. Are foreign shares taxable for foreign residents under US rules?

No. Foreign shares are foreign-source assets, and the IRS does not reach offshore stock or fund sales for someone with no US tax home. The same applies to foreign real estate, foreign mutual funds, and foreign business interests.

5. What is the long-term capital gain tax for foreign investors selling US assets?

It depends on the asset. Real estate gains (FIRPTA) follow the standard 0%/15%/20% long-term brackets, the same as those for US residents. The 30% rate under the 183-day rule is flat and not split into long- vs short-term. Outside these triggers, the effective capital gains tax rate for foreigners is 0%.

6. Do I need to file Form 1040-NR for capital gains as a non-US resident?

Yes, whenever the IRS has a tax claim or holds money to be refunded. That includes a FIRPTA sale where tax is due, or withholding was made, 183-day-rule gains, ECI gains, FIRPTA withholding that exceeded actual tax, and any treaty-based position. Non-US-resident capital gains tax filings without an ITIN cannot be processed for a refund – apply for one with Form W-7 if you don't already have an SSN or ITIN.

7. Is FIRPTA withholding refundable under US tax on capital gains for foreigners?

Yes, when withholding exceeds the actual tax. The 15% deposit at closing is calculated on the gross sale price, but the real tax is calculated on the gain. The difference comes back as a refund after Form 1040-NR is filed.

8. Does the 183-day rule always make me a US resident for capital gains tax and non-resident purposes?

No. The 183-day capital gains rule (IRC §871(a)(2)) is separate from the substantial presence test. You can stay an NRA for every other purpose – common for F, J, M, or Q visa holders – and still owe the flat 30% on US-source capital gains in any year you are physically present 183+ days.

Further reading

What is FIRPTA? A guide for foreign sellers and US buyers
Form 1040-NR: A comprehensive guide for nonresident aliens
Form 1040 vs 1040-NR: how to choose the correct tax form
Capital Gains & Expats
US tax rules for resident and nonresident aliens: a complete guide
F-1 International Student Tax Return 101
Andrew Coleman
Andrew Coleman
CPA
Andrew Coleman, an accomplished CPA with a Master's in Accounting from the University of Kansas, has 15 years of experience. He specializes in expatriate taxation and provides customized advice to US expatriates.
This article is for informational purposes only and should not be considered as professional tax advice – always consult a tax professional.