Answered September 2026

Your 2027 ETF sale is free of U.S. federal capital-gains tax if you remain a nonresident alien and either lack a U.S. tax home or spend fewer than 183 actual days here; with a U.S. tax home and 183 or more days, the net gain is taxed at 30% or a lower treaty rate.

“I am in my third year in the US on an F1 visa (non-resident alien) and will lose tax residency in my home country next year. In 2027, before becoming a US tax resident in 2028, I want to sell Ireland-domiciled ETFs held in a non-US brokerage to avoid PFIC issues. If I sell them in 2027 when I have no tax home, do I owe capital gains tax to the US, or are these considered non-US source gains that the US won't tax?”

Summary

Your plan can work, and the foreign brokerage does not create a PFIC problem by itself while you are truly an NRA. The main risk is assuming that F-1 nonresident status means you have no U.S. tax home—it does not.

Your federal result turns on three separate questions: your 2027 tax residency, your U.S. tax home, and your actual days in the United States.

NRA with no U.S. tax hometax-free

If you remain a for 2027 and have no U.S. , IRC §865 treats the ETF gain as foreign-source. IRC §872 generally excludes foreign-source, non-ECI income from an NRA’s federal gross income, so no U.S. federal capital-gains tax applies; ordinary own-account securities trading is not a U.S. trade or business under IRC §864(b)(2)(A)(ii).

U.S. tax home, under 183 daysunder 183

If you remain an NRA but have a U.S. tax home, IRC §865 makes the gain U.S.-source. It is nevertheless outside the special NRA capital-gains tax if you are physically present for fewer than 183 days in 2027, assuming it is not ECI (IRC §871(a)(2); 2025 Form 1040-NR instructions).

U.S. tax home, 183+ daystaxable

If you have a U.S. tax home and are physically present for at least 183 days in 2027, your net U.S.-source capital gain is taxed at 30%, unless an applicable treaty gives you a lower rate. You report it on Form 1040-NR, Schedule NEC—not Schedule D (IRC §871(a)(2); IRS capital-gain guidance).

U.S. resident for 2027PFIC applies

If 2027 turns out to be a U.S.-resident tax year, you are a , and a gain from disposing of PFIC stock is one of the events that generally requires Form 8621. Your pre-residency strategy therefore works only if your 2027 NRA premise is correct (IRC §7701(a)(30); Form 8621 instructions).

These branches assume an ordinary own-account investment sale, that you are not a securities dealer, and that the gain is not otherwise .

Read the full explanation

Watch out for

Tax residence is not tax homeBeing an F-1 does not automatically mean you lack a U.S. . The IRS says qualifying long-term U.S. employment or a U.S.-source scholarship can establish one, while a student with neither has not established one; losing tax residence in your home country does not answer this U.S. test (IRS guidance updated August 18, 2026; IRC §865(g)).
Two different 183-day rulesThe is separate from the . Days excluded because of F-1 student status can still matter for the capital-gain rule, so count your actual physical presence during 2027 (IRC §871(a)(2); IRS guidance updated July 23, 2026).
PFIC status follows U.S.-person statusA nonresident alien can be treated as a U.S. resident only for the IRC §865 sourcing rule without becoming a for purposes. But if 2027 turns out to be a U.S.-resident tax year, a PFIC disposition can require Form 8621 (IRC §7701(a)(30); Form 8621 instructions).
Your residency year may be offF-1 student days are ordinarily excluded through the fifth exempt calendar year; after that, the exclusion requires additional proof. “Third year” does not identify your first exempt calendar year or any earlier F, J, M, or Q time, so the assumption that residency begins in 2028 must be verified under IRC §7701(b)(5)(E)(ii).
Fund location does not decide sourcingIreland domicile and a non-U.S. brokerage do not, by themselves, make the gain foreign-source. For personal-property sales, IRC §865 generally sources the gain according to whether the seller is a “United States resident” under that section—including whether a nonresident alien has a U.S. tax home.

Next steps

Follow these steps in order to confirm whether the 2027 sale falls in the tax-free branch and document the result.

Before selling

Confirm that 2027 is an NRA year

Apply IRC §7701(b)(5)(E)(ii): student days are generally excludable through your fifth exempt calendar year; after that, extra conditions apply. If you qualify in 2027, complete Parts I and III of Form 8843. Do not rely only on the phrase “third year,” because any relevant earlier exempt calendar year affects the count.

Requirements

Every calendar year in which you previously claimed F, J, M, or Q exempt-individual treatment
Dates of any immigration-status or tax-residency change
Completed 2027 Form 8843 if you qualify for the student day exclusion

After residency is confirmed

Classify your 2027 U.S. tax home

Use the IRS student rules: employment expected to last longer than one year can establish a U.S. tax home from the employment start date; U.S.-source scholarship eligibility expected to last longer than one year can establish it from the first eligible date; a student with neither employment nor a U.S.-source scholarship has not established a U.S. tax home under the IRS example.

Requirements

Original expected length of your U.S. stay
U.S. employment or self-employment start date and expected duration
U.S.-source scholarship or fellowship eligibility dates and expected duration

Before choosing the tax branch

Count your actual 2027 U.S. days

Count physical-presence days for the separate NRA capital-gain rule. Do not remove days merely because they are excluded from the substantial-presence test: the IRS expressly says the two 183-day rules are unrelated.

Requirements

Dated travel records for all 2027 entries and departures

While the NRA conclusion still applies

Complete and document the ETF sale

Complete the disposition during the confirmed 2027 NRA period and retain the confirmation. If you are an ordinary own-account investor rather than a securities dealer, IRC §864(b)(2)(A)(ii) says that trading does not itself create a U.S. trade or business. Form 8621’s disposition rule generally applies to a U.S. person, so the PFIC-free conclusion depends on 2027 actually remaining an NRA year.

Requirements

Broker trade confirmation showing the 2027 disposition
Acquisition and cost-basis records
Statements identifying every fund sold

After 2027 ends

File the applicable 2027 federal forms

Taxable branch: report the net U.S.-source gain on 2027 Form 1040-NR, Schedule NEC—not Schedule D. Under the current deadline rule, file by the 15th day of the fourth month after year-end if you received employee wages subject to U.S. withholding, or the 15th day of the sixth month otherwise. Tax-free branch: if no other rule requires Form 1040-NR, file Form 8843 alone by the applicable Form 1040-NR due date; the current Form 8843 uses the IRS Service Center in Austin, but the exact 2027 mailing instructions have not yet been issued.

Requirements

Completed Form 8843
Form 1040-NR and Schedule NEC if the gain is taxable
Sale proceeds, cost basis, U.S.-source losses, and treaty documentation if claiming a reduced rate

Legal sources

This answer is grounded in the Internal Revenue Code, Treasury regulations, and current IRS guidance and form instructions.

IRC §865

This statute makes tax home—not the fund’s domicile or brokerage location—the key personal-property sourcing fact for an NRA.

IRC §865

§865(a), (g)(1)

Except as otherwise provided in this section, income from the sale of personal property- (1) by a United States resident shall be sourced in the United States, or (2) by a nonresident shall be sourced outside the United States. The term "United States resident" means- (i) any individual who- (I) is a United States citizen or a resident alien and does not have a tax home (as defined in section 911(d)(3)) in a foreign country, or (II) is a nonresident alien and has a tax home (as so defined) in the United States, and

Read the full text

IRS: Nonresident alien students and the tax home concept

The IRS identifies the employment, scholarship, intended-duration, and no-income branches that determine an NRA student’s U.S. tax home.

IRS: Nonresident alien students and the tax home concept

An NRA student temporarily present in the U.S. in F, J, M, or Q status who, at the time of his arrival in the U.S., intended to remain in the U.S. for a period longer than 1 year, and who is employed in the U.S. (or self-employed even if illegally under the immigration law) has established his tax home in the U.S. beginning on the date his employment or self-employment begins if such employment or self-employment is expected to last for a period longer than 1 year. An NRA student temporarily present in the U.S. in F, J, M, or Q status who, at the time of his or her arrival in the U.S., who intends to remain in the U.S. for a period longer than 1 year, and who is the recipient of a U.S. source scholarship or fellowship has established his or her tax home in the U.S. beginning on the first date he or she is eligible to receive such scholarship or fellowship income if his or her eligibility to receive such scholarship or fellowship income is expected to last for a period longer than 1 year. An NRA student temporarily present in the U.S. in any nonimmigrant status who is not employed (or self-employed even if illegally under the immigration law) and is not the recipient of a U.S. source scholarship or fellowship, has not established a tax home in the U.S..

Read the full text

IRC §871(a)(2)

This is the statutory 30% tax on an NRA’s net U.S.-source capital gains after 183 days of physical presence.

IRC §871(a)(2)

§871(a)(2)

In the case of a nonresident alien individual present in the United States for a period or periods aggregating 183 days or more during the taxable year, there is hereby imposed for such year a tax of 30 percent of the amount by which his gains, derived from sources within the United States, from the sale or exchange at any time during such year of capital assets exceed his losses, allocable to sources within the United States, from the sale or exchange at any time during such year of capital assets.

Read the full text

IRS: Taxation of capital gains of nonresident students

The IRS confirms the no-U.S.-tax-home result and warns that the capital-gain day count is not the substantial-presence test.

IRS: Taxation of capital gains of nonresident students

If a nonresident does not have a tax home in the U.S., then the nonresident’s U.S. source capital gains would be treated as foreign-source and thus nontaxable. This 183-day rule bears no relation to the 183-day rule under the substantial presence test of Internal Revenue Code (IRC) 7701(b)(3). A flat tax of 30 percent (or lower treaty) rate is imposed on U.S. source capital gains in the hands of nonresident individuals present in the U.S. for 183 days or more during the taxable year.

Read the full text

IRC §872(a)

This limits an NRA’s federal gross income to U.S.-source income and income effectively connected with a U.S. trade or business.

IRC §872(a)

§872(a)

In the case of a nonresident alien individual, except where the context clearly indicates otherwise, gross income includes only- (1) gross income which is derived from sources within the United States and which is not effectively connected with the conduct of a trade or business within the United States, and (2) gross income which is effectively connected with the conduct of a trade or business within the United States.

Read the full text

IRC §864(b)(2)(A)(ii)

An ordinary investor’s own-account securities trading is not itself a U.S. trade or business; dealers are excluded from this protection.

IRC §864(b)(2)(A)(ii)

§864(b)(2)(A)(ii)

Trading in stocks or securities for the taxpayer's own account, whether by the taxpayer or his employees or through a resident broker, commission agent, custodian, or other agent, and whether or not any such employee or agent has discretionary authority to make decisions in effecting the transactions. This clause shall not apply in the case of a dealer in stocks or securities.

Read the full text

Instructions for Form 8621 (Rev. December 2025)

Form 8621 disposition reporting generally applies to U.S. persons who recognize PFIC gain.

Instructions for Form 8621 (Rev. December 2025)

Who Must File

Generally, a U.S. person that is a direct or indirect shareholder of a PFIC must file Form 8621 for each tax year under the following five circumstances if the U.S. person: Receives certain direct or indirect distributions from a PFIC, Recognizes gain on a direct or indirect disposition of PFIC stock, Is reporting information with respect to a Qualified Electing Fund (QEF) or section 1296 mark-to-market election, Is making an election reportable in Part II of the form, or Is required to file an annual report pursuant to section 1298(f).

Read the full text

IRC §7701(a)(30)

For an individual, U.S.-person status means being a U.S. citizen or resident—not merely having a U.S. tax home for IRC §865 sourcing.

IRC §7701(a)(30)

§7701(a)(30)

The term "United States person" means- (A) a citizen or resident of the United States, (B) a domestic partnership, (C) a domestic corporation, (D) any estate (other than a foreign estate, within the meaning of paragraph (31)), and (E) any trust if- (i) a court within the United States is able to exercise primary supervision over the administration of the trust, and (ii) one or more United States persons have the authority to control all substantial decisions of the trust.

Read the full text

IRC §7701(b)(5)(E)(ii)

This sets the five-calendar-year limit and the additional conditions for an F-1 student to keep excluding days afterward.

IRC §7701(b)(5)(E)(ii)

§7701(b)(5)(E)(ii)

For any calendar year after the 5th calendar year for which an individual was an exempt individual under clause (ii) or (iii) of subparagraph (A), such individual shall not be treated as an exempt individual by reason of clause (iii) of subparagraph (A), unless such individual establishes to the satisfaction of the Secretary that such individual does not intend to permanently reside in the United States and that such individual meets the requirements of subparagraph (D)(ii).

Read the full text

Form 8843 (2025)

A qualifying F-1 student uses Form 8843 to claim the student day exclusion and attaches it to Form 1040-NR when filing that return.

Form 8843 (2025)

page 4

If you qualify to exclude days of presence as a student, complete Parts I and III of Form 8843. If you are filing a 2025 Form 1040-NR, attach Form 8843 to it. If you don’t have to file a 2025 tax return, mail Form 8843 to the Department of the Treasury, Internal Revenue Service Center, Austin, TX 73301-0215 by the due date (including extensions) for filing Form 1040-NR.

Read the full text

Instructions for Form 1040-NR (2025)

These instructions provide the current deadline formula for a calendar-year Form 1040-NR.

Instructions for Form 1040-NR (2025)

When and Where Should You File?

If you were an employee and received wages subject to U.S. income tax withholding, file Form 1040-NR by the 15th day of the 4th month after your tax year ends. If you didn’t receive wages as an employee subject to U.S. income tax withholding, file Form 1040-NR by the 15th day of the 6th month after your tax year ends.

Read the full text

These are the official federal rules as published on the cited dates; rules and future form instructions can change.

This is general information about official processes, not legal advice, and SettleKit is not a law firm.

Join the SettleKit newsletter

We research the hard parts of settling in the US and write articles you will not find anywhere else. Subscribe to get each new article by email.

One email per new article. Unsubscribe anytime.

This is likely not your only questionCheck out SettleKit, the best source on the internet for newcomers to the US.
Build your free roadmap