RSU Taxes on an H1B Visa (2026): Vesting, Layoffs, Trailing State Tax, and Leaving the US

Vishveshwar Rao · IRS Enrolled Agent
17 min read
Quick answer: RSUs are taxed as ordinary wage income on the day they vest, at the market value of the shares, and being on an H1B does not change that. The damage happens around the vest: employers withhold a flat 22% federal while your bracket may be 32% or 37%, brokers report a $0 cost basis that double counts the income, California and New York keep taxing vests years after you move away, and a layoff or a move back to India splits each tranche between two tax systems. There is no US exit tax for H1B holders, and selling everything before you fly out is often the wrong move for US tax.

If you are reading this, tranches are probably still landing after a layoff or a move, and the advice on Blind and Reddit contradicts itself thread to thread. Here is the part no calculator gets right: no tax software on either side handles a vest whose grant-to-vest workdays span two countries, so the workday-allocation math below is the calculation both your Form 1040-NR and your Indian return need.
This is general information for NRIs and visa holders, not personalized tax advice. Cross-border equity decisions have large dollar consequences; talk to a cross-border tax professional before acting.
How are RSUs taxed when they vest on an H1B?
Under Section 83(a) of the tax code, the fair market value of shares you receive for services is included in gross income in the first year your rights are transferable or no longer subject to a substantial risk of forfeiture. For standard RSUs that is the vest and settlement date, and the full value lands on your W-2 as wages.
Your visa does not create a special rate. An H1B worker who meets the substantial presence test (at least 31 days in the US this year, and 183 days under the weighted three year formula) is a resident alien, taxed on worldwide income exactly like a citizen.
Vest income is also FICA wages: for 2026, Social Security tax is 6.2% up to the $184,500 wage base and Medicare is 1.45% with no cap. After vest the shares are just stock, so on sale only movement from the vest-date value is capital gain or loss. The broker paperwork works against that, as covered next.
Why does the withholding on my vest rarely match what I actually owe?
Because the withholding rate and your tax rate come from two different rules.
Employers withhold on vests at the flat supplemental wage rate, which stays at 22% for 2026 under IRS Publication 15; mandatory 37% withholding kicks in only after your supplemental wages for the year pass $1 million. Your real marginal rate comes from the 2026 brackets in Rev. Proc. 2025-32: for married filing jointly, the 24% bracket starts above $211,400 of taxable income, 32% above $403,550, and 37% above $768,700.
Say a couple already in the 32% bracket gets a $200,000 vest. The employer withholds 22%, or $44,000, while the real federal tax is closer to 32%, roughly $64,000. That is a $20,000 gap surfacing at filing time, repeating each vest cycle until the withholding is fixed. Two smaller mismatches pile on: the 0.9% Additional Medicare Tax is owed above $250,000 of wages for joint filers but withheld only over $200,000 regardless of filing status, and the Form 2210 safe harbor spares an underpayment penalty only if you prepay the smaller of 90% of this year's tax or 100% of last year's (110% if last year's AGI topped $150,000). In a heavy vest year, hit that prior-year safe harbor with estimated payments, then settle up in April.
Am I being taxed twice? My 1099-B shows a $0 cost basis
This error double-taxes the entire vest value, and it is built into the reporting rules. For equity compensation granted or acquired after 2013, brokers are prohibited from including your compensation income in the cost basis on Form 1099-B. The $0 basis is not a broker mistake; the regulation requires it.
Type the 1099-B in as-is and your software taxes the vest value a second time as capital gain. Say 400 shares vested at $125, so $50,000 already sits in your W-2 wages, and you sell all 400 at $130 for $52,000. With the broker's $0 basis the return shows a $52,000 gain; the true gain is $2,000, and the $50,000 difference is taxed twice.
The fix is in the Form 8949 instructions: enter the broker's basis in column (e) exactly as reported, even though it is wrong, then correct it with adjustment code B and an amount in column (g). Do not overwrite column (e). Sell-to-cover lots get the same correction. If you double paid in a prior year, you can still amend on Form 1040-X inside the refund window (see the FAQ below), so audit old RSU sales now.
What happens to my RSUs if I am laid off on H1B?
Three separate clocks start at once, and Blind tends to blur them together.
Unvested shares. RSUs forfeited at termination produce no taxable income and no deduction. Under Section 83(a) the taxable event is vesting, which never happens for a forfeited award, so there is no write-off for the paper value you lost.
The 60 day grace period. Under 8 CFR 214.1(l)(2), an H-1B worker (also E-1, E-2, E-3, H-1B1, L-1, O-1, and TN) gets up to 60 consecutive days after employment ends, or until the end of the authorized validity period if that is shorter, without being treated as out of status. That is immigration law, not tax law, and it does not extend vesting.
Whether a tranche still vests. Your equity plan document and severance agreement decide this, not the grace period. Many plans stop vesting on the termination date; some severance packages keep tranches alive. Get the answer from stock plan services in writing before you sign anything.
Any tranche that vests during severance or the grace window is still W-2 wage income, sourced to where you did the work. If all your workdays from grant to vest were in the US, it is fully US taxable, whatever your visa status that week.
Why is California or New York still taxing my RSUs after I moved away?
Because both states tax equity compensation by where you worked while it was earned, not where you live when it vests.
California's rule is in FTB Publication 1004. A nonresident on the vest date still owes California tax to the extent services were performed in California between grant and vest. The allocation is a workday ratio: California workdays from grant to vest divided by total workdays, cut off at the date employment ended if earlier. FTB's example: 700 of 1,000 workdays in California means 70% of the vest is California taxable, so a move to Seattle mid-grant still runs 70% of a $100,000 vest through a California nonresident return even though Washington has no income tax. Two limits help: California taxes only the compensation element (FTB 1004 says it will not tax a nonresident's post-vest capital gain), and it flags a possible other-state tax credit where two states tax the same wages.
New York uses the same workday logic under TSB-M-07(7)I, with sharper edges:
- The allocation period for RSUs without an 83(b) election runs from grant to the earliest of vesting, termination of services, or sale, so a layoff ends it early.
- The period can span multiple years, including years you were still a New York resident. Moving away does not erase those workdays.
- The part-year trap: a vest that lands during your New York resident period is entirely New York source income, with no allocation at all.
If a former state sends a notice, or an employer keeps withholding for the old state, the response is usually a nonresident return showing the workday allocation, not a check for the full amount.
I moved back to India and tranches keep vesting. Which country taxes each vest?
This is the question posted over and over on r/USExpatTaxes and r/backtoindia. The rule set is coherent.
Your departure year is a dual-status year. If you are not a US resident on December 31, you file Form 1040-NR with "Dual-Status Return" written across the top, plus a Form 1040 marked "Dual-Status Statement" for the resident months. For the nonresident part of the year the US taxes only US-source income. Residency generally ends on your last day of physical presence, provided you have a closer connection to a foreign country for the rest of the year (see Pub 519 for the exact termination-date and de minimis presence rules).
Post-departure vests are split by workdays. Compensation spanning multiple years is sourced on a time basis under Treasury Regulation 1.861-4, so if 600 of the 1,000 workdays between grant and vest were in the US, 60% of that tranche is US-source wages. Your old employer should withhold on that slice, but employers sometimes mishandle it for departed workers, so check each vest and be ready to cover the gap with estimated payments. You report it on Form 1040-NR for each year a tranche vests. Treaty Article 16(1) agrees: employment income is taxable where the employment was exercised.
India taxes the vest too, then credits. Once you are fully resident in India, India taxes your worldwide salary income, including these vests. If you are on an Indian payroll when a tranche vests, the Indian employer treats the vest value as a taxable perquisite and withholds tax on it, which is why returnees see a large slice of the vest taken as tax at that point. Treaty Article 25(2)(a) then requires India to credit the US income tax paid on the same income, capped at the portion of Indian tax attributable to it, and India does not refund credit beyond that cap (the "FTC trap" people describe on Reddit). The two systems mesh through one workday split: the US taxes the US-workday slice, India taxes the whole vest and credits the US tax on the overlap. Get the allocation right on both returns and claim the credit on the Indian side, and the income is not taxed twice. The full India-side playbook is in Sell RSUs Before or After Moving Back to India? The 2026 RNOR, DTAA, and Foreign Tax Credit Playbook. ESPP shares and 83(b) elections follow their own cross-border rules, covered in ESPP and 83(b) Elections on a Visa (2026).
Should I sell my vested RSUs before leaving the US or after?
The default Blind advice is "liquidate everything before the flight." For US tax, that is often backwards.
Under Section 871(a)(2), a nonresident alien is taxed at 30% on US-source capital gains only if present in the US for 183 days or more that tax year. Below that, a nonresident generally owes no US tax at all on gains from selling US stocks, and the 3.8% Net Investment Income Tax does not apply to nonresident aliens under Section 1411(e)(1). Selling while still a US resident, by contrast, puts the whole gain on your US return, plus any state tax.
One trap the threads miss: that 183-day count is per tax year, and in the year you leave you have almost always already crossed 183 days of US presence. So "sell after leaving" usually means a later calendar year, or a year with under 183 US days, not the weeks right after your flight. A sale in the departure year itself is a dual-status question with a real gray area around your tax home, so run it past a professional. The treaty does not change this either: Article 13 lets each country tax capital gains under its own domestic law, so the planning turns on your residency timeline.
On the India side the lever is RNOR status: Resident but Not Ordinarily Resident if you were a non-resident in India in 9 of the 10 preceding years, or spent 729 days or less in India during the 7 preceding years. Under the long-standing 1961 Income-tax Act rule, an RNOR's foreign-source income, such as gains in a US brokerage, was generally outside Indian tax unless it was derived from a business controlled in India or a profession set up in India. India's new Income-tax Act 2025 took effect April 1, 2026 and carries the same RNOR test, but have a professional confirm the current foreign-income provision before relying on it for a large sale.
Two things worth pinning down. A move does not reset your cost basis: US basis stays the vest-date fair market value in every residency window, and India's cost of acquisition is that same perquisite-taxed value, so only post-vest appreciation is ever in play. And after departure, file Form W-8BEN with your broker for foreign status; US dividends are then withheld at 30%, reduced to 25% for an Indian resident under treaty Article 10(2)(b). Whether the broker keeps serving an India resident is its own policy, not tax law, so confirm that in writing too.
Do I owe the US exit tax when I leave on an H1B?
No. The Section 877A mark-to-market exit tax applies only to covered expatriates: US citizens who give up citizenship, and long-term residents, meaning green card holders in at least 8 of the prior 15 years, who give up that status. An H1B holder leaving the US is neither, and Form 8854 does not apply to you.
For green card holders the analysis changes completely: the 2026 covered expatriate tests include average annual net income tax above $211,000 or $2 million net worth, with a $910,000 mark-to-market exclusion if the tax applies. That decision tree is in US Exit Tax for Green Card Holders Moving Back to India (2026).
One related clarification: RSUs create no AMT problem. The alternative minimum tax trap in equity compensation belongs to incentive stock options, where the exercise spread is an AMT adjustment. If you hold ISOs and are planning a departure, read ISOs, AMT, and Leaving the US (2026) before you exercise anything.
Why do you still owe tax if 22 percent was already withheld?
This is the most common RSU surprise at filing time. When RSUs vest, employers withhold federal tax at the IRS flat supplemental rate: 22 percent on supplemental wages up to $1 million in a year, 37 percent only above that. Withholding at 22 percent is not the same as owing 22 percent. If your salary plus vested RSUs puts you in the 24, 32, or 35 percent bracket, which is typical for H1B engineers at large tech companies, every vest is quietly under withheld by the gap between your marginal rate and 22 percent.
The math is simple: vest income multiplied by (your marginal rate minus 22 percent). A $100,000 vest year at a 32 percent marginal rate leaves roughly $10,000 of federal tax unpaid until April, sometimes with an underpayment penalty on top.
Three ways to close the gap during the year:
- Add extra withholding on your regular paycheck via Form W-4, Step 4(c).
- Make quarterly estimated payments through IRS Direct Pay in the quarter the vest happens.
- Rely on the safe harbor: no underpayment penalty if your total withholding covers 100 percent of last year's tax (110 percent if your prior year adjusted gross income was over $150,000), then settle the balance at filing.
If your vests are large or lumpy, run the numbers each quarter rather than waiting for the 1040 to deliver the news.
Lesser does flat-fee cross-border tax planning and filing for NRIs and immigrant tech professionals: equity compensation, departure-year planning, and India-US double taxation. If your vest schedule spans two countries or an old state is still taxing you, we can run the allocation and the treaty math at lesser.tax.
30-second video answers
Why did my RSU refund shrink? Employers withhold a flat 22% on vests; if your bracket is higher, the difference lands on your return at filing.
Is Tatkaal worth $125 for me? vs 30 working days normal. Worth it only if a flight depends on it and your police record is clean — lost passports are excluded.
FAQ
Does my old employer still withhold US tax on vests after I become a nonresident, and do I really file a 1040-NR every year?
The US-workday slice of each vest is US-source wages your old employer should withhold on, under Treasury Regulation 1.861-4. Some employers mishandle this for people who have already left, so verify the withholding on each vest and be ready to cover any shortfall with estimated payments. Either way, you file Form 1040-NR to report that slice for every year a tranche vests.
Is selling my vested RSUs on F1 or H1B considered unauthorized work?
Managing and selling your own investments is generally passive personal activity, not employment. But the tax treatment is not identical across visas. F-1 students are usually nonresident aliens for their first five calendar years, and a nonresident F-1 present 183 days or more in the year of sale owes a flat 30% on US-source capital gains (a day count the IRS runs separately from the substantial presence test). Once you are a resident alien under that test, whether on L1 or H1B, the sale is taxed like a citizen's. For the immigration side, ask an immigration attorney.
What about RSUs granted while I worked in India that vest after I move to the US?
Once you are a US resident alien, you report the entire vest on your US return, because a resident alien is taxed on worldwide income. Sourcing still matters, but for a different reason: the India-workday portion is foreign-source, which is what lets you claim a foreign tax credit against the Indian tax on that slice, not something you leave off the US return. And for years you worked in the US as an Indian non-resident, you generally owe an Indian return only if your India-source income exceeds the basic exemption limit, so pure US-salary years usually mean no Indian filing.
My RSUs were taxed in both India and the US and I cannot use all of the foreign tax credit. Is the excess just lost?
Largely, yes. Treaty Article 25(2)(a) caps India's credit at the portion of Indian tax attributable to that income, and India does not refund credit beyond that cap. The levers that keep the credit usable are timing (which residency window a vest or sale lands in) and getting the grant-to-vest workday allocation right on both returns, so the US-taxed slice lines up with the income India is crediting.
I lost the H1B lottery and leave in about 60 days. What do I do with my RSUs, brokerage, and 401k?
Unvested RSUs almost always forfeit at your last day per the plan document, with no tax and no deduction, so confirm the exact cutoff in writing. Whether to sell vested shares before or after you go turns on the same 183-day and RNOR math above, not on the deadline pressure. For the brokerage account, file Form W-8BEN to establish foreign status once you are abroad. Your 401k can stay invested after you leave; nothing about departure forces you to liquidate it, though when and how to draw it down later is its own decision.
I found the $0 basis mistake on old returns. Can I still recover the tax?
Only for years inside the amendment window: Form 1040-X, generally within 3 years after you filed the original return or 2 years after you paid the tax, whichever is later. Older years are gone.