Your Last US Tax Return After You Leave: The Departure-Year Return for OPT, STEM OPT and H-1B Workers
The year you leave the US usually splits your tax life in two, and the return that closes it out follows rules most people only discover after they have moved.

Part of our guide to US taxes on F-1, OPT and H-1B.
Your tax return after leaving the US covers the calendar year you leave: move away in 2026 and you still file a federal return for 2026, due in spring 2027. H-1B workers who were US tax residents usually file a dual-status return: resident from January 1 through their residency termination date, nonresident after it, on Form 1040-NR with Form 1040 attached as a statement. F-1 students on OPT or STEM OPT still within their first five calendar years are usually nonresidents all year and file a plain Form 1040-NR with Form 8843. These rules are in effect as of November 1, 2026, under IRS Publication 519.
Status line, as of November 1, 2026: the current guide is Publication 519 for tax year 2025; the 2026 edition and 2026 Form 1040-NR instructions are not posted, so 2026 details below follow the 2025 rules. A draft 2026 Form 1040-NR (posted 2026-09-17, "DRAFT - DO NOT FILE") adds a work-authorization question, with no instructions yet.
This is the departure-year counterpart to our guide to the dual-status return in your first year in the US, which covers how residency starts.
Which tax return do you file after leaving the US?
Your departure-year return depends on whether you were a US tax resident and, if so, whether your residency ended before December 31. A resident who qualifies for an earlier residency termination date files Form 1040-NR as a dual-status return. A resident who does not qualify stays a resident all year and files Form 1040. Exempt F-1 students file Form 1040-NR.
Which departure-year return fits you (as of 2026-11, tax year 2026)
| Your situation in 2026 | Tax status | Return | E-file? | Federal due date |
|---|---|---|---|---|
| F-1 on OPT or STEM OPT, within your first five calendar years | Nonresident all year | Form 1040-NR plus Form 8843 | Yes | April 15, 2027 with withheld wages; otherwise June 15 |
| H-1B resident who leaves mid-year and meets the termination-date conditions below | Dual-status | Form 1040-NR, Form 1040 as the statement, termination statement | Not for 2025; recheck for 2026 | April 15, 2027 |
| H-1B leaver who misses those conditions | Resident all year | Form 1040, worldwide income | Yes | April 15, 2027; June 15 to file if your home and main workplace are abroad on April 15 |
| Married, with a "nonresident spouse treated as a resident" choice still in effect | Both residents all year | Joint Form 1040 available | Yes | April 15, 2027 |
The 2027 dates are our arithmetic from the 2025 rules in Pub 519. An F-1 student past the five-year limit who meets the substantial presence test follows the H-1B rows.
Am I a dual-status alien in my departure year?
You are if you were a US tax resident for part of 2026 and a nonresident for the rest. Pub 519 says it plainly: "The most common dual-status tax years are the years of arrival and departure." Residency turns on the substantial presence test: 31 days this year and 183 over three years, counting this year's days, a third of last year's and a sixth of the year before, minus exempt F-1 days (our substantial presence test guide).
- H-1B leavers are usually part-year residents. After all of 2024 and 2025 in the US, one-third of 2025 (about 121.7 days) plus one-sixth of 2024 (61) is about 182.7, so 31 days in 2026 is enough (our arithmetic).
- Most OPT and STEM OPT leavers are nonresidents all year. Their OPT pay stays exempt from Social Security and Medicare tax under the IRS student FICA rules; if it was withheld, ask the employer, then file Form 843 with Form 8316. Eligible Indian students can claim the standard deduction under treaty Article 21 ($16,100 single for 2026), but the India treaty has no $5,000 wage exemption.
What is the residency termination date?
It is the day your US tax residency ends: December 31 under Pub 519, unless you qualify for an earlier date, which for a substantial-presence resident is your last day physically present in the US. The "Last Year of Residency" rules:
- Earlier date: usable only if, for the rest of the year, your tax home was in a foreign country and you had a closer connection to it.
- Next-year override: a US resident during any part of the following year stays a resident through December 31 of the departure year, closer connection or not.
- De minimis days: up to 10 days of later US presence can be ignored when fixing the date (a visit is excluded whole or not at all), though they still count for the substantial presence test.
- Treaty tiebreaker: a treaty residence claim with your new country can also produce an earlier date; take that to a tax professional.
What goes in the residency termination statement?
Pub 519 is direct: "You must file a statement with the IRS to establish your residency termination date." You sign it under penalties of perjury and give your name, address, taxpayer ID, visa and passport details, the tax year, your last day in the US, facts showing a foreign tax home and closer connection after that day, and any de minimis dates. Attach it to your return by the Form 1040-NR due date. Without it, you cannot claim the closer connection unless you show by clear and convincing evidence that you took reasonable steps to learn and meet the requirement.
Pub 519 judges a closer connection by facts such as where your home, family, belongings, driver's license and vote are, and the residence you list on forms such as W-8BEN. The statement must describe those facts as they are.
Common misconception, then correction. "Leavers file Form 8840." Form 8840 serves a different rule, for someone present fewer than 183 days who kept a foreign tax home for the entire year. A worker with a US job until July does not fit it; leavers use the termination statement.
Can a green-card filing block the closer connection?
It may. Pub 519's closer-connection section bars the claim if you "personally applied, or took other steps during the year, to change your status to that of a permanent resident," or had an adjustment application pending. That section is written for Form 8840, but the departure-year rules point back to it, so ask a tax professional how any green-card filing affects your date, and an immigration attorney about the case.
Worked example: leaving H-1B for Bengaluru on July 31, 2026
You moved from STEM OPT to H-1B in October 2023, live in California, and were in the US all of 2024 and 2025. You leave on July 31, 2026, start a Bengaluru job on August 17, return for a five-day wedding in December, and spend no time in the US in 2027.
Departure-year timeline (hypothetical, tax year 2026)
| Date | What happens | Tax effect |
|---|---|---|
| Jan 1 to Jul 31 | H-1B work in California, 212 days | Resident period: worldwide income taxed, including interest on an Indian deposit |
| Jul 31 | Last day in the US | Proposed residency termination date |
| August | Final paycheck and leave payout | US-source wages, on Form 1040-NR |
| Aug 17 | Bengaluru job starts | Foreign salary received as a nonresident is not US-taxed |
| Dec 18 to 22 | Five-day US visit | Excluded under the 10-day rule for the termination date |
Split W-2 wages by the date received: January to July on the Form 1040 statement, the August payout on Form 1040-NR, where US-source pay stays taxable. That payout is also California-source: FTB Publication 1031 says "Wages and salaries have a source where the services are performed."
If plans change. If a new H-1B job brings you back in March 2027 and you stay, you remain a resident through December 31, 2026, and Pub 519 counts you as one from January 1, 2027. 2026 becomes a full-year Form 1040 that also reports the Bengaluru salary, with a possible foreign tax credit on Form 1116. If a dual-status return is already filed, ask a tax professional about Form 1040-X.
When does a leaver stay a full-year resident?
Whenever the earlier date is unavailable:
- You are a US resident at any point in the next calendar year.
- You did not keep a tax home and closer connection in one foreign country for the rest of the year.
- You never filed the termination statement.
- A green-card filing blocked the closer connection (see above).
- A "nonresident spouse treated as a resident" choice is still in effect. Pub 519 suspends it only for a year in which neither spouse is a resident at any time, so it still covers the departure year.
Full-year residency taxes worldwide income for all of 2026, including salary earned abroad, but brings back the standard deduction ($16,100 single for 2026), e-filing and, for couples, joint filing. If your facts allow either treatment, a preparer who handles nonresident returns can compare them.
How to file the departure-year return, step by step
Pub 519 bars dual-status returns from the standard deduction, head-of-household rates and joint filing; married filers use married-filing-separately rates, and education credits and the earned income credit are unavailable.
- Download your I-94 travel history from CBP's I-94 site to confirm your last day and later visits; if the exit is missing, see how to prove you left the US.
- Run the substantial presence test for 2026 with Pub 519.
- Collect your W-2 (ask payroll to keep your portal access) and every Form 1099 and 1042-S, then split each item by date received.
- Prepare Form 1040-NR as the return and Form 1040 as the statement. For 2025, Pub 519 says to check the new "Other" box on each and write "Dual Status Return" on the 1040-NR and "Dual Status Stmt" on the 1040; the 1040-NR instructions add "Don't sign the Form 1040 or 1040-SR."
- Sign the termination statement and attach it.
- Mail the package to the dual-status address in the Form 1040-NR instructions: for 2025, Austin, TX 73301-0215 without a payment, P.O. Box 1303, Charlotte, NC 28201-1303 with one. The instructions warn the address may change after 2026.
- File Form 8822 with your new address; Pub 519 says, "If you change your mailing address, be sure to notify the IRS using Form 8822."
- File your state's part-year resident return.
Can you e-file the return from abroad?
A full-year return, yes; a dual-status return, not for tax year 2025. Pub 519's caution is explicit: "Dual-status taxpayers cannot e-file their U.S. income tax return for tax year 2025." The 1040-NR instructions also exempt dual-status returns from the rule that paid preparers must e-file.
So mail with a trackable service and keep proof. Without a US bank account, pay by international wire through the IRS foreign electronic payments page. For 2025 returns, Form 4868 extended the time to file to October 15 (or from June 15 to December 15), not the time to pay.
Do you still owe state taxes after you leave?
Usually, for the departure year: a part-year resident return for the months you lived there, plus tax on state-source income afterwards. FTB Publication 1031 (2025) says "Part-year residents of California are taxed on all income received while a resident and only on income from California sources while a nonresident," on Form 540NR, and California ignores federal treaty exemptions unless a treaty "specifically excludes the income from taxation by California." Our guide to state tax returns when you move covers other states.
What still follows you after the move?
- Your 401(k). Cashing out before 59 1/2 generally brings a 10% additional tax unless an exception applies; rollovers avoid it (IRS Topic 558). Nonresident aliens generally face 30% (or treaty-rate) withholding, not the 20% US-person rule. See our 401(k) withdrawal guide for visa holders and money checklist for leaving.
- FBAR. The FBAR rule covers US persons, including resident aliens, with foreign accounts above $10,000 in aggregate, due April 15 with an automatic extension to October 15. A part-year resident with Indian accounts should ask a preparer whether a 2026 FBAR is due; see our FBAR and FATCA guide.
- The sailing permit. H-1B is not an exempt category, so H-1B leavers generally need one (Form 1040-C or 2063) from an IRS Taxpayer Assistance Center, by appointment, two weeks to 30 days before leaving; F-1 students whose only US income was authorized work, study allowances or certain bank interest are exempt (our sailing permit guide). The Form 1040-C instructions are blunt: "A Form 1040-C is not a final return."
- Later years. Keep US income such as rent and you may still file Form 1040-NR; Pub 519 excludes US bank deposit interest not tied to a US business.
Common mistakes
- Filing a full-year Form 1040 out of habit, reporting foreign salary the US could not tax, or the reverse.
- Claiming the standard deduction on a dual-status return. The India treaty's deduction is for eligible students, not H-1B workers.
- Skipping the termination statement, or filing Form 8840 in its place.
- Forgetting the state, which can tax pay for work done there after you leave.
- Letting IRS mail go to an empty apartment. File Form 8822.
Frequently asked questions
Do I have to file a US tax return the year I leave?
Usually yes. If you earned US wages on H-1B, OPT or STEM OPT that year, you file a federal return for it, due April 15, 2027 for a 2026 departure with withheld wages (our arithmetic from the 2025 rules). A Form 1040-C sailing permit does not replace it.
Am I a dual-status alien in my departure year?
Yes, if you were a US tax resident for part of the year and a nonresident for the rest, which is typical for H-1B leavers. Most OPT and STEM OPT students within their first five calendar years are nonresidents all year and file Form 1040-NR with Form 8843.
What is the residency termination date?
It is the day your US tax residency ends. Under IRS Publication 519 it is December 31, or your last day in the US if you kept a foreign tax home and closer connection for the rest of the year, are not a US resident the next year, and file a signed statement.
Can I e-file my departure-year return from abroad?
The return type decides, not where you live. Full-year Forms 1040 and 1040-NR can be e-filed, but Publication 519 says dual-status taxpayers cannot e-file for tax year 2025, so plan to mail a dual-status return unless the 2026 rules change.
Do I still owe state taxes after I leave?
Often yes, for the departure year. A state with an income tax usually expects a part-year resident return, and pay for work done there can stay taxable after you leave. California taxes part-year residents on all income received while resident and only California-source income after.
Sources
- IRS, Publication 519 (2025), U.S. Tax Guide for Aliens
- IRS, Instructions for Form 1040-NR (2025) and Form 1040-C
- IRS, Departing alien clearance and dual-status individuals
- California FTB, Publication 1031 (2025)
How we checked this: we read IRS Publication 519 (2025), the 2025 Form 1040-NR and Form 1040-C instructions, the IRS sailing-permit page and FTB Publication 1031 (2025) on November 1, 2026, and used only figures from them and our dated facts brief.
This is general information, not legal or tax advice. Your own W-2, I-94 and IRS notices govern; a tax professional who prepares dual-status returns should review your facts, your DSO handles SEVIS questions about ending OPT, and an immigration attorney handles H-1B or green-card questions.
If you would rather make one more focused push for a sponsoring US employer before you move, F1Jobs helps OPT, STEM OPT and H-1B candidates search for roles that sponsor.
Frequently asked questions
Do I have to file a US tax return the year I leave?
Usually yes. If you earned US wages on H-1B, OPT or STEM OPT that year, you file a federal return for it, due April 15, 2027 for a 2026 departure with withheld wages (our arithmetic from the 2025 rules). A Form 1040-C sailing permit does not replace it.
Am I a dual-status alien in my departure year?
Yes, if you were a US tax resident for part of the year and a nonresident for the rest, which is typical for H-1B leavers. Most OPT and STEM OPT students within their first five calendar years are nonresidents all year and file Form 1040-NR with Form 8843.
What is the residency termination date?
It is the day your US tax residency ends. Under IRS Publication 519 it is December 31, or your last day in the US if you kept a foreign tax home and closer connection for the rest of the year, are not a US resident the next year, and file a signed statement.
Can I e-file my departure-year return from abroad?
The return type decides, not where you live. Full-year Forms 1040 and 1040-NR can be e-filed, but Publication 519 says dual-status taxpayers cannot e-file for tax year 2025, so plan to mail a dual-status return unless the 2026 rules change.
Do I still owe state taxes after I leave?
Often yes, for the departure year. A state with an income tax usually expects a part-year resident return, and pay for work done there can stay taxable after you leave. California taxes part-year residents on all income received while resident and only California-source income after.