This post is for two readers:
- You're on OPT or STEM OPT and your employer has filed (or will file) a cap-subject H-1B petition for you.
- You're on H-1B and your job just ended, and you need to know how long you can stay.
The cap-gap basics are already on EADly's H-1B lottery guide and H-1B tracker page. Cap-gap travel is on Travel on OPT. This post covers what those pages don't: status vs. work permission, your proof, what happens if the petition fails, the H-1B grace period in detail, a date calculator, and which F-1 records to keep for a future green card.
Not legal advice. This summarizes official U.S. government sources. It is not legal or immigration advice. Cap-gap eligibility depends on your petition, and the H-1B grace period is discretionary. Talk to your DSO, your employer's immigration counsel or your own attorney. EADly is not a law firm and is not affiliated with USCIS or DHS. Updated November 14, 2026 (PT). Each source's own date is in the Sources list.
What is the H-1B cap-gap extension?
Cap-gap is the stretch between the end of your F-1 status and OPT and the start of your H-1B. USCIS says the "cap-gap" period "starts when an F-1 student’s status and employment authorization expires" and ends on April 1 of the fiscal year the H-1B is requested for, or on the approved start date if that is earlier. It exists because "an employer may not file, and USCIS may not accept, a cap subject H-1B petition submitted more than 6 months in advance," so "the earliest date that an employer can file an H-1B cap-subject petition is April 1 for the following fiscal year," which starts October 1 (USCIS cap-gap page). Example: for an FY2027 petition (filed from April 1, 2026; FY2027 starts October 1, 2026), cap-gap can run until April 1, 2027, or until the approved start date if that is earlier, such as October 1, 2026.
If you're the beneficiary of a timely filed, nonfrivolous, cap-subject H-1B petition that requests a change of status, your F-1 status and any current OPT or STEM OPT work permission are "automatically extended until April 1 of the fiscal year for which such H-1B status is being requested or until the validity start date of the approved petition, whichever is earlier" (8 CFR 214.2(f)(5)(vi)(A)). The USCIS cap-gap page says the same. The date itself is not covered: USCIS's Handbook for Employers, M-274 section 7.4.2 has employers record work authorization through March 31, and DHS says the 60-day grace period begins on April 1 if the petition is still pending (see below). So the last covered day is March 31, or the day before an earlier approved start date.
Sources differ on the end date. The regulation and the USCIS cap-gap page say April 1 or the approved start date, whichever is earlier. The USCIS Policy Manual, Vol. 2, Pt. F, Ch. 5 (current as of October 27, 2026) still says the cap-gap period "ends on October 1, the start date of the H-1B cap-subject petition." The April 1 date comes from a DHS final rule published December 18, 2024 and effective January 17, 2025; before it, the extension ran to "October 1 of the fiscal year for which H-1B visa classification has been requested" (89 FR 103054). Use the date your DSO puts on your I-20, and ask your DSO if the two conflict for you.
Why the regulation link is dated. A DHS rule published July 17, 2026 (91 FR 44976) amended 8 CFR 214.2, and the "current" eCFR still shows its text. A federal court vacated that rule on Nov 16, 2026, saying it "has not gone into effect" (court order (PDF)); the government may appeal. So we link the eCFR as of Sept 14, 2026. The F-1 grace period this post calls 60 days is the figure in that version; the vacated rule would have made it 30.
Timely filed means filed "during the applicable H-1B filing period, which begins April 1 and while the student's authorized F-1 duration of status (D/S) admission was still in effect." That includes your studies, OPT and the 60-day grace period after them. The petition must also be "based on a valid, selected registration" (USCIS cap-gap page).
Not covered: cap-exempt petitions, and "a petition asking for consular processing is not eligible for a cap gap extension" (Study in the States, SEVIS Help Hub: F-1 Cap-Gap Extension). You must not have violated your F-1 status (8 CFR 214.2(f)(5)(vi)(C)). F-2 dependents are covered too ((f)(5)(vi)(D)).
Status vs. work permission: the timing that matters
Cap-gap extends your status if the petition was filed while your F-1 status was in effect. It extends your work permission only if you still had OPT or STEM OPT work authorization when the petition was filed.
If the petition was filed during your 60-day grace period, you "will receive the automatic extension of [your] F-1 status, but will not be authorized to work" (USCIS cap-gap page).
The cap_gap_eligibility function below checks this from your dates.
Your proof is an updated I-20, not a new EAD
A student "does not file an application for the extension or receive a new Employment Authorization Document (EAD)." The "only proof of continued employment authorization currently available to an affected student is an updated Form I-20 showing an extension of OPT, issued to the student by their designated school official (DSO)." USCIS describes two steps. First, give your DSO evidence of the timely filed petition, "such as a copy of the petition and a FedEx, UPS, or USPS Express/certified mail receipt." Then, when the employer gets the Form I-797 receipt notice (it must have a valid receipt number), bring a copy back to your DSO, who issues another updated I-20 showing the extension to April 1. Because the extension is automatic, "the updated Form I-20 is not required for a student to continue working," and you can keep working while the update is processed (USCIS cap-gap page). Keep every version of the I-20 your DSO issues.
For your employer's Form I-9. USCIS's Handbook for Employers says your expired EAD "in combination with" the employer's Form I-797C receipt notice for the H-1B petition "is an unexpired EAD under List A." This ends if the petition is rejected, denied, revoked or withdrawn. The employer records your work authorization as running to March 31 of the fiscal year of the H-1B start date, and must reverify on or by March 31. Once the petition is approved, the new I-94 on the Form I-797 can be used for reverification (USCIS, M-274 section 7.4.2). Keep a copy of the I-797C with your expired EAD.
If SEVIS shows the wrong end date. If your OPT end date is shortened to Sept. 30 even though your H-1B employment starts later, USCIS says to contact your DSO, who may request a SEVIS data fix (USCIS cap-gap page).
Unemployment still counts during cap-gap
Unemployment during the cap-gap extension counts toward your 90-day or 150-day limit (USCIS Policy Manual, Ch. 5). See Do weekends, holidays and trips count as OPT unemployment? and How many unemployment days are allowed on OPT?
If the petition is rejected, denied, revoked or withdrawn
Cap-gap ends automatically "upon the rejection, denial, revocation, or withdrawal of the H-1B petition," or upon the denial or withdrawal of the change of status request, "even if" the petition is approved for consular processing (8 CFR 214.2(f)(5)(vi)(B)).
You then get the standard 60-day grace period to depart, but official sources describe its start differently:
| Source | When the 60 days start |
|---|---|
| USCIS cap-gap page, one section | "from the date the extension of status terminated or their program end date, whichever is later" |
| Same page, another section | "from the date of the notification of the denial, rejection, revocation, or withdrawal of the petition" |
| USCIS Policy Manual, Ch. 5 | "from the date of the rejection, denial, withdrawal, revocation notice, or the student's program or OPT end date, whichever is later" |
Still pending on April 1? In the 2024 final rule, DHS wrote that if the petition "is still pending on April 1, then the beneficiary of the petition is no longer authorized for OPT and the 60-day grace period begins on April 1." It added that individuals "generally have been allowed to remain in the United States in an authorized period of stay while a subsequent H-1B petition and change of status request is pending," and declined to add this language to the regulation text (89 FR 103054, at 103115).
Ask your DSO which date applies to you. There is one exception everyone agrees on: if the change of status is denied for a status violation, misrepresentation or fraud, the grace period doesn't apply, and USCIS says such students "are required to immediately leave" (USCIS cap-gap page). Students in the grace period are not authorized to work (same page).
STEM OPT as a backup: eligible students "may apply for a STEM OPT extension during the cap-gap extension period," but not "once the cap-gap extension period is terminated ... and the student has entered the 60-day grace period" (same page). If your petition is at risk and you have a STEM degree, talk to your DSO early. See the STEM OPT extension guide.
Laid off after approval but before H-1B starts
If your change of status was approved but your H-1B employer lets you go before H-1B status starts, USCIS says "the student can retrieve any unused OPT if they have an unexpired EAD issued for post-completion OPT." For that, USCIS must receive the employer's withdrawal before the change of status takes effect. You then give your DSO a copy of the USCIS acknowledgement of withdrawal, and the DSO may ask the SEVIS Help Desk for a data fix so your SEVIS record isn't terminated. While that fix is pending you may keep working on your unexpired EAD if you have employment appropriate to your OPT and haven't otherwise violated your F-1 status. If USCIS doesn't receive the withdrawal in time, you must stop working, file Form I-539 to request F-1 status, and wait for approval before resuming OPT. If the approval is withdrawn after your status has already changed to H-1B, USCIS says you are no longer in F-1 status and would need to file Form I-539 to seek a change back to F-1 (USCIS cap-gap page).
Steps while a cap-subject petition is pending
- Confirm the filing type with your employer or its attorney: change of status (not consular processing), cap-subject, with a start date in the next fiscal year.
- Compare the filing date with your dates. Before your EAD ends means status and work. Before your F-1 grace period ends means status only. The calculator below does this.
- Send your DSO proof of filing (a petition copy and the courier or certified-mail receipt), then the I-797 receipt notice when it arrives, and ask for an updated I-20 each time. Keep every version, and keep the I-797C with your EAD for your employer's Form I-9.
- Keep reporting employment and address changes. You are still F-1. See the SEVP Portal guide.
- Check your case on USCIS Case Status Online with the receipt number, and save each status change.
- Before you travel, read cap-gap travel. USCIS says travel while the change of status is pending abandons it.
- If the petition fails, note the date on the notice and contact your DSO right away (see the table above).
How long can you stay in the U.S. after an H-1B job ends?
Up to 60 consecutive days, or until the end of your authorized validity period if that is sooner, once per validity period (8 CFR 214.1(l)(2)). USCIS's archived guidance says it starts the day after your employment ends, which is usually your last paid day. You can't work during it unless otherwise authorized, and DHS can shorten or eliminate it. It ends if you leave the U.S. (USCIS, archived).
What the regulation says
Under 8 CFR 214.1(l)(2), H-1B workers (and E-1, E-2, E-3, H-1B1, L-1, O-1 and TN workers) "and his or her dependents shall not be considered to have failed to maintain nonimmigrant status solely on the basis of a cessation of the employment on which the alien's classification was based, for up to 60 consecutive days or until the end of the authorized validity period, whichever is shorter, once during each authorized validity period." It adds: "DHS may eliminate or shorten this 60-day period as a matter of discretion," and, unless otherwise authorized, "the alien may not work during such a period." (The text is the same in the eCFR versions of Sept 14 and Oct 14, 2026.)
What that means in practice:
- It's discretionary. USCIS's archived guidance says USCIS decides whether it applies "during the adjudication of a subsequent" filing, and that filers should ask for it in a cover letter (see below).
- You can't work during it unless something else authorizes you.
- Once per authorized validity period.
- The shorter of the two dates wins: 60 days, or the end of your validity period.
What USCIS has said (on an archived page)
USCIS's page "Options for Nonimmigrant Workers Following Termination of Employment" has the most detail, but USCIS has archived it (last reviewed 01/24/2025). Treat the regulation as the primary source and this page as background. It says:
- The period "starts the day after termination of employment, which is typically determined based on the last day for which a salary or wage is paid."
- It applies whether the job ends "either voluntarily or involuntarily."
- It "ends upon any departure from the United States."
- A dependent spouse's EAD "will remain valid during the maximum 60-day grace period."
If your last day worked and your last day paid are different (for example, paid leave after your last working day), ask an immigration attorney which date applies to you. The calculator shows both dates and doesn't pick one.
What are your options during the H-1B grace period?
The archived page lists these options:
- A new employer files a nonfrivolous H-1B petition for you. Under portability you may start work "as soon as" the petition is "properly filed," without waiting for approval. A certified Labor Condition Application is required initial evidence.
- Change to another status (examples include H-4, F-1 and B-2) with a timely, nonfrivolous filing. The page says this "toll[s]" unlawful presence while pending, if you didn't work without authorization and you maintained status before filing.
- Apply for adjustment of status, if eligible.
- Apply for a compelling circumstances EAD, if eligible.
- Otherwise, leave by the end of the grace period.
How this differs from the F-1 grace period
The F-1 period gives students "an additional 60-day period to prepare for departure from the United States or to transfer" (8 CFR 214.2(f)(5)(iv)). ICE says you can't re-enter in F-1 status during it (ICE, Travel). The H-1B period is a separate, discretionary rule that ends if you leave the U.S.
Steps if your H-1B job ends
- Get your separation date in writing. Ask HR for a letter with your last day worked and last day paid. Keep the final pay stub.
- Find your validity end date on your I-797A and your most recent I-94 (how to get it: I-94 guide). If the two differ, ask your attorney which one controls.
- Work out the outer date: the earlier of day 60 and your validity end. The calculator below does this.
- Choose a path and make sure USCIS receives the filing before that date. USCIS records the receipt date as the date the filing actually arrives at the filing location (8 CFR 103.2(a)(7)(i)).
- Don't work unless authorized, and don't leave the U.S. if you're relying on the grace period.
- Talk to an immigration attorney.
A small date calculator
Four functions do the date math in this post:
grace_period_end(last_day, validity_end)returns the earlier of last day + 60 days and the validity end. Day 1 is the day after your last day, so a last day of March 15, 2026 gives May 14, 2026, unless your validity ends first.cap_gap_end(fiscal_year, approved_start)supports FY2026 onward and returns the earlier of April 1 of the fiscal year and the approved start date: the date status is extended "until". That date itself isn't covered.cap_gap_last_day(fiscal_year, approved_start)returns the day before it, the last covered day, as in the rule above. For FY2027 with no approved start, that's 2027-03-31.cap_gap_eligibility(...)retains its old function name but returns eligibility not determined and unknown status/work results. It compares supplied dates only. Pass both EAD dates to check literal date coverage; an EAD end date alone cannot show that OPT had begun when the petition was filed. Passnoneas the EAD end if you never had OPT.
Every result is labeled: "Estimate from the dates you entered. Not legal advice. USCIS decides; the grace period is discretionary."
What it doesn't check: whether the petition was nonfrivolous, based on a selected registration or filed in the filing period; whether you maintained status; and which 60-day start date applies if a petition fails. Your DSO and attorney check those.
Files (MIT license, standard library only): transition_dates.py, test_transition_dates.py, transition_dates.js, transition_dates.test.js. Download: transition_dates.py · test_transition_dates.py · transition_dates.js · transition_dates.test.js.
Python (3.9+)
"""F-1 to H-1B transition date estimates: cap-gap end and last covered day,
cap-gap date relationships (not eligibility), and the H-1B up-to-60-day grace period end.
Estimates only. USCIS decides; the grace period is discretionary.
Sources: 8 CFR 214.1(l)(2), 8 CFR 214.2(f)(5)(vi), USCIS cap-gap page.
"""
import argparse
from datetime import date, timedelta
LABEL = ("Estimate from the dates you entered. Not legal advice. "
"USCIS decides; the grace period is discretionary.")
FLAG = ("FLAG: your last day paid differs from your last day worked. "
"USCIS's archived page says the period starts the day after "
"termination of employment, typically determined by the last day "
"for which a salary or wage is paid. Ask an immigration attorney "
"which date applies to you.")
def grace_period_end(last_day_of_employment, validity_end):
"""Last day of the up-to-60-day grace period.
Day 1 is the day after last_day_of_employment, so day 60 is
last_day_of_employment + 60 days. Capped at the I-797/I-94 validity end.
"""
if validity_end < last_day_of_employment:
raise ValueError("validity_end is before last_day_of_employment; check your dates")
return min(last_day_of_employment + timedelta(days=60), validity_end)
def grace_period_report(last_day_of_employment, validity_end, last_day_paid=None):
"""grace_period_end plus the label. If last_day_paid differs from the last
day worked, both dates are shown side by side with the FLAG. Neither is picked."""
report = {
"by_last_day_worked": grace_period_end(last_day_of_employment, validity_end),
"label": LABEL,
}
if last_day_paid and last_day_paid != last_day_of_employment:
# min(): pay running past the validity end still stops at the validity end.
report["by_last_day_paid"] = grace_period_end(min(last_day_paid, validity_end), validity_end)
report["flag"] = FLAG
return report
def cap_gap_end(fiscal_year, approved_validity_start=None):
"""Outer cap-gap date: April 1 of the fiscal year, or the approved
petition's validity start date if that is earlier. Status is extended
"until" this date, so the date itself is not covered (cap_gap_last_day).
FY N runs Oct 1 (N-1) to Sep 30 N, so FY2027 -> 2027-04-01."""
if not isinstance(fiscal_year, int) or not 2026 <= fiscal_year <= 9999:
raise ValueError("This estimator supports fiscal years 2026 through 9999; earlier rules differ")
april_1 = date(fiscal_year, 4, 1)
return min(april_1, approved_validity_start) if approved_validity_start else april_1
def cap_gap_last_day(fiscal_year, approved_validity_start=None):
"""Last day cap-gap covers: the day before cap_gap_end.
FY2027 -> 2027-03-31 (USCIS M-274 has employers record March 31)."""
return cap_gap_end(fiscal_year, approved_validity_start) - timedelta(days=1)
def cap_gap_eligibility(filed_on, opt_ead_end, program_end, change_of_status, cap_subject, opt_ead_start=None):
"""Retained name for existing callers: review supplied dates, not eligibility.
Neither date coverage nor a 60-day estimate establishes maintained status,
a qualifying petition, timely filing or current employment authorization.
"""
if opt_ead_start and (not opt_ead_end or opt_ead_start > opt_ead_end):
raise ValueError("Check both EAD dates: start must be on or before end")
estimated_grace_end = max(d for d in (opt_ead_end, program_end) if d) + timedelta(days=60)
reason = ("Dates alone cannot determine cap-gap status or work authorization. Review the "
"petition, filing period, maintained status and current outcome with your DSO.")
if change_of_status is False:
reason += " The request is recorded as consular processing, which the cap-gap rule excludes."
if cap_subject is False:
reason += " The petition is recorded as cap-exempt, which the cap-gap rule excludes."
return {
"eligibility": "not_determined", "status_extended": None, "work_extended": None,
"supplied_ead_covers_filing": opt_ead_start <= filed_on <= opt_ead_end if opt_ead_start and opt_ead_end else None,
"estimated_f1_grace_end": estimated_grace_end,
"filed_on_or_before_estimated_grace_end": filed_on <= estimated_grace_end,
"reason": reason, "label": LABEL,
}
def iso_or_none(text):
"""CLI helper: 'none' (any case) -> None, otherwise a YYYY-MM-DD date."""
return None if text.strip().lower() == "none" else date.fromisoformat(text)
def _main():
iso = date.fromisoformat
p = argparse.ArgumentParser(description=LABEL)
sub = p.add_subparsers(dest="cmd", required=True)
g = sub.add_parser("grace", help="H-1B grace period end")
g.add_argument("last_day_worked", type=iso)
g.add_argument("validity_end", type=iso, help="I-797 / I-94 end date")
g.add_argument("--paid", type=iso, help="last day paid, if different")
c = sub.add_parser("capgap-end", help="cap-gap last covered day and outer date")
c.add_argument("fiscal_year", type=int)
c.add_argument("validity_start", type=iso, nargs="?", help="approved petition start date")
e = sub.add_parser("eligibility", help="review cap-gap dates; eligibility is not determined")
e.add_argument("filed_on", type=iso)
e.add_argument("opt_ead_end", type=iso_or_none,
help="OPT or STEM EAD end date, or 'none' if you never had OPT")
e.add_argument("program_end", type=iso)
e.add_argument("--ead-start", type=iso, help="optional EAD start for literal date coverage")
e.add_argument("--consular", action="store_true", help="petition requests consular processing")
e.add_argument("--cap-exempt", action="store_true", help="employer is cap-exempt")
a = p.parse_args()
if a.cmd == "grace":
for k, v in grace_period_report(a.last_day_worked, a.validity_end, a.paid).items():
print(f"{k}: {v}")
elif a.cmd == "capgap-end":
print(f"last_covered_day: {cap_gap_last_day(a.fiscal_year, a.validity_start)}")
print(f"cap_gap_end: {cap_gap_end(a.fiscal_year, a.validity_start)} (extended until this date; not itself covered)")
print(f"label: {LABEL}")
else:
r = cap_gap_eligibility(a.filed_on, a.opt_ead_end, a.program_end,
change_of_status=not a.consular, cap_subject=not a.cap_exempt, opt_ead_start=a.ead_start)
for k, v in r.items():
print(f"{k}: {v}")
if __name__ == "__main__":
_main()
python3 transition_dates.py grace 2026-03-15 2028-09-30
python3 transition_dates.py grace 2026-03-15 2028-09-30 --paid 2026-03-31
python3 transition_dates.py capgap-end 2027 2026-10-01
python3 transition_dates.py eligibility 2026-04-03 2026-03-20 2025-05-15
python3 transition_dates.py eligibility 2026-06-01 none 2026-05-15
The second command prints by_last_day_worked: 2026-05-14 and by_last_day_paid: 2026-05-30, plus a flag. It doesn't choose between them. The third prints last_covered_day: 2026-09-30 and cap_gap_end: 2026-10-01.
JavaScript (Node 18+)
// F-1 to H-1B transition date estimates. Same rules as transition_dates.py.
// Dates are "YYYY-MM-DD" strings, handled in UTC so time zones can't shift a day.
// Estimates only. USCIS decides; the grace period is discretionary.
const LABEL = "Estimate from the dates you entered. Not legal advice. " +
"USCIS decides; the grace period is discretionary.";
const FLAG = "FLAG: your last day paid differs from your last day worked. " +
"USCIS's archived page says the period starts the day after " +
"termination of employment, typically determined by the last day " +
"for which a salary or wage is paid. Ask an immigration attorney " +
"which date applies to you.";
function parse(s) {
if (typeof s !== "string" || !/^\d{4}-\d{2}-\d{2}$/.test(s)) {
throw new Error(`Expected a YYYY-MM-DD date, got ${s}`);
}
const d = new Date(s + "T00:00:00Z");
if (isNaN(d) || d.toISOString().slice(0, 10) !== s) throw new Error(`Invalid date ${s}`);
return d;
}
function addDays(s, n) {
const d = parse(s);
d.setUTCDate(d.getUTCDate() + n);
return d.toISOString().slice(0, 10);
}
// YYYY-MM-DD strings sort the same as the dates they name.
const minDate = (a, b) => (parse(a), parse(b), a < b ? a : b);
const maxDate = (a, b) => (parse(a), parse(b), a > b ? a : b);
// Day 1 = the day after lastDayOfEmployment; capped at the I-797/I-94 validity end.
function gracePeriodEnd(lastDayOfEmployment, validityEnd) {
if (validityEnd < lastDayOfEmployment) {
throw new Error("validityEnd is before lastDayOfEmployment; check your dates");
}
return minDate(addDays(lastDayOfEmployment, 60), validityEnd);
}
function gracePeriodReport(lastDayOfEmployment, validityEnd, lastDayPaid = null) {
const report = { byLastDayWorked: gracePeriodEnd(lastDayOfEmployment, validityEnd), label: LABEL };
if (lastDayPaid && lastDayPaid !== lastDayOfEmployment) {
report.byLastDayPaid = gracePeriodEnd(minDate(lastDayPaid, validityEnd), validityEnd);
report.flag = FLAG;
}
return report;
}
// FY N runs Oct 1 (N-1) to Sep 30 N, so FY2027 -> "2027-04-01". Status is extended
// "until" this date, so the date itself is not covered (capGapLastDay).
function capGapEnd(fiscalYear, approvedValidityStart = null) {
if (!Number.isInteger(fiscalYear) || fiscalYear < 2026 || fiscalYear > 9999) throw new Error("This estimator supports fiscal years 2026 through 9999; earlier rules differ");
const april1 = `${fiscalYear}-04-01`;
return approvedValidityStart ? minDate(april1, approvedValidityStart) : april1;
}
// Last day cap-gap covers: the day before capGapEnd. FY2027 -> "2027-03-31".
function capGapLastDay(fiscalYear, approvedValidityStart = null) {
return addDays(capGapEnd(fiscalYear, approvedValidityStart), -1);
}
// Retained name for existing callers: this reviews supplied dates, not eligibility.
function capGapEligibility({ filedOn, optEadStart = null, optEadEnd = null, programEnd, changeOfStatus, capSubject }) {
parse(filedOn);
parse(programEnd);
if (optEadEnd !== null) parse(optEadEnd);
if (optEadStart !== null) {
parse(optEadStart);
if (optEadEnd === null || optEadStart > optEadEnd) throw new Error("Check both EAD dates: start must be on or before end");
}
const estimatedF1GraceEnd = addDays(optEadEnd ? maxDate(optEadEnd, programEnd) : programEnd, 60);
let reason = "Dates alone cannot determine cap-gap status or work authorization. Review the petition, filing period, maintained status and current outcome with your DSO.";
if (changeOfStatus === false) reason += " The request is recorded as consular processing, which the cap-gap rule excludes.";
if (capSubject === false) reason += " The petition is recorded as cap-exempt, which the cap-gap rule excludes.";
return {
eligibility: "not_determined", statusExtended: null, workExtended: null,
suppliedEadCoversFiling: optEadStart !== null && optEadEnd !== null ? optEadStart <= filedOn && filedOn <= optEadEnd : null,
estimatedF1GraceEnd, filedOnOrBeforeEstimatedGraceEnd: filedOn <= estimatedF1GraceEnd,
reason, label: LABEL
};
}
module.exports = { LABEL, FLAG, gracePeriodEnd, gracePeriodReport, capGapEnd, capGapLastDay, capGapEligibility };
Worked examples (these are test cases)
| Call | Result | Why |
|---|---|---|
grace_period_end(2026-03-15, 2028-09-30) | 2026-05-14 | Day 1 is March 16, so day 60 is May 14 |
grace_period_end(2026-03-15, 2026-04-30) | 2026-04-30 | The validity end comes first |
grace_period_end(2026-12-20, 2029-01-01) | 2027-02-18 | Crosses the year boundary |
grace_period_report(2026-03-15, 2028-09-30, last_day_paid=2026-03-31) | 2026-05-14 / 2026-05-30 + flag | Both shown, neither picked |
cap_gap_end(2027, 2026-10-01) | 2026-10-01 | Approved, starts Oct 1 |
cap_gap_end(2027, None) | 2027-04-01 | Still pending: the outer limit |
cap_gap_end(2027, 2026-11-15) | 2026-11-15 | Approved with a later start date |
cap_gap_last_day(2027, None) | 2027-03-31 | Still pending: the last covered day |
cap_gap_last_day(2027, 2026-10-01) | 2026-09-30 | The day before an approved Oct 1 start |
| Filed 2026-04-03, only EAD end 2026-06-30 supplied | Eligibility not determined; EAD coverage unknown | The EAD start and other required facts are missing |
| Filed 2026-04-03, EAD ended 2026-03-20, program ended 2025-05-15 | Eligibility not determined; estimated grace end 2026-05-19 | A date comparison does not establish maintained status |
| Filed 2026-05-20, EAD ended 2026-03-20 | Eligibility not determined; after the estimated 2026-05-19 date | Ask the DSO or attorney to review the actual record |
| Filed 2026-06-01, no OPT, program ended 2026-05-15 | Eligibility not determined; estimated grace end 2026-07-14 | No EAD date coverage can be checked |
| Any dates, recorded consular processing | Eligibility not determined; rule exclusion noted | The cap-gap rule excludes consular-processing requests |
Run the tests with python3 -m unittest test_transition_dates.py and node --test transition_dates.test.js. The cases cover independent date arithmetic, missing EAD starts, future EAD starts, inclusive endpoints and the absence of eligibility verdicts.
What documents should you keep after changing from F-1 to H-1B?
Keep every Form I-20 (all pages, including the cap-gap update), every I-797 notice, every I-94, your passport pages with visas and admission stamps, your OPT and STEM OPT EAD cards with the H-1B I-797C receipt, your Form I-983 and evaluations, and your employment and pay records. The table below gives the reason and the official basis for each.
The strongest official reason to keep your F-1 papers is the green card application. The Form I-485 instructions (edition 09/18/26, page 10, Item 7, "Evidence of Continuously Maintaining a Lawful Status Since Arrival") apply to family-based and employment-based preference applicants and some others (religious workers, international broadcasters, diversity visa selectees). They list:
- "Form I-797, Notice of Action, for all extensions of stay and changes of nonimmigrant status";
- Form I-94, "including printouts of paperless I-94 admissions";
- Form I-20, "including all pages containing notations by authorized school officials";
- your passport admission or parole stamp.
They also say: "Include evidence for every time you entered the United States and for the time periods spent in the United States." The same instructions have category-specific exceptions (for example INA 245(k) for some employment-based applicants). Your attorney will tell you what your category needs.
Once you're in H-1B status
- No EAD for H-1B. The Form I-765 instructions tell a nonimmigrant "only authorized for employment with a specific employer under 8 CFR 274a.12(b)" not to use Form I-765, and H-1B workers are in that list (I-765 instructions, page 1; 8 CFR 274a.12(b)(9)). Your approval notice and its I-94 are the record.
- Address changes within 10 days. USCIS says "all aliens in the United States must report a change of address to USCIS within 10 days of moving" (A and G visa holders and visa waiver visitors excepted). A USCIS online account or a paper Form AR-11 meets the requirement (USCIS, How to Change Your Address; 8 CFR 265.1). While you're still on F-1, telling your DSO within 10 days meets this requirement (8 CFR 214.2(f)(17)); if you have a pending USCIS case, update your address with USCIS too. Once you're in H-1B status, report to USCIS directly.
- Save your SEVP Portal details before access ends. The portal goes read-only on the 16th day after OPT or STEM OPT ends (SEVP Portal guide).
| Document | Why keep it | Official basis |
|---|---|---|
| Every Form I-20, every page, including the cap-gap update | Each F-1 period and DSO notation. The cap-gap I-20 is your proof of extended work permission | I-485 instructions; USCIS cap-gap page |
| I-797 notices: OPT/STEM receipts and approvals, the H-1B receipt, and the I-797A or I-797B | Status changes and extensions | I-485 instructions; USCIS: Form I-797 types |
| Every I-94: CBP printouts and the I-94 on an I-797A | Each admission and status period. USCIS describes the I-797A as "Issued to an applicant as a replacement Form I-94" | I-485 instructions; USCIS: Form I-797 types |
| Passport pages with visas and admission stamps, including expired passports | Each entry | I-485 instructions |
| OPT and STEM OPT EAD cards, plus the H-1B I-797C receipt | Work authorization dates. During cap-gap, the expired EAD with the I-797C is your employer's Form I-9 evidence | Practical record (not on the I-485 list); USCIS M-274, 7.4.2 |
| Form I-983 and every evaluation | Your STEM training record. The final evaluation is due within 10 days after the training ends | Study in the States, Form I-983 Overview |
| Offer letters, pay stubs, W-2s, tax returns, SEVP Portal confirmations | Show you worked as reported | Practical record, not a stated immigration requirement. The IRS generally says to keep tax records for 3 years, and "do not discard them until you check to see if you have to keep them longer for other purposes" (IRS) |
| After an H-1B job ends: a separation letter with last day worked and last day paid | The grace period start may depend on these dates | Archived USCIS page |
Getting missing records
- I-94s and travel history: see How to get your travel history for a green card and How to find your I-94 record.
- I-20s: ask the DSO at the school that issued them. For SEVIS records by FOIA, USCIS's FOIA page sends you to ICE (USCIS FOIA).
- I-797 notices: ask the employer or attorney who filed the petition for a copy. You can also request specific documents from your own USCIS record by FOIA, online at first.uscis.gov. USCIS says requests for specific documents are processed faster than requests for a whole file (USCIS FOIA).
- W-2 data: the IRS's free wage and income transcript shows data from Forms W-2 the IRS received, for the current and nine prior tax years, through an IRS Individual Online Account or Form 4506-T. A transcript "isn't a photocopy of your return"; Form 4506 gets copies, for a fee (IRS, transcript types). Filing questions: F-1 student taxes.
- Case history: look up each receipt number on USCIS Case Status Online and save the page.
Keep it in one place with EADly
EADly is a private, local-first app for iPhone and Android, built to keep this history together:
- I-797A and I-797B are kept as separate record types. EADly never treats an I-797B as an I-94.
- Cap registrations are saved by season, with petitions and cap-gap information next to your saved F-1 facts.
- An employment-end flag marks the date an H-1B job ends.
- Saved USCIS receipt numbers open the official USCIS Case Status page. EADly does not check or monitor case status.
- Encrypted Document Vault. Free holds 1 Vault document.
- Readiness packets (including H-1B and attorney hand-off), and with EADly Plus, an immigration history summary PDF.
EADly doesn't decide whether cap-gap applies to you or which option fits after a job ends. It isn't a law firm.
Get EADly on the App Store or Google Play.
Common questions
Can I work during cap-gap?
Only if you still had OPT or STEM OPT work authorization when the petition was filed. If it was filed during your F-1 grace period, you get the status extension but not work permission (USCIS).
What proves my cap-gap work permission?
An updated Form I-20 from your DSO showing the extension. You don't get a new EAD (USCIS).
What happens if my H-1B petition is denied during cap-gap?
Cap-gap ends, and you have the F-1 grace period to depart: 60 days under the regulation as in effect before the July 2026 rule that a federal court vacated on Nov 16, 2026 (that rule would have made it 30), and none after a denial for a status violation, misrepresentation or fraud. USCIS sources describe the start of those 60 days differently, so ask your DSO. You can't apply for STEM OPT once you're in that grace period.
Did the cap-gap end date change from October 1 to April 1?
Yes. A DHS final rule effective January 17, 2025 moved it to April 1 or the approved start date, whichever is earlier (89 FR 103054; 8 CFR 214.2(f)(5)(vi)(A)). The USCIS Policy Manual (current as of October 27, 2026) still says October 1, so use the date your DSO puts on your I-20 and ask your DSO if the two conflict for you.
What if my H-1B petition is still pending on April 1?
DHS wrote in the 2024 final rule that you are then "no longer authorized for OPT and the 60-day grace period begins on April 1." That statement is in the rule's preamble, not the regulation text (89 FR 103054). Talk to your DSO and the employer's attorney.
What does my employer use for Form I-9 during cap-gap?
Your expired EAD together with the employer's Form I-797C receipt notice for a timely filed H-1B change-of-status petition. The M-274 treats that combination as an unexpired List A EAD, recorded to March 31, and the extension ends if the petition is rejected, denied, revoked or withdrawn (USCIS M-274).
How long can I stay after my H-1B job ends?
Up to 60 consecutive days or until your validity period ends, whichever is shorter, once per validity period, at DHS's discretion. You can't work during it unless otherwise authorized (8 CFR 214.1(l)(2)).
When does the H-1B 60-day period start?
USCIS's archived page says the day after termination of employment, "typically determined based on the last day for which a salary or wage is paid." If your last day worked and last day paid differ, ask an attorney.
What should I keep for a future green card?
Every I-20 (all pages), I-797, I-94 and passport admission stamp. The I-485 instructions ask many applicants for evidence of every entry and of lawful status since arrival (I-485 instructions).
Keep your records in EADly
Save your OPT, STEM OPT, I-94, H-1B, O-1 or green card dates in EADly to see upcoming deadlines, count OPT unemployment days from your saved jobs, check USCIS case status, and keep documents encrypted on your device. Free core, no ads; optional EADly Plus adds automatic encrypted cloud backup, unlimited Document Vault files and PDF exports.
Sources
Checked October 17, 2026 (PT); USCIS sources rechecked November 14, 2026 (PT) where noted. The date in brackets is the date each page showed.
- 8 CFR 214.2(f)(5)(iv) and (f)(5)(vi), eCFR as of Sept 14, 2026: https://www.ecfr.gov/on/2026-09-14/title-8/chapter-I/subchapter-B/part-214/subpart-A/section-214.2
- 8 CFR 214.1(l)(2), eCFR: https://www.ecfr.gov/current/title-8/chapter-I/subchapter-B/part-214/subpart-A/section-214.1 [same text in the Sept 14 and Oct 14, 2026 versions]
- 8 CFR 103.2(a)(7)(i), eCFR: https://www.ecfr.gov/current/title-8/chapter-I/subchapter-B/part-103/section-103.2
- USCIS, Extension of Post-Completion OPT and F-1 Status for Eligible Students (cap-gap): https://www.uscis.gov/working-in-the-united-states/temporary-workers/h-1b-specialty-occupations/extension-of-post-completion-optional-practical-training-opt-and-f-1-status-for-eligible-students [last reviewed 01/17/2025; rechecked November 14, 2026, unchanged]
- USCIS Policy Manual, Vol. 2, Pt. F, Ch. 5: https://www.uscis.gov/policy-manual/volume-2-part-f-chapter-5 [current as of October 27, 2026; rechecked November 14, 2026, quoted text unchanged]
- USCIS, Form I-765 (court-order alert): https://www.uscis.gov/i-765 [last reviewed 10/07/2026]
- Study in the States, SEVIS Help Hub, F-1 Cap-Gap Extension: https://studyinthestates.dhs.gov/sevis-help-hub/student-records/fm-status/f-1-cap-gap-extension [April 10, 2025]
- USCIS (archived), Options for Nonimmigrant Workers Following Termination of Employment: https://www.uscis.gov/archive/options-for-nonimmigrant-workers-following-termination-of-employment-0 [last reviewed 01/24/2025; marked archived; rechecked November 14, 2026]
- ICE, Travel: https://www.ice.gov/sevis/travel
- USCIS, Form I-797: Types and Functions: https://www.uscis.gov/forms/filing-guidance/form-i-797-types-and-functions
- USCIS, Instructions for Form I-485: https://www.uscis.gov/sites/default/files/document/forms/i-485instr.pdf [edition 09/18/26]
- Study in the States, Form I-983 Overview: https://studyinthestates.dhs.gov/stem-opt-hub/additional-resources/form-i-983-overview [October 2, 2025]
Added October 21, 2026 (PT), from the gap check:
- Federal Register, Modernizing H-1B Requirements (final rule), 89 FR 103054: https://www.federalregister.gov/documents/2024/12/18/2024-29354/modernizing-h-1b-requirements-providing-flexibility-in-the-f-1-program-and-program-improvements [published 12/18/2024; effective 01/17/2025]
- USCIS, Handbook for Employers M-274, 7.4.2 F-1 and M-1 Nonimmigrant Students: https://www.uscis.gov/i-9-central/form-i-9-resources/handbook-for-employers-m-274/70-evidence-of-employment-authorization-for-certain-categories/74-exchange-visitors-and-students/742-f-1-and-m-1-nonimmigrant-students [last reviewed 04/02/2025]
- USCIS, Instructions for Form I-765: https://www.uscis.gov/sites/default/files/document/forms/i-765instr.pdf [edition 08/21/25]
- 8 CFR 274a.12(b)(9), eCFR: https://www.ecfr.gov/current/title-8/chapter-I/subchapter-B/part-274a/subpart-B/section-274a.12
- USCIS, How to Change Your Address: https://www.uscis.gov/addresschange [last reviewed 08/04/2026]
- 8 CFR 265.1, eCFR: https://www.ecfr.gov/current/title-8/chapter-I/subchapter-B/part-265/section-265.1
- USCIS, Request Records through FOIA or Privacy Act: https://www.uscis.gov/records/request-records-through-the-freedom-of-information-act-or-privacy-act [last reviewed 01/27/2026]
- IRS, How long should I keep records?: https://www.irs.gov/businesses/small-businesses-self-employed/how-long-should-i-keep-records [last reviewed 06/30/2026]
- IRS, Transcript types and ways to order them: https://www.irs.gov/individuals/transcript-types-and-ways-to-order-them [last reviewed 03/10/2026]
Not legal advice. EADly is not a law firm and is not affiliated with USCIS or DHS.