Social Security Tax on H-1B: Can You Opt Out, Get It Back When You Leave, and the 2027 Wage Base

There is no Social Security opt-out on H-1B and no refund when you leave. Who a certificate of coverage helps, how the two-employer credit works, and what 40 credits mean.

By F1Jobs Team · 2026-11-01 · 10 min read
A commuter rail platform at dawn with a train approaching in the distance, a long row of empty benches under a canopy, soft mist and a pale sky

Part of our guide to US taxes on F-1, OPT and H-1B.

Can H-1B workers opt out of Social Security? No. Your employer must withhold 6.2% Social Security tax up to the annual wage base and 1.45% Medicare tax on all your H-1B wages, whether you are a resident or a nonresident for income tax. The only exemption is a certificate of coverage under a totalization agreement, and the US has none with India or China. Nothing is refunded when you leave. For 2027 the wage base is $192,300, a maximum tax of $11,922.60.

Status as of November 1, 2026. The 2026 wage base of $184,500 is in effect. SSA's Federal Register notice of 2026-10-26 scheduled the 2027 figures: a $192,300 wage base and $1,970 per credit for wages paid in 2027, and a 3.6% cost-of-living adjustment for December 2026 benefits, payable from January 2027. The US has 31 totalization agreements in effect, the newest with Romania from 2026-09-01. The OPT Fair Tax Act (S. 2940 / H.R. 8972), which would bring OPT wages under FICA, is only introduced and referred, and dies if not enacted by 2027-01-03.

Can H-1B workers opt out of Social Security?

H-1B workers cannot opt out of US Social Security tax. Employers must withhold 6.2% of wages up to the annual wage base ($184,500 in 2026, $192,300 in 2027) plus 1.45% Medicare on all wages. The only exemption is a certificate of coverage under a totalization agreement, for workers temporarily sent from an agreement country. India and China have none.

The IRS page on Social Security taxes for aliens employed in the US says wages paid to nonresident aliens employed in the United States, "in general, are subject to Social Security/Medicare taxes for services performed by them within the United States," and that resident aliens are taxed "under the same rules that apply to U.S. citizens." Its exceptions are tied to particular statuses, such as F, J, M and Q students and exchange visitors and foreign-government employees; H-1B is not among them.

Your employer also pays a matching 6.2% and 1.45% (IRS Topic 751); that share is not yours to claim.

Why the W-4 "exempt" box and your tax residency don't change it

The W-4 "Exempt from withholding" line controls federal income tax withholding only; the 2026 Form W-4 says that if you claim it, "you will have no income tax withheld." Nonresident status doesn't help either. Arrive on H-1B in October, fail the substantial presence test that year, and you may file Form 1040-NR, but your H-1B wages still owe Social Security and Medicare tax.

The certificate of coverage: the only real exemption

A totalization agreement coordinates the US system with another country's, so a worker pays into only one for the same work and each can count the other's coverage toward benefits.

The IRS's totalization agreements page says a worker claiming exemption from US Social Security tax under one of these agreements "must secure a Certificate of Coverage from the social security agency of their home country" and present it to the US employer. Until the employer has that certificate, it has no basis to stop withholding (our reading).

Who can usually get one

The key is the "detached worker" rule. The IRS's government-entities page on totalization puts it this way: "If a worker is temporarily transferred to work for the same employer in another country, the worker remains covered only by the country from which he/she has been sent." Each agreement sets its own conditions and time limits, and your home agency decides whether you qualify.

That fits an employee of a company in an agreement country sent to its US office on an H-1B or L-1 for a limited assignment. It usually does not fit someone who studied here on F-1 and was hired directly by a US employer. The same IRS page says the agreements include rules meant to assign coverage "to the country where the worker has the greater economic attachment," and for a direct US hire that is generally the US (our reading).

Does India have a totalization agreement with the US?

No. SSA's list of agreements in force has 31 countries, with Romania added from 2026-09-01, and neither India nor China is on it. Indian and Chinese H-1B workers have no certificate to request and no way to add home-country coverage to US credits. Paying into a home-country scheme through a foreign employer doesn't reduce your US tax either (our reading).

Who pays Social Security tax and who doesn't (as of 2026-11)

Your situationSocial Security tax on US wages?What proves it or fixes it
H-1B, hired by a US employer, any nationalityYes, 6.2% up to the wage baseNothing to file; check W-2 boxes 3 and 4
H-1B or L-1, temporarily sent by an employer from an agreement countryMay be exemptCertificate of coverage from the home-country agency, given to the US employer
H-1B or L-1 sent from India or ChinaYesNo agreement, so no certificate route
Nonresident F-1 student on OPT or STEM OPTExempt (IRC 3121(b)(19))Ends when you change to H-1B or become a resident alien
Exempt student who had FICA withheld anywayRefund may be dueAsk the employer first, then Form 843 with Form 8316
Two or more employers in one year, combined wages above the wage baseExcess comes backCredit on Schedule 3 (Form 1040)
One employer withheld more than the annual maximumEmployer should fix itEmployer adjusts; if not, Form 843 with your W-2s

Social Security wage base 2027 and the maximum tax

The wage base is the most wages that Social Security tax applies to in a calendar year. Once your year-to-date wages from one employer cross it, that employer stops withholding the 6.2% for the rest of the year. Medicare has no cap.

Item2026 (in effect)2027 (scheduled)
Social Security rate (employee)6.2%6.2%
Wage base$184,500$192,300
Maximum employee Social Security tax$11,439$11,922.60
Medicare rate (employee)1.45%, no cap1.45%, no cap
Additional Medicare Tax withheld0.9% on wages above $200,000 from one employerSame
Earnings for one credit$1,890$1,970
Earnings for the yearly maximum of four credits$7,560 (our arithmetic)$7,880 (our arithmetic)
Cost-of-living adjustment for beneficiaries2.8%3.6% (benefits from December 2026)

Table as of 2026-11. Sources: SSA Federal Register notice, 2026-10-26; IRS Topic 751.

Below the cap you pay 6.2% on every dollar; the $160,000 San Francisco offer in our cost of living vs H-1B salary comparison stays under the 2026 base. The cap matters only above it, or when two employers together pay you more.

Two H-1B employers in one year: getting the excess back

Change jobs mid-year and each employer withholds from zero. If combined wages pass the wage base, you overpay, and the difference comes back as a credit when you file. IRS Topic 608 says you "may be able to claim the excess as a credit against your income tax on your income tax return." It isn't automatic. Our guide to H-1B taxes when you change employers mid-year covers the rest of a switch.

Worked example: a single filer with two employers in 2027 (our arithmetic)

Suppose you work for Employer A from January to June 2027 and Employer B from July to December.

Employer AEmployer BTotal
Wages$115,000$105,000$220,000
Social Security withheld (6.2%)$7,130$6,510$13,640
2027 maximum$11,922.60
Excess, claimed as a credit$1,717.40
Medicare withheld (1.45%)$1,667.50$1,522.50$3,190
Additional Medicare Tax withheld$0$0$0

Neither employer paid more than $200,000, so neither withheld the 0.9% Additional Medicare Tax. Your combined $220,000 still passes the $200,000 single-filer threshold in Topic 560, so you would owe about $180 ($20,000 × 0.9%) on Form 8959. Married people filing separately, common on Form 1040-NR, face a much lower threshold listed there.

How to check and claim excess Social Security tax

  1. Save each employer's final pay stub before you lose portal access.
  2. Compare box 4 (Social Security tax withheld) with box 3 (Social Security wages) on each Form W-2; box 4 should be 6.2% of box 3.
  3. Ask the payroll team to correct it if a single employer withheld more than the year's maximum ($11,922.60 for 2027). Topic 608 says "your employer should adjust the excess for you"; if it doesn't, file Form 843 with copies of your W-2s.
  4. Claim excess from two or more employers on Schedule 3 (Form 1040), which carries to Form 1040 or 1040-NR (line 11 in the 2025 Form 1040-NR instructions; line numbers can change). Those instructions add that a nonresident "can't claim excess social security or tier 1 RRTA tax withheld for your spouse."
  5. Figure any Additional Medicare Tax on Form 8959 if combined wages pass your filing-status threshold.

Do you get Social Security back when you leave the US?

No. Neither SSA nor the IRS refunds Social Security or Medicare tax because a worker leaves the United States. What you paid stays on your SSA earnings record. The only refunds are for tax that should never have been withheld: exempt student wages, one employer's over-withholding, or the two-employer excess.

Common misconception: "H-1B workers can claim their Social Security back when they leave, like a 401(k)."

Correction: A 401(k) is your own account, which you can withdraw (with tax) or roll over. Social Security tax buys credits toward a future benefit, not a balance, so nothing comes back unless you qualify. Our guide to what happens to your 401(k) when you leave the US covers the account you can take with you.

How the 40-credit path works

SSA credits you with "quarters of coverage" (credits) from your total covered earnings each year, up to four a year. Under the 2026-10-26 notice, one credit took $1,890 in 2026 and takes $1,970 in 2027. Most people need 40 credits for retirement benefits, about ten years of full-time covered work. FICA-exempt OPT years generally add none, because those wages weren't covered (our reading). Credits stay on your record when you leave, and new US work later adds to them.

Worked timeline: leaving for India at the end of 2027

Say you worked on STEM OPT through September 30, 2022 (FICA-exempt), started H-1B on October 1, 2022, and move back to India on December 31, 2027.

Can you collect US Social Security from abroad?

If you reach eligibility, whether SSA can pay you abroad depends on your citizenship and where you live. SSA's Payments Abroad Screening Tool tells you whether retirement, disability or survivor payments would continue indefinitely, stop after a stretch of consecutive months outside the US unless an exception applies, or face country-specific restrictions. Its answer is not binding; confirm with SSA.

Coming from F-1 OPT? When the exemption ends

Nonresident F-1 students on OPT or STEM OPT are exempt from FICA under IRC 3121(b)(19). The IRS student FICA page says the exemption does not apply to students who become resident aliens or who "change to another immigration status which is not exempt," and H-1B is not an exempt status; F-2 spouses never qualify. Under the five-calendar-year rule, a student first present in 2022 can become a resident alien in 2027 after 183 days there that year, while still on OPT, and FICA then applies (our reading); see when F-1 students start paying FICA. If FICA was withheld while you were exempt, see our FICA refund guide for Forms 843 and 8316. Once H-1B status starts, withholding is required.

Common mistakes

Frequently asked questions

Can H-1B workers opt out of Social Security?

No. H-1B wages owe 6.2% Social Security tax up to the wage base ($184,500 in 2026, $192,300 in 2027) and 1.45% Medicare on all wages, whether you are a resident or a nonresident for income tax. The only exemption is a certificate of coverage for a worker temporarily sent from a totalization-agreement country, and the US has no agreement with India or China.

Do I get my Social Security contributions back if I leave the US?

No. Neither SSA nor the IRS refunds Social Security tax because you leave. Your earnings stay on your SSA record, and with 40 credits you may qualify for a retirement benefit later. Refunds exist only for tax withheld in error or above the annual maximum, through your employer, Form 843 or the excess Social Security credit on Schedule 3 (Form 1040).

What is the Social Security wage base for 2027?

$192,300, set by SSA in a Federal Register notice published October 26, 2026, up from $184,500 in 2026. At 6.2%, the most an employee can owe in 2027 is $11,922.60, compared with $11,439 in 2026. Medicare's 1.45% has no cap, and employers withhold an extra 0.9% on wages above $200,000.

Does India have a totalization agreement with the US?

No. As of November 1, 2026, the US has 31 totalization agreements, the newest with Romania from September 1, 2026, and none with India or China. Indian and Chinese H-1B workers can't use a certificate of coverage to avoid US Social Security tax, or combine home-country coverage with US credits to qualify for benefits.

Can I collect US Social Security from abroad?

Possibly, if you earn enough credits (most people need 40) and reach eligibility age. Whether SSA can pay you outside the US depends on your citizenship and country of residence, and some non-citizens' payments stop after time abroad. Run SSA's Payments Abroad Screening Tool for your own situation.

Who to ask

Payroll fixes withholding errors and needs your certificate of coverage, if you have one. A tax professional who prepares nonresident and dual-status returns can confirm the excess credit, Form 843 and Form 8959. SSA handles your earnings record, credits and payments abroad. Your DSO can confirm F-1 dates in SEVIS but is not a tax adviser; an immigration attorney handles status decisions.

Sources

How we checked this: the wage base, credit and COLA figures come from SSA's 2026-10-26 Federal Register notice and the agreement count from SSA's POMS list; we read the IRS topic, alien-employment, student FICA and totalization pages, the 2025 Form 1040-NR instructions and the 2026 Form W-4 on 2026-11-02. SSA's www.ssa.gov pages block automated reading, so we confirmed the screening tool's address and purpose through search. Worked examples are our arithmetic.

This is general information, not legal or tax advice; your own W-2s, pay stubs and SSA records govern, and a tax professional should confirm anything you file.

If you are on OPT, STEM OPT or H-1B and want your next role to be with an employer that sponsors, F1Jobs can help you plan a focused search.

Frequently asked questions

Can H-1B workers opt out of Social Security?

No. H-1B wages owe 6.2% Social Security tax up to the wage base ($184,500 in 2026, $192,300 in 2027) and 1.45% Medicare on all wages, whether you are a resident or a nonresident for income tax. The only exemption is a certificate of coverage for a worker temporarily sent from a totalization-agreement country, and the US has no agreement with India or China.

Do I get my Social Security contributions back if I leave the US?

No. Neither SSA nor the IRS refunds Social Security tax because you leave. Your earnings stay on your SSA record, and with 40 credits you may qualify for a retirement benefit later. Refunds exist only for tax withheld in error or above the annual maximum, through your employer, Form 843 or the excess Social Security credit on Schedule 3 (Form 1040).

What is the Social Security wage base for 2027?

$192,300, set by SSA in a Federal Register notice published October 26, 2026, up from $184,500 in 2026. At 6.2%, the most an employee can owe in 2027 is $11,922.60, compared with $11,439 in 2026. Medicare's 1.45% has no cap, and employers withhold an extra 0.9% on wages above $200,000.

Does India have a totalization agreement with the US?

No. As of November 1, 2026, the US has 31 totalization agreements, the newest with Romania from September 1, 2026, and none with India or China. Indian and Chinese H-1B workers can't use a certificate of coverage to avoid US Social Security tax, or combine home-country coverage with US credits to qualify for benefits.

Can I collect US Social Security from abroad?

Possibly, if you earn enough credits (most people need 40) and reach eligibility age. Whether SSA can pay you outside the US depends on your citizenship and country of residence, and some non-citizens' payments stop after time abroad. Run SSA's Payments Abroad Screening Tool for your own situation.