United States · Individuals

Leaving the US: Tax Returns, 401(k) and Accounts

First confirm tax residency. Generally file dual-status Form 1040-NR if resident part-year and nonresident at year end, Form 1040 if resident at year end, or Form 1040-NR if nonresident all year and required. Green-card and treaty rules or a spouse election can change filing. You owe any balance; your 401(k) may stay, while withdrawals can trigger withholding and early tax.

Tax year 2026 · Last updated · Edited and reviewed by Di Lu, CPA

Who this is for

  • Noncitizens leaving the US after living or working there on a visa
  • Green card holders moving abroad
  • Departing workers with a US 401(k), IRA, HSA or stock awards

Not covered here

  • US citizens living abroad
  • Detailed dual-status return preparation or first-year residency choices
  • Exit tax calculations and Form 8854 preparation
  • Tax in the destination country or a state-specific return calculation

When does my US tax residency end after I move abroad?

For a noncitizen who was a US tax resident under the substantial presence test, the move can end residency on the last US presence day, but only if the ending-date conditions are met. Otherwise, the IRS generally uses the end of the calendar year. Your visa expiration or flight date alone does not decide the tax date (IRS: residency ending dates).

To use the earlier date, your tax home must be abroad and you must have a closer connection there for the rest of the year. You must also avoid being a US tax resident in the following calendar year. Sign and date a statement under penalties of perjury with your last US day, foreign tax home and closer-connection facts. Attach it to your return, or send it separately to the IRS by the return due date if no return is required. Without it, you generally cannot claim the earlier termination date. Keep travel, home and work records (IRS: residency ending dates).

Does moving away end my green card tax residency?

No. A green card holder generally remains a US tax resident until the card is formally surrendered, usually on Form I-407, or permanent resident status is revoked; physical departure and the card's printed expiration do not establish a tax ending date. After status ends, an earlier tax ending date still requires a foreign tax home and closer connection for the rest of the year, no US residency in the next year, and consideration of any later substantial-presence ending date. The signed statement described above must include the status-ending date and proof (IRS: residency ending dates; IRS: Form 8854 instructions).

A treaty tie-breaker can instead treat a dual resident as a nonresident for US income tax. Claim that position on Form 1040-NR with Form 8833 by the return due date; failing to disclose a required treaty position can trigger a $1,000 penalty. A long-term green-card holder can also trigger exit-tax reporting by making the treaty claim (IRS: international tax questions; IRS: Form 8833; IRS: Form 8854 instructions).

If you intend to surrender a long-held green card, check the exit-tax guide before claiming a nonresident filing position. A long-term resident generally held permanent residence in at least eight of the last 15 tax years, excluding certain treaty years. On ending residency, file Form 8854 by the departure-year return due date, attaching it to any required return; missing a required Form 8854 can bring a $10,000 penalty. Keep the status-ending record and its effective date, which can change the return and later retirement withholding (IRS: Form 8854 instructions).

If you own S corporation shares, check shareholder eligibility before becoming a nonresident alien; an S corporation cannot have a nonresident alien shareholder (IRS: S corporations). See how S corporations are taxed.

If you held foreign accounts while a US tax resident, including after moving with an active green card, check whether FBAR or Form 8938 applies (IRS: FBAR; IRS: Form 8938). See foreign-account reporting.

Do I need a sailing permit before I leave?

Most departing noncitizens must obtain an IRS sailing permit before a long-term or permanent departure, unless they meet a listed exception. For example, an F-1 or J-1 visa holder may qualify if their US-source income fits the permitted categories. An H-1B worker is not covered by that exception, but an H-4 family member may be. Check each person's visa and income separately (IRS: departing alien clearance).

SituationDeparture documentWhen to act
A listed exception appliesNo permit; keep proof of the exceptionBefore departure
A permit is required and Form 2063 conditions applyForm 2063, generally for no taxable income or for a resident whose departure will not hinder collectionApply no earlier than 30 days before leaving and aim to receive the permit at least two weeks before departure
A permit is required and Form 2063 does not applyForm 1040-C, with any tax due under its rulesArrange an IRS appointment within the same departure window

The IRS permit instructions describe the exceptions, forms, appointment and records to bring. Form 1040-C is a departure filing; it does not replace the annual income tax return (IRS: taxation of nonresident aliens).

What return do I file for the departure year, and which income goes on it?

If you were a resident for part of the year and a nonresident on its last day, the annual federal return is generally Form 1040-NR marked "Dual-Status Return," with a Form 1040 resident-period statement. If you remain resident at year end, the return is generally Form 1040. If you were nonresident all year, file Form 1040-NR if a return is required, without a dual-status statement. Residency must be settled before choosing the form (IRS: dual-status filing procedures; IRS: nonresident filing rules).

If your spouse is a US citizen or resident at year end, you may be able to elect a joint Form 1040. That treats both spouses as US residents for federal income tax and requires both spouses' worldwide income. Both spouses sign a choice statement with the joint return. A joint amended return can make the choice within 3 years after filing the original return or 2 years after paying that year's tax, whichever is later. Check filing with a nonresident spouse before choosing (IRS: nonresident spouse).

For calendar-year dual-status filers who end as nonresidents, the IRS generally sets April 15 if they received wages subject to withholding, or June 15 otherwise. Filing extensions may apply (IRS: dual-status filing deadlines).

A calendar-year Form 1040 is generally due April 15. If you live abroad and your main place of business or post of duty is abroad on that date, you generally have until June 15 to file and pay; attach a statement explaining eligibility. Interest on unpaid tax runs from the April deadline (IRS: overseas filing extension).

Tax period or statusIncome to checkAnnual filing
Resident period before a valid termination dateWorldwide income, including income from outside the USDual-status Form 1040-NR with resident-period statement if nonresident at year end
Nonresident period after that dateUS-source income and income effectively connected with a US trade or business; treaty exemptions may change the resultSame dual-status return
Resident through year endWorldwide income for the resident periodForm 1040, subject to any separate treaty position

US-source pay can remain taxable even when received after you leave, such as compensation for work done in the US. Nonresident-period income not effectively connected with a US business can face a separate gross-income tax unless exempt or reduced by treaty. Dual-status filers generally cannot use the standard deduction. See IRS: dual-status taxation for these rules. Detailed return preparation belongs in the dual-status filing guide.

Can I recover income tax withheld before I left?

Yes, if your annual return shows that federal income tax withheld exceeds your final federal tax. Claim the wage withholding shown on Form W-2 and any nonresident withholding shown on Form 1042-S on the applicable annual return. A sailing permit or Form 1040-C does not settle the year's final tax or by itself produce the refund (IRS: taxation of nonresident aliens; Form 1040-NR instructions).

Withholding is a payment toward tax, not the tax calculation. A treaty claim, deductions allowed for your status, later US income and the correct residency date can change the result. For a refund of tax withheld at source under the nonresident rules, the Form 1040-NR instructions require the relevant Form 1042-S as proof.

If you paid tax with Form 1040-C, claim that payment as a credit on the annual return (IRS: departing alien clearance).

If you already filed, generally claim a refund on Form 1040-X within 3 years after filing the original return or 2 years after paying the tax, whichever is later; payment look-back rules can limit the amount (IRS: refund claim time).

Can I keep my 401(k) or IRA after moving?

Leaving the US does not itself require you to cash out a 401(k) or IRA. A former employer's plan may allow the balance to stay, require a distribution under its terms, or offer a direct rollover to an eligible IRA. Check the plan's terms and ask the plan or IRA provider how it handles a foreign address and later payments (IRS: leaving a job with a retirement plan).

Before deciding, record account type, balance, after-tax basis, loans and provider forms. Ask the plan for a direct rollover to an eligible US traditional plan or IRA before payment to avoid current tax and withholding; if paid to you, a rollover generally must finish within 60 days and you must replace any withholding to roll over the full amount. A Roth conversion can create current taxable income (IRS: rollover rules). If you left that employer in or after the year you turned 55, its 401(k) may qualify for an early-distribution tax exception that an IRA does not; claim an exception missing from Form 1099-R on Form 5329 with your return (IRS: early distribution exceptions). The destination country's treatment is a separate question; if it is Canada, see US retirement accounts in Canada.

What if I withdraw from a 401(k) or IRA as a nonresident?

A US-source 401(k) or IRA distribution to a nonresident generally faces 30% US withholding on the gross US-source payment unless valid documentation supports a lower treaty rate or exemption. The payer may instead use graduated withholding for the portion tied to US services performed after December 31, 1986. A qualified Roth distribution is not subject to withholding. Give the payer accurate foreign-status and treaty documents, usually Form W-8BEN, before payment. The payer's withholding is not necessarily your final tax (IRS: Publication 515; IRS: Publication 15-A).

The treaty result depends on where you are resident for treaty purposes, the type of plan and payment, and whether the payer accepts the required documentation. A taxable withdrawal before age 59½ may also face the 10% additional tax unless an exception applies. Moving abroad is not itself a listed exception (IRS: early distribution exceptions).

Check the payment's US-source and taxable portions, any after-tax basis, the treaty article and any Form 1099-R or Form 1042-S. If too much was withheld or the final liability differs, a Form 1040-NR may be needed to reconcile it (IRS: taxation of nonresident aliens).

Do I need a US return next year if I still receive US income?

You may need Form 1040-NR in a later year if you remain a nonresident and receive taxable US-source income, have a US trade or business, or need to claim a refund of excess withholding. A fully withheld payment can sometimes settle the tax without a return, but that depends on the income and whether withholding was correct. For calendar-year returns, the same April 15 or June 15 deadline above generally applies based on whether you received wages subject to withholding (IRS: taxation of nonresident aliens; Form 1040-NR instructions).

Review pay for earlier US work, retirement distributions, dividends, rental income and continuing US business income. Keeping a US account alone does not automatically require a return. If you rent out US property, see nonresident landlord filing. If you keep a US sole proprietorship or LLC, see nonresident returns for business income.

What should I check about my HSA, stock awards and US bank accounts?

Each account has a different departure check. An HSA can remain after employment ends, stock awards can produce US-source compensation after you leave, and a US bank account needs updated nonresident documentation (IRS: Publication 969; IRS: stock compensation; IRS: bank interest).

ItemCheck before leaving
HSAKeep the balance and contribution history. New contributions require HSA eligibility, including qualifying health coverage. Losing eligibility during a last-month-rule testing period can recapture a prior contribution and add tax. Keep medical receipts. If you receive a distribution as a nonresident, file Form 8889 with Form 1040-NR even if you have no other filing reason (IRS: Form 8889 instructions). Nonmedical withdrawals are generally taxable and may face additional tax; that additional tax does not apply after disability, age 65 or death (IRS: Publication 969).
Stock options or restricted stock unitsKeep grant, vesting, exercise and work-location records. Income paid or recognized after departure can still be US-source to the extent it relates to US work.
US bank accountTell the bank when your tax status and address change and ask whether Form W-8BEN is needed. Ordinary deposit interest is generally exempt from US tax for a nonresident if it is not connected with a US business.

The IRS HSA rules make contribution eligibility depend on coverage, not merely whether the account stays open. The IRS stock-award explanation ties US source to where the related services were performed. The IRS deposit-interest rules distinguish ordinary deposit interest from other investment income; your new country may tax the interest.

Could my former state still treat me as a resident?

Yes. State residency and source-income rules are separate from the federal departure date, so a federal nonresident filing position does not settle the state return. Check the former state's domicile rules, housing and family ties, travel days, work performed there and income paid after the move.

For example, California says a temporary move can leave a person resident and that California-source compensation can remain reportable after residency ends, including some deferred or stock compensation. A California part-year resident or nonresident who must file uses Form 540NR. Calendar-year tax is generally due April 15; someone living or traveling outside the US on that date may file and pay by June 15, with an automatic filing extension to December 15. Interest still runs from the original due date. Other states have their own rules (California FTB: residency; California FTB: filing form; California FTB: due dates).

What records should I gather before filing?

Gather documents that establish the residency date, source of income and tax already paid. The same records help test a sailing-permit exception, a treaty claim and any state return (IRS: residency ending statement; IRS: sailing-permit papers).

  • Passport, visa or green card records, travel-day calendar and any formal green card surrender record.
  • New home, work and family-location records; former state housing and other ties.
  • Final pay statements, Forms W-2, 1099-R and 1042-S, prior returns and proof of estimated payments.
  • 401(k), IRA and HSA statements; plan loan and basis records; stock-award grant and vesting documents.
  • The destination country's residence date and any treaty claim or payer documentation.

Example

Illustrative US dollars; no final tax is calculated. A worker on an H-1B visa leaves in August after earning $80,000 in US wages, with $12,000 of federal income tax withheld. They establish a home and tax home abroad, keep a closer connection there for the rest of the year, are not a US resident the next year, and attach the required ending-date statement. Their departure-year filing is generally dual-status Form 1040-NR with a Form 1040 statement. The $12,000 is credited against the final tax; whether any is refunded depends on the return.

The worker leaves $60,000 in a former employer's 401(k), if the plan permits it. In the following year, assume a $20,000 cash withdrawal is fully taxable and US-source, and the payer applies statutory 30% withholding. Withholding is $6,000 ($20,000 × 30%), leaving $40,000 in the plan before market changes or fees. That $6,000 is withholding, not a conclusion about final tax. The treaty and any early distribution tax still need review.

Different for you?

  • Your green card is still active or you plan to surrender a long-held card: check whether US residency continues and whether exit tax or Form 8854 applies in the exit-tax guide.
  • You need to prepare the dual-status return or make a first-year residency choice: use the dual-status filing guide.
  • You are moving to Canada: coordinate both countries' residence dates and returns in moving from the US to Canada.
  • You will live in Canada with a 401(k) or IRA: check Canada's treatment in US retirement accounts in Canada.
  • You will keep a US rental property: see nonresident landlord filing.
  • Your residency date, treaty position, retirement payment, stock awards or state ties are disputed: bring the records above for individual tax help.

Figures on this page

FigureValueSource
Penalty for not disclosing a treaty-based return position
Per failure, under section 6712; applies to taxpayers other than C corporations.
$1,000IRS: Form 8833 (Rev. December 2022)
Checked
Form 8854 failure penalty
Per required year for a missing, incomplete, or incorrect form, unless reasonable cause applies
$10,000IRS: Instructions for Form 8854
Checked
Amended-return window for the joint-return choice with a nonresident spouse
Both spouses must sign the election statement; later returns may also need amendment when the choice is made retroactively.
3 years after filing the original return or 2 years after paying that year's tax, whichever is laterIRS: Nonresident spouse
Checked
General amended income tax refund claim window
Under IRC section 6511(a), for a claim after an original return was filed. Payment look-back limits and specific exceptions can change the available refund.
3 years after filing the original return or 2 years after paying the tax, whichever is laterIRS: Time you can claim a credit or refund
Checked
US statutory withholding on a nonresident's US-source pension payment
Chapter 3 withholding absent treaty relief or another exception; taxable US-source portion
30%IRS: Publication 515, Pensions, Annuities, and Alimony
Checked
US service date for graduated pension withholding
The payer may apply graduated withholding to the part of a US-source distribution arising from US services performed after this date.
after December 31, 1986IRS: Publication 515
Checked
US additional tax on an early retirement distribution
Usually applies before age 59½ unless a statutory exception applies
10%IRS: Retirement topics — exceptions to tax on early distributions
Checked

Primary sources

About this guide

Edited and reviewed by Di Lu, CPA on . It explains general rules for the tax year shown. It is not advice for your situation.

Changes

  • : First published.

Individual tax

Talk it through with a professional.

Bring your countries, entity and timeline. We will tell you which parts of this guide apply to you and what the work involves.

Book a consultation

Reviewed by Di Lu (CPA) on .