Tech Advisor Match

Financial Planning for H1B and Work Visa Tech Employees

Hundreds of thousands of tech employees in the US are on H1B, L1, O1, or TN visas. The good news: you have full access to the same powerful retirement and tax tools as US citizens — 401(k), Roth IRA, Mega Backdoor Roth, HSA. The bad news: there are several traps that the standard "software engineer financial planning" guides don't cover, and getting them wrong can cost you hundreds of thousands of dollars in lost benefits or unnecessary taxes.

This guide covers what's different — the decisions that hinge on your immigration status — not the basics that apply to all tech workers (those are covered in our retirement planning guide and Mega Backdoor Roth guide).

Step 1: Know your tax residency status

Before anything else, you need to know whether the IRS treats you as a resident alien or a nonresident alien for federal income tax purposes. These are very different categories:

StatusHow you're taxedRetirement account access
Resident alienSame as US citizens — worldwide income, ordinary tax brackets, all deductionsFull: 401(k), IRA, Roth IRA, HSA, MBR
Nonresident alienOnly US-source income; special withholding rules; limited deductionsRestricted: 401(k) yes; traditional IRA may qualify; Roth IRA generally no

Most H1B, L1, and O1 holders who have been in the US for more than a few months are resident aliens — they pass the Substantial Presence Test. Under the SPT, you're a resident alien for tax purposes if you've been present in the US for at least 183 days during the 3-year lookback period (counting 100% of current-year days, 1/3 of prior-year days, and 1/6 of the year before that).1 Someone on H1B who arrived mid-year or later may be a nonresident alien for their first partial year; by year two they're almost certainly a resident alien.

TN and first-year H1B holders: If you arrived in the US within the past 12 months and haven't yet passed the Substantial Presence Test, consult a CPA who specializes in dual-status returns before contributing to a Roth IRA. The eligibility rules differ, and getting this wrong creates an excess contribution penalty.

For the rest of this guide, we'll assume you've been in the US long enough to be a resident alien — the situation for the vast majority of established tech workers on work visas.

Retirement accounts: what you can access

As a resident alien, your access to tax-advantaged retirement accounts is identical to a US citizen's. Here's what's available and the 2026 limits:2

Account2026 limit (under 50)Catch-up (50+)Notes
401(k) employee deferrals$24,500$8,000 ($11,250 at 60–63)Same as US citizens
401(k) total (415(c) limit)$72,000—Enables Mega Backdoor Roth
Traditional IRA$7,500$1,000Deductible if no workplace plan, or below MAGI threshold
Roth IRA$7,500$1,000Phase-out: $153K–$168K single; $242K–$252K MFJ
Backdoor Roth IRA$7,500$1,000No income limit; available to resident aliens
HSA (self-only HDHP)$4,400$1,000 at 55Must be on qualifying HDHP plan

If your 401(k) plan allows after-tax contributions with in-service withdrawals, you can also do the Mega Backdoor Roth — converting after-tax contributions to Roth inside your 401(k). This is available to you on any visa as long as your employer's plan supports it. Your visa status doesn't affect plan eligibility.

The PFIC trap: your foreign investment accounts

This is the most dangerous and least-discussed financial risk for H1B workers, and it applies the moment you become a US tax resident.

If you hold foreign mutual funds, ETFs, or pooled investment vehicles registered outside the US — including funds in Indian brokerage accounts, Chinese investment platforms, UK ISAs, or any non-US investment vehicle — the IRS classifies these as Passive Foreign Investment Companies (PFICs).3 PFIC taxation is deliberately punitive:

What to do: If you held mutual funds or any pooled vehicle in a foreign brokerage account before becoming a US tax resident, get a CPA who handles PFIC reporting involved immediately. Filing Form 8621 is required for each PFIC holding. The most common solution: sell all foreign fund holdings before your first US tax filing as a resident alien, realize any gain under your home country's tax system, and invest new savings in US-domiciled index funds (Vanguard, Fidelity, Schwab — all US-registered, not PFICs). Foreign individual company stocks are generally not PFICs.

Note that foreign individual stocks (buying shares of Infosys, TSMC, Alibaba on a foreign exchange) are generally not PFICs — the PFIC rule targets pooled investment vehicles, not individual equities. But most retail investors in India, China, or other countries hold mutual funds, not individual stocks, so the PFIC issue is real for the majority.

Social Security: who benefits and who doesn't

Every W-2 employee in the US — including H1B, L1, and O1 workers — pays 6.2% of wages into Social Security and 1.45% into Medicare. For a senior tech worker earning $350K, that's roughly $10,800/year into Social Security (SS tax is capped at the wage base, $176,100 in 2026).4

Whether you'll ever collect those benefits depends heavily on your home country:

Countries with US totalization agreements

The US has totalization agreements with 30 countries that allow workers to combine work credits from both countries to qualify for Social Security benefits.5 If you're from one of these countries, your US SS contributions are not lost when you return home — the credits count toward your home country's retirement system (and vice versa):

Countries with US totalization agreements (as of 2026): Australia, Austria, Belgium, Brazil, Canada, Chile, Czech Republic, Denmark, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Japan, Luxembourg, Netherlands, Norway, Poland, Portugal, Slovak Republic, Slovenia, South Korea, Spain, Sweden, Switzerland, United Kingdom, Uruguay.

Countries without US totalization agreements — the key risk

India, China, and the Philippines do not have totalization agreements with the US. These three countries account for the majority of H1B visa holders in tech. If you're from one of these countries and you leave the US before accumulating 40 SS credits (10 years of work), your Social Security contributions are effectively lost — you will not qualify for US retirement benefits, and there is no mechanism to transfer the credits to your home country's system.

The math: a senior engineer paying the SS maximum (~$10,800/year) who works 8 years in the US and returns to India has contributed roughly $86,400 to Social Security and will receive nothing in return. The $86,400 is not refundable.

What this means practically:

RSU and equity vesting on a work visa

RSU vesting while you're a US resident alien on a work visa is taxed exactly like it is for citizens: the fair market value at vest is ordinary income, subject to full federal and state income tax, SS/Medicare, and the 22% supplemental withholding (which is often less than your actual marginal rate — see our RSU tax planning guide).

A few situations that are different for visa holders:

When you leave the US: what happens to your accounts

This is where work-visa holders face the sharpest planning decisions. The actions you take before departing matter enormously.

401(k): roll to IRA before you leave

Your 401(k) balance doesn't disappear when your visa expires, but your options narrow significantly once you're a nonresident. Before leaving:

  1. Roll your 401(k) to an IRA while you still have a US address. Most IRA custodians (Vanguard, Fidelity, Schwab) require a US address to open an account. Once you leave, opening a new IRA becomes nearly impossible. Roll first, then leave.
  2. Choose the right IRA type. Traditional 401(k) → Traditional IRA rollover is tax-free. Roth 401(k) → Roth IRA is also tax-free. Don't mix them unless you understand the pro-rata rule implications.
  3. Keep the US IRA after you leave. You can maintain an existing IRA as a nonresident. You just can't make new contributions if you have no US earned income.

Withholding on withdrawals as a nonresident

Once you're a nonresident alien, the US withholds 30% on IRA distributions before sending you the money (or the tax-treaty rate with your country, if lower).6 You must file a W-8BEN with your IRA custodian to claim treaty benefits. Common treaty rates:

CountryDefault withholdingTreaty rate (IRA distributions)
India30%15% (Article 20, US-India tax treaty)
China30%10% (Article 17, US-China treaty)
UK30%0% on pensions / 15% on lump sums
Canada30%15% (25% on lump sums)
Germany30%15%
No treaty30%30%

Withholding is not the same as your final tax liability — you may file a US nonresident return (Form 1040-NR) to claim a refund if the treaty rate is lower than what was withheld. But the 10% early withdrawal penalty applies regardless of treaty status if you're under 59½.

Roth IRA and the exit situation: Roth IRA contributions can be withdrawn tax- and penalty-free at any time. Earnings on those contributions are subject to the 10% penalty and withholding if withdrawn before 59½ and before 5 years of account age. If you've had a Roth IRA for 5+ years and are over 59½, distributions are tax-free even as a nonresident — a significant advantage over the Traditional IRA in the exit scenario.

Green card timing: financial moves to make beforehand

Becoming a Lawful Permanent Resident (LPR) generally doesn't create an adverse tax event by itself — you were already taxed as a resident alien on your work visa. But the transition to LPR status does change your long-term planning horizon in meaningful ways:

Practical checklist for H1B tech workers

ActionWhen
Confirm your tax residency status (SPT calculation)First year in the US
Sell or restructure all foreign mutual fund positions (PFIC cleanup)Before or at your first US tax filing as resident
Max 401(k) deferrals and employer matchEvery year
Do the Backdoor Roth IRA if your income exceeds Roth limitsEvery year
Check if your employer plan allows Mega Backdoor RothOnce, then annually
Track Social Security credits — know your 40-credit milestoneAnnually (check SSA.gov statement)
Roll 401(k) to IRA at a US-address custodian before any departureBefore leaving the US
File W-8BEN with IRA custodian to claim treaty withholding rateBefore first withdrawal as nonresident
Resolve QDOT planning if married to non-citizen spouseBefore estate documents are finalized

Sources

  1. IRS: Taxation of alien individuals by immigration status — H-1B — Substantial Presence Test mechanics; resident vs. nonresident alien determination for H-1B holders; withholding rules
  2. IRS newsroom: 401(k) limit increases to $24,500 for 2026, IRA limit increases to $7,500 — 2026 employee deferral $24,500; 415(c) total limit $72,000; IRA limit $7,500; Roth IRA phase-out $153K–$168K single, $242K–$252K MFJ; super catch-up $11,250 at ages 60–63
  3. IRS Form 8621 Instructions: Information Return by a Shareholder of a Passive Foreign Investment Company — PFIC definition, excess distribution regime, mark-to-market election, QEF election, and annual filing requirements
  4. IRS Topic 751: Social Security and Medicare Withholding Rates — 6.2% SS / 1.45% Medicare for all W-2 employees including nonimmigrants on H-1B, L-1, O-1 visas; 2026 SS wage base $176,100
  5. SSA: US International Social Security Agreements (Totalization Agreements) — list of 30 countries with active agreements; India, China, and the Philippines are not on the list as of 2026
  6. IRS Publication 519: US Tax Guide for Aliens — 30% default withholding on US-source income for nonresident aliens; W-8BEN treaty claim procedures; Form 1040-NR filing rules

Contribution limits verified against IRS newsroom announcement (November 2025). Social Security totalization agreement status verified against SSA.gov (2026). PFIC rules verified against IRS Form 8621 instructions (current). Values current as of May 2026.

Work visa financial planning has edge cases that generic advisors miss

PFIC cleanup, Social Security credit tracking, pre-departure 401(k) rollovers, treaty withholding rates, and RSU grant sourcing across countries — these are not questions most financial advisors have ever thought about. A fee-only advisor who works with H1B and visa-holder tech employees can help you build a plan that accounts for the realistic scenarios: staying long-term, eventually getting a green card, or potentially returning home with a substantial US retirement nest egg.