Answered July 2026

Max your 401(k) if $12,250 is the employer’s match cap; if $12,250 is only the match-eligible part of your own contribution, contribute that first and keep unmatched, near‑term money in a taxable account you can use without a retirement‑plan penalty.

“I am 25 and working in the US on an H-1B visa. My employer offers a 50% 401(k) match up to $12,250 a year. I am currently maxing it out, but I might leave the US and withdraw the money in 5 to 10 years. Given the early withdrawal penalties and taxes, does it still make sense to max out my 401(k), or should I only contribute enough to get the full match and invest the rest elsewhere?”

Summary

You don’t have to destroy the tax shelter just because you may leave the U.S.; leaving it or using a direct rollover usually avoids immediate tax and penalties. A fully vested 50% match also goes a long way—even after penalties, employer dollars typically leave you ahead versus no match.

You have two contribution branches now and three practical ways to handle the account when you leave.

If $12,250 is the employer’s capbest fit

Keep maxing it: a 50% match reaches $12,250 only after a $24,500 employee , which is the 2026 limit [1]. You contribute $24,500 and the employer adds $12,250, so “max out” and “get the full match” are the same choice.

If $12,250 is your match‑eligible contributionsplit goals

Contribute at least $12,250 to receive the full $6,125 match. For the unmatched $12,250 before the $24,500 limit [1], keep using the 401(k) only if you’ll preserve it through a rollover; if you’ll likely spend it in ~5–10 years, a liquid avoids the 10% retirement‑plan penalty on early 401(k) withdrawals [3][11].

Leave it invested or roll it overusually best

Leaving the United States does not require liquidation. After termination, you can leave funds, roll to a new plan, or roll to an IRA; a trustee‑to‑trustee avoids current tax and the 20% mandatory withholding that applies to cash paid to you [4][5].

Use the Roth‑basis routeRoth only

If part of the balance is in a , roll that part directly to a Roth IRA. Regulations treat the rolled Roth‑401(k) basis as a regular Roth IRA contribution, and Roth IRA ordering rules pay out regular contributions first—so you can access rolled without U.S. income tax or the 10% tax, keeping earnings invested [7].

Cash out at age 30–35costly

Legally available after severance but typically the most expensive route: 10% additional tax on the taxable portion under IRC 72(t), plus regular income tax [3]. For nonqualified Roth-plan payouts, only the earnings portion is taxable/penalized [6].

Use periodic payments as a short workarounduntil 59½

avoid the 10% additional tax only if you don’t modify them until the later of five years or age 59½—starting at 25 would lock you in for decades [12].

All match calculations assume the employer contribution is fully ; use only the vested amount if it is not.

Read the full explanation

Watch out for

$12,250 can mean two different capsThe plan document (not HR summaries) controls the matching formula and timing—so $12,250 might be the employer's maximum match dollars (meaning you need a $24,500 for a 50% match), or it might be the maximum amount of your contribution that will be matched [9].
Leaving the country is not a penalty exceptionQuitting your job allows a distribution, but moving abroad isn't an exception to the 10% additional tax under IRC 72(t) on the taxable portion of an early distribution [3].
A match you forfeit is not a benefitYour own deferrals are always yours, but employer matches can vest over time (e.g., 3‑year cliff or 6‑year graded). Count only the match when deciding how much to contribute [10].
Don't front‑load if there's no true‑upSome plans calculate the match each paycheck. If you hit your annual deferral limit early, later paychecks might get $0 match unless the plan provides a year‑end true‑up. The plan document governs timing [9].
Withholding is not your final taxCash paid to you from a plan typically has 20% mandatory ; a payment to a foreign payee generally faces 30% default withholding unless you provide valid documentation and the rate applies—and treaties may not exempt lump sums [5][8][13].
Traditional vs. Roth are taxed differentlyTraditional pre‑tax deferrals are taxed when distributed. A nonqualified payout is pro‑rata between (not taxed again) and earnings (taxable and potentially subject to the 10% additional tax on that portion) [2][6].
The $24,500 limit follows youFor 2026, your personal employee limit is $24,500 across all employers and plans you participate in—excess happens if you don't aggregate across jobs [1][14].

Next steps

These steps capture the full match now while preserving access and minimizing avoidable tax when you leave.

Before changing payroll

Decode the exact match and vesting terms

Find the sentence with “50%” and “$12,250” in the SPD. If $12,250 is the maximum employer match, the employee amount needed is $12,250 ÷ 50% = $24,500; if it is the maximum employee contribution matched, the required contribution is $12,250 and the employer amount is $6,125. Confirm whether matching is calculated per paycheck or annually and whether there is a year‑end true‑up; the plan document controls both [9].

Requirements

Summary Plan Description (SPD)
Latest account statement showing vested balance and pre-tax/Roth subaccounts
Annual participant fee disclosure

For the remaining 2026 paychecks

Set the 2026 payroll contribution

If $12,250 is the employer’s cap, target total 2026 s of $24,500 (the IRS limit) [1]. If $12,250 is the match‑eligible portion of your own contribution, target at least that amount, and add unmatched contributions only if you plan to keep the money invested long‑term or roll it over later.

Requirements

2026 year-to-date elective deferrals from every employer
Number of eligible paychecks remaining in 2026
Plan’s per-paycheck maximum percentage

Only for unmatched money

Put near‑term unmatched money in a taxable account

If you realistically expect to spend unmatched money at age 30–35, use a rather than planning an early 401(k) withdrawal subject to a 10% additional tax [3]. In a taxable account, gains are measured against and holdings over one year are generally long‑term [11].

Requirements

A separate emergency reserve
A five‑to‑ten‑year spending goal

After severance, before taking cash

Request a direct rollover when employment ends

Ask the 401(k) administrator to pay the receiving trustee directly. A has no current U.S. tax and avoids the 20% mandatory withholding that applies when a taxable distribution is paid to you [5].

Requirements

Final 401(k) statement
Traditional IRA or eligible new‑employer plan for pre‑tax money
Roth IRA or eligible designated Roth plan for Roth money

Before requesting an overseas cash payment

Use Form W‑8BEN before any payment abroad

Provide Form W‑8BEN to the plan so it can apply the correct treaty rate instead of the 30% default; the form generally stays valid through December 31 of the third succeeding calendar year and must be renewed within 30 days after changes [8][13].

Requirements

Foreign address and tax residence
U.S. taxpayer identification number
Applicable treaty article (note lump‑sum rules)

The year after a foreign payment

Reconcile a foreign cash‑out on Form 1040‑NR

File Form 1040‑NR and attach Form 1042‑S to reconcile withholding with the actual U.S. tax under the treaty. If you request a refund of tax withheld on a Form 1042‑S, the IRS notes it may take up to 6 months to process [15].

Requirements

Form 1042‑S from the plan
Distribution and rollover records
Form W‑8BEN and treaty position

Others who faced this

You are not the first to go through this. Here is how it went for others who asked the same thing.

How does everyone invest?

u/sadbrownmanr/h1bMar 3, 2026

the flowchart I usually see when people talk about investing in America is emergency savings -> 401K (just enough to get company match) -> HSA -> roth IRA. if you have money left over after all of this, you should then try to max out 401k. but people on H1B are usually investing differently because they don't know how long they would be in this country for. so I'm wondering what everyone's investment strategies are.

Legal sources

The answer rests on the Internal Revenue Code, Treasury regulations, IRS 2026 retirement and international-tax guidance, IRS form instructions, and Department of Labor/ERISA plan-document rules.

IRS 2026 401(k) limits

The 2026 employee 401(k) contribution limit is $24,500.

IRS 2026 401(k) limits

Highlights of changes for 2026

The annual contribution limit for employees who participate in 401(k), 403(b), governmental 457 plans, and the federal government’s Thrift Savings Plan is increased to $24,500, up from $23,500 for 2025.

Read the full text

IRS 401(k) plan overview

Traditional deferrals get current tax deferral; Roth deferrals are currently taxable.

IRS 401(k) plan overview

401(k) plan overview; Tax advantages

Generally, deferred wages (elective deferrals) are not subject to federal income tax withholding at the time of deferral, and they are not reported as taxable income on the employee’s individual income tax return. Roth deferrals are included in the employee's taxable income in the year of the deferral. Elective deferrals and investment gains are not currently taxed and enjoy tax deferral until distribution.

Read the full text

IRC 72(t)(1)

Early qualified-plan distributions generally incur a 10% additional tax on the taxable portion unless an exception applies.

IRC 72(t)(1)

(t)(1)

If any taxpayer receives any amount from a qualified retirement plan (as defined in section 4974(c)), the taxpayer's tax under this chapter for the taxable year in which such amount is received shall be increased by an amount equal to 10 percent of the portion of such amount which is includible in gross income.

Read the full text

IRS Retirement Topics—Termination of Employment

After termination, you can leave the money, roll to a new plan, withdraw, or roll to an IRA.

IRS Retirement Topics—Termination of Employment

Options for your account balance

Generally, when you terminate employment, you have four options for your account balance: 1. Leave your money in the plan. 2. Rollover to a new employer's plan. 3. Withdraw the balance. 4. Rollover to an IRA.

Read the full text

IRS Rollover Rules

Direct rollovers have no current withholding; cash paid to you generally has 20% withholding.

IRS Rollover Rules

How do I complete a rollover?

Direct rollover – If you're getting a distribution from a retirement plan, you can ask your plan administrator to make the payment directly to another retirement plan or to an IRA. No taxes will be withheld from your transfer amount. A retirement plan distribution paid to you is subject to mandatory withholding of 20%, even if you intend to roll it over later.

Read the full text

IRS Designated Roth Account Rules

Nonqualified Roth 401(k) payouts are split between basis and earnings; only the earnings portion is taxable/penalized.

IRS Designated Roth Account Rules

Nonqualified distributions

A distribution that is not a qualified distribution will be partially included in gross income if there are earnings in the account. The distribution will be treated as coming pro-rata from earnings and contributions (basis). The 10% tax on early withdrawals may apply to the part of the distribution that is includible in gross income.

Read the full text

26 CFR 1.408A-10

Roth-401(k) basis rolled to a Roth IRA is treated as regular contributions; Roth IRA pays out regular contributions before earnings.

26 CFR 1.408A-10

A-3

For purposes of section 408A(d)(4), the amount of a rollover contribution that is treated as a regular contribution is the portion of the distribution that is treated as investment in the contract under A-6 of § 1.402A-1, and the remainder of the rollover contribution is treated as earnings. Under section 408A(d)(4), distributions from Roth IRAs are deemed to consist first of regular contributions, then of conversion contributions, and finally, of earnings.

Read the full text

IRC 1441 / IRS Foreign Plan Distributions

Default 30% withholding to foreign payees unless valid documentation/treaty applies; lump sums may not be covered by treaty exemptions.

IRC 1441 / IRS Foreign Plan Distributions

Payments to foreign persons; Pensions, annuities, and alimony

You must generally withhold 30% from a plan distribution paid to a foreign payee unless you can reliably associate the payment with valid documentation. Most tax treaties provide an exemption from tax on non-government pensions and annuities. The foreign person entitled to the payments must provide you with a Form W-8BEN that contains the TIN of the foreign person. The exemption may not apply to lump-sum payments.

Read the full text

IRS 401(k) Match Fix-It Guide

The plan document controls the match formula and timing—not summaries.

IRS 401(k) Match Fix-It Guide

How to find the mistake

Review the plan document to determine the employee eligibility requirements and matching contribution formula and compare it to what's used in operation. Review the timing of the matching contribution in comparison to the plan document requirements.

Read the full text

IRC 411(a)(2)(B) / IRS Vesting Snapshot

Federal rules allow 3‑year cliff or 6‑year graded vesting for matching contributions.

IRC 411(a)(2)(B) / IRS Vesting Snapshot

Vesting requirements

There are two alternative minimum vesting schedules. Under the first option, contributions must be 100% vested when a participant completes 3 years of service (commonly referred to as 3-year cliff vesting). Under the second option, contributions vest gradually over 6 years, and a participant must be 100% vested upon completing 6 years of service.

Read the full text

IRS Topic 409

In a taxable account, gains are measured over basis; holding over a year is generally long‑term.

IRS Topic 409

Capital gain or loss; Short-term or long-term

When you sell a capital asset, the difference between the adjusted basis in the asset and the amount you realized from the sale is a capital gain or a capital loss. Generally, if you hold the asset for more than one year before you dispose of it, your capital gain or loss is long-term.

Read the full text

IRC 72(t)(2)(A)(iv) / IRS SoSEPP Guidance

SoSEPP schedules cannot be modified until the later of 5 years or age 59½.

IRC 72(t)(2)(A)(iv) / IRS SoSEPP Guidance

Q&A 2

The taxpayer does not modify the SoSEPP (other than by reason of death, disability, or distribution to a qualified public safety officer under Section 72(t)(10)) before the date that is the later of: The 5th anniversary of the date of the first SoSEPP payment; and The date the taxpayer reaches age 59 ½.

Read the full text

Instructions for Form W-8BEN

Form W‑8BEN typically remains valid through the end of the third succeeding calendar year; new form due within 30 days after changes.

Instructions for Form W-8BEN

Expiration of Form W-8BEN; Change in circumstances

Generally, a Form W-8BEN will remain in effect for purposes of establishing foreign status for a period starting on the date the form is signed and ending on the last day of the third succeeding calendar year, unless a change in circumstances makes any information on the form incorrect. If a change in circumstances makes any information on the Form W-8BEN you have submitted incorrect, you must notify the withholding agent, payer, or FFI with which you hold an account within 30 days of the change in circumstances and you must file a new Form W-8BEN or other appropriate form.

Read the full text

IRC 402(g) – Excess Deferrals

The employee deferral cap is an individual, across‑plans limit—you must aggregate deferrals to all plans.

IRC 402(g) – Excess Deferrals

The 402(g) limit is an individual limit and not a plan limit, so you must aggregate all elective deferrals contributed to all the plans in which you participate

Read the full text

Instructions for Form 1040-NR (2025)

Processing time for refunds claimed with Form 1042‑S on Form 1040‑NR can be up to 6 months.

Instructions for Form 1040-NR (2025)

If you request a refund of tax withheld on a Form 1042-S, we may need additional time to process the refund. Allow up to 6 months for these refunds to be

Read the full text

These are the official rules as published on the cited dates; tax limits, forms, treaties, and plan terms can change.

This is general information about official tax and retirement-plan 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 SettleKit