Skip to content

Capital Gains for Nonresident Aliens

  • Income Types
  • 18 min read
  • Updated: September 11, 2026

For a nonresident alien (NRA), a profit from selling an investment is not automatically subject to U.S. federal income tax simply because the asset is American, the trade occurred on a U.S. exchange, or the account is held with a U.S. broker. The result can depend on the source of the gain, the seller’s tax home, physical presence in the United States during the tax year, whether the gain is effectively connected with a U.S. trade or business, the type of property sold, and any applicable income tax treaty.

Those tests do not all use the same definitions. The 183-day rule that can apply to certain capital gains is separate from the substantial presence test used to determine federal tax residency. U.S. real estate has its own FIRPTA rules. A partnership interest can fall under another set of rules. For ordinary investment shares, even the source of the gain may depend on the seller’s tax home rather than the location of the corporation or broker.

Start With the Asset and the Source of the Gain

Capital gains cannot be analyzed from the brokerage statement alone. The first distinction is the property that produced the gain.

Federal rules that commonly determine the treatment of capital gains received by nonresident aliens.
Property or Transaction Rule That Usually Needs to Be Examined First Why It Is Different
Ordinary corporate stock or fund shares Personal-property sourcing and tax home A U.S. issuer or U.S. broker does not by itself make the sale gain U.S.-source.
U.S. land, house, apartment, or other U.S. real property interest FIRPTA and effectively connected gain rules The ordinary 183-day capital-gain rule does not control the result.
Certain partnership or publicly traded partnership interests IRC Sections 864(c)(8) and 1446(f) Part of the gain can be treated as effectively connected income and withholding may apply.
Property connected with a U.S. trade or business Effectively connected income rules Net-basis taxation generally replaces the flat non-ECI capital-gain treatment.
Certain OID obligations and narrow statutory categories Special capital-gain rules Some gains can be subject to U.S. tax without regard to the ordinary 183-day rule.

This distinction matters because the familiar statement that “nonresident aliens generally do not pay U.S. capital gains tax” is too broad. It may describe many ordinary investment situations, especially for an investor living outside the United States, but it does not resolve U.S.-source gains, U.S. real property, effectively connected gains, or certain partnership dispositions.

Stock and Fund Sales Usually Depend on the Seller’s Tax Home

For source-of-income purposes, the IRS generally treats gain or loss from the sale or exchange of personal property as U.S.-source when the nonresident alien has a tax home in the United States. If the individual does not have a U.S. tax home, the gain or loss is generally treated as foreign-source. Special rules can alter this result for certain property and transactions involving offices or fixed places of business.

Ordinary shares of corporate stock are personal property. This means that selling shares of a U.S. corporation does not automatically create U.S.-source gain merely because the corporation is incorporated in the United States. The exchange on which the shares trade and the country in which the brokerage account is maintained also do not, by themselves, determine the source of the sale gain.

The treatment of a stock sale should also be separated from the treatment of a dividend received on the same shares. A dividend paid by a U.S. corporation is generally U.S.-source under a different sourcing rule and may be subject to the 30% statutory rate or a lower treaty rate when it is not effectively connected income. A gain from selling the shares is a different category of income and requires its own source analysis.

A U.S. Brokerage Account Does Not by Itself Create a U.S. Trade or Business

The IRS also separates investment trading from carrying on a U.S. trade or business. If an NRA’s only U.S. business activity is trading stocks, securities, or qualifying commodities through a U.S. resident broker or other agent, that activity generally does not make the individual engaged in a U.S. trade or business. Trading for the individual’s own account generally receives similar treatment, even when the trades are placed while the individual is physically present in the United States.

That rule has limitations. Different results can arise for dealers or when transactions are carried out through, or directed by, a U.S. office or other fixed place of business. The trading rule therefore addresses the existence of a U.S. trade or business; it does not replace the separate source-of-gain analysis.

Tax Home Can Change the Result for Students, Scholars, and Other Long-Term Visitors

Tax home is a tax concept, not a synonym for citizenship, immigration status, permanent residence, a mailing address, or the address shown on a brokerage account. Under the general IRS definition, a person’s tax home is usually the general area of the main place of business, employment, or post of duty. When there is no regular or main place of business, the place where the individual regularly lives may become relevant.

This distinction is especially relevant to people who remain nonresident aliens for several years under the exempt-individual rules used for the substantial presence test. A student or scholar can remain an NRA for federal tax-residency purposes while facts relating to employment, scholarship income, expected length of stay, or other activities cause the tax-home analysis to point to the United States.

IRS guidance for foreign students explains that employment or self-employment expected to last for more than one year can establish a U.S. tax home in some circumstances. U.S.-source scholarship or fellowship income can also affect the analysis. By contrast, an NRA student with no employment, trade or business activity, or scholarship or fellowship income may not have established a U.S. tax home. The facts surrounding the person’s activity and expected duration in the United States matter more than the visa label alone.

For ordinary personal-property gains, this tax-home determination can decide whether the gain is U.S.-source before the 183-day capital-gain rule is even considered.

The Capital-Gain 183-Day Rule Is Not the Substantial Presence Test

Two different federal tax rules use the number 183, which creates an easy source of confusion. The IRS expressly states that the 183-day capital-gain rule is unrelated to the 183-day calculation under the substantial presence test.

The two 183-day concepts answer different tax questions.
Rule What It Determines How Days Are Considered
Substantial presence test Whether an alien generally becomes a U.S. resident alien for federal tax purposes Uses the current year and two preceding years. It counts all current-year days, one-third of first preceding-year days, and one-sixth of second preceding-year days, subject to exclusions and other rules.
183-day capital-gain rule Whether certain U.S.-source capital gains of a person who remains an NRA can be taxed under the flat-rate rule Looks at presence in the United States during the relevant tax year rather than the weighted three-year substantial-presence formula.

This difference is particularly relevant to F, J, M, and Q nonimmigrants. Some individuals in these categories can exclude days for purposes of the substantial presence test and therefore remain nonresident aliens. The separate capital-gain rule can still apply when presence in the United States equals or exceeds 183 days during the tax year and the other requirements for taxing the gain are present.

Remaining an NRA under the exempt-individual rules therefore does not, by itself, make the capital-gain 183-day rule disappear.

What Happens When Presence Reaches 183 Days

For capital gains covered by this rule, an NRA who is present in the United States for 183 days or more during the tax year is generally subject to a 30% rate, or a lower treaty rate, on net U.S.-source capital gain. The rule discussed here applies to gains that are not effectively connected with a U.S. trade or business.

The 183-day threshold does not convert every investment gain into U.S.-source income. Source still has to be determined. For ordinary personal property, a person whose gain is foreign-source because there is no U.S. tax home may not reach this 30% rule merely by spending 183 days in the country.

The IRS also states that the rule can apply even when a particular sale took place while the individual was outside the United States. The relevant presence test is applied for the tax year; it is not limited to the physical location of the seller on the trade date.

The 30% Rate Applies to Net U.S.-Source Capital Gain, Not the Sale Price

For this purpose, net gain is generally the excess of U.S.-source capital gains over U.S.-source capital losses that are taken into account under the applicable rules.

For example, suppose a hypothetical NRA has $18,000 of capital gains that fall within the U.S.-source 183-day rule and $6,000 of allowable U.S.-source capital losses for the same calculation. The resulting net gain is $12,000. If the 30% statutory rate applies and no treaty reduction changes the result, the tax produced by that calculation is $3,600. The 30% rate is not applied to the gross proceeds received from selling the investments.

The loss rules are narrower than many resident investors expect. Publication 519 states that the calculation does not take into account a capital loss carryover, capital losses in excess of capital gains, the Section 1202 qualified small business stock exclusion, or losses from property held for personal use. The standard resident-taxpayer treatment should therefore not be assumed to apply to this NRA flat-rate calculation.

Long-Term Holding Does Not Automatically Produce Resident Capital-Gain Rates

The familiar preferential treatment associated with long-term gains on a resident individual’s return is not the default rule for non-ECI gains taxed under the NRA 183-day provision. Publication 519 instead describes a 30% rate, reduced when an applicable treaty provides a lower rate, on the relevant net U.S.-source gain.

A different calculation can apply when the gain is effectively connected with a U.S. trade or business. The character of the gain and the rules used to compute tax then need to be examined under the ECI provisions rather than the flat 183-day rule.

Foreign-Currency Transactions Need Two Exchange Rates

When property is bought and sold in a foreign currency, Publication 519 instructs that the property’s cost and selling price be expressed in U.S. dollars using the exchange rate prevailing on the purchase date and the exchange rate prevailing on the sale date, respectively. Simply calculating a gain in the foreign currency first and converting that single difference at the sale-date exchange rate can produce a different dollar result.

Fewer Than 183 Days Does Not Resolve Every Capital Gain

When an NRA is present in the United States for fewer than 183 days during the tax year, capital gains covered by the ordinary rule are generally exempt from U.S. tax unless they are effectively connected with a U.S. trade or business. That rule still requires attention to the type of asset and the nature of the gain.

Publication 519 lists several narrow categories that can be subject to the 30% or lower treaty rate without regard to the 183-day rule. They include certain gains involving timber, coal, or domestic iron ore with a retained economic interest; certain contingent payments from patents, copyrights, and similar property; certain older patent transfers; and gains on the sale or exchange of original issue discount obligations.

More broadly relevant exceptions arise from U.S. real property and effectively connected property. Neither category should be treated as an ordinary stock gain simply because the transaction produced a capital gain.

Effectively Connected Capital Gains Use a Different Tax Method

The 30% capital-gain rule described above applies to U.S.-source capital gains that are not effectively connected with a U.S. trade or business. When a gain is effectively connected income (ECI), the federal calculation changes.

ECI is generally taxed on a net basis after allowable deductions at the rates that apply to U.S. citizens and resident aliens. Whether investment gain becomes ECI can depend on the relationship between the asset and a U.S. trade or business, including the IRS asset-use and business-activities tests. Property used in or held for use in a U.S. business can produce a different result from a passive investment account.

Owning stocks while working in the United States does not automatically turn those stock gains into ECI. Publication 519 states that corporate stock generally is not treated as an asset used in or held for use in a U.S. trade or business. The surrounding facts can still matter, particularly for dealers, business assets, or transactions associated with a U.S. office.

U.S. Real Estate Is Governed by FIRPTA, Not the Ordinary 183-Day Rule

A foreign person’s sale of a U.S. real property interest follows a separate federal rule. Under FIRPTA, gain or loss from the sale or exchange of a U.S. real property interest is treated as effectively connected with a U.S. trade or business. This treatment applies regardless of whether the seller spent 183 days in the United States.

A U.S. real property interest can include land, buildings, and certain property associated with the use of real estate. It can also include an interest in a domestic corporation that is a U.S. real property holding corporation, subject to statutory exceptions.

FIRPTA’s 15% Withholding Is Not a 15% Capital-Gains Tax

FIRPTA generally requires the buyer or other transferee to withhold 15% of the amount realized by the foreign seller. Amount realized is broader than taxable gain. It generally includes cash paid, the fair market value of other property transferred, and liabilities assumed by the buyer or to which the property remains subject.

Consider a simplified property sale with an amount realized of $500,000. General 15% FIRPTA withholding would equal $75,000. If the seller’s adjusted tax basis were $420,000 before considering other adjustments or selling costs, the economic gain would be far smaller than $500,000. The $75,000 withholding is a collection mechanism; it is not a declaration that the final federal income tax on the gain equals $75,000.

FIRPTA also contains exceptions and reduced-withholding rules. For example, special treatment can apply when the buyer acquires the property for use as a residence. Under the current IRS rules, an amount realized of $300,000 or less can qualify for an exception from withholding when the residence requirements are met, while certain residence purchases above $300,000 and not exceeding $1 million can fall under a 10% withholding rate. These rules concern withholding and include specific conditions; they do not determine the seller’s final taxable gain by themselves.

Some Corporate and REIT Shares Can Enter the Real-Property Rules

The fact that an investor sold stock instead of a building does not always remove FIRPTA from the analysis. U.S. real property interests can include interests in certain domestic U.S. real property holding corporations.

Publication 519 provides a publicly traded exception under which a regularly traded class of corporate stock generally is not treated as a U.S. real property interest unless the foreign person owns more than 5% of the fair market value of that class. For REIT stock, the threshold stated for this rule is more than 10%. REITs, regulated investment companies that meet the qualified investment entity rules, and domestically controlled entities have additional provisions, so a real-estate-linked security can require analysis beyond the ordinary stock-sale rule.

Partnership and PTP Interests Do Not Behave Like Ordinary Corporate Stock

A foreign investor who sells an interest in a partnership engaged in a U.S. trade or business can encounter another special rule. Under IRC Section 864(c)(8), gain or loss from disposing of the partnership interest can be treated as effectively connected to the extent determined by reference to the gain or loss that would have been allocated to the foreign partner if the partnership had sold its assets at fair market value.

Section 1446(f) adds a related withholding system. When its requirements apply, the transferee generally withholds 10% of the amount realized on the transfer of the partnership interest unless an exception or modified withholding rule applies. For publicly traded partnership interests, the regulations include specialized broker withholding rules.

As with FIRPTA, a 10% withholding amount should not be confused with a 10% final tax rate. Withholding is collected against a transaction under its own rules, while the actual effectively connected gain and resulting tax are determined separately.

Tax Treaties Can Change the Domestic Capital-Gain Result

The statutory 30% rate is not always the final rate. An applicable U.S. income tax treaty can reduce or eliminate U.S. tax on certain capital gains when the individual satisfies the treaty’s residence and other requirements. Publication 519 states that most U.S. income tax treaties provide an exemption for gains from the sale or exchange of personal property, while gains from U.S. real property generally remain taxable.

A treaty result cannot be determined from citizenship alone. Treaty residence, the treaty article covering gains, permanent-establishment provisions, special rules for real property, and other treaty conditions can affect the outcome. A treaty may also distinguish ordinary personal property from property connected with a business or permanent establishment.

This is why a single country-by-country “capital gains rate” can be misleading. Two people from the same country can have different U.S. results if their treaty residence, asset type, business connection, or U.S. tax status differs.

How Capital Gains Fit Into Form 1040-NR Reporting

The reporting path reflects the tax category of the gain rather than using one schedule for every NRA capital transaction.

Publication 519 directs gains and losses from sales or exchanges of capital assets that are not effectively connected with a U.S. trade or business to Schedule NEC (Form 1040-NR). This includes capital gains taxed under the flat NRA rule rather than under the ECI rules.

Capital-asset gains and losses that are effectively connected are generally reported using a separate Schedule D (Form 1040), Form 4797, or both as appropriate, with the forms attached to Form 1040-NR. Transfers of partnership interests covered by Sections 864(c)(8) or 897(g) can also involve Schedule P (Form 1040-NR).

Taxable capital gain that is not effectively connected is not usually subject to routine withholding in the same manner as a U.S.-source dividend. FIRPTA and Section 1446(f) are prominent exceptions because they impose transaction-specific withholding systems. A withholding amount shown on transaction documents therefore does not, by itself, establish either the final taxable gain or final federal tax.

The federal filing result can also depend on facts beyond the gain itself, including the tax year, NRA status, other U.S.-source income, whether a U.S. trade or business exists, treaty positions, withholding already collected, and the forms issued for the transaction. State income tax rules are separate from federal NRA rules and can use different residency and sourcing standards.

How the Same Investment Can Produce Different Results

Foreign Investor Selling U.S. Shares While Living Abroad

An NRA with a foreign tax home who sells ordinary shares of a U.S. corporation through a U.S. brokerage account may have foreign-source gain under the general personal-property sourcing rule. The nationality of the corporation and location of the broker do not by themselves turn that gain into U.S.-source capital gain. A dividend received from the same corporation can have a different U.S. tax treatment because dividends use a different source rule.

F-1 Student Who Remains an NRA but Spends Most of the Year in the United States

An F-1 student may remain a nonresident alien because days are excluded from the substantial presence test during an applicable exempt-individual period. If actual presence in the United States reaches 183 days during the year, however, the separate capital-gain rule can still become relevant. The analysis then also needs to determine whether the student’s tax home is in the United States and whether the capital gain is U.S.-source.

NRA Present in the United States for 120 Days

For ordinary non-ECI capital gains covered by the 183-day provision, presence for fewer than 183 days generally keeps those gains outside the flat 30% capital-gain tax. That does not extend to U.S. real property gains, effectively connected gains, or the narrow categories that Publication 519 places outside the 183-day limitation.

Foreign Owner Selling a U.S. Apartment

A sale of U.S. real property enters the FIRPTA and ECI rules even if the foreign seller spends very little time in the United States during the year. The buyer may also have a withholding obligation based on the amount realized. The ordinary stock-sale discussion about tax home and the 183-day threshold is therefore not the controlling analysis.

Foreign Investor Selling a Partnership Interest

A partnership interest can produce effectively connected gain under Section 864(c)(8), together with possible 10% withholding under Section 1446(f). Treating the interest as though it were ordinary corporate stock could therefore produce the wrong federal tax analysis even when both investments appear in the same brokerage account.

Resources Used

Leave a Reply

Your email address will not be published. Required fields are marked *