Study

Is a US Master's in CS Still Worth It After the H-1B Changes?

A practical look at what the H-1B changes actually mean for CS master's students, and how to weigh the degree against real alternatives.

June 16, 20265 min readInformational only
The grand stone steps and columns of an American university library at golden hour

If you're asking whether a US master's in computer science is still worth it after the H-1B changes, here's the honest answer: it depends less on the visa lottery than people assume, and more on how you plan to use Optional Practical Training (OPT). The 2025 H-1B overhaul made the program harder to win for some applicants and, in certain cases, a lot more expensive for employers to sponsor. That's real. But a US CS master's was never valuable purely because it led to H-1B. Its value has always been the work authorization bundled with the degree itself, and that part hasn't gone anywhere. So split the decision in two: is the OPT window worth the tuition and two years on its own, and only then, is chasing H-1B worth the added uncertainty.

What Actually Changed with H-1B

H-1B has always been a capped lottery. There's a base allotment plus a separate pool reserved for people with a US master's degree or higher, so grad-degree holders get two chances at selection instead of one. That's part of the official H-1B specialty occupation program structure, and it predates the recent changes, so it's worth knowing before you assume the odds are hopeless: they've been rough for years, but a US master's has consistently improved them somewhat.

What's new, starting in 2025, is a large one-time fee attached to certain new H-1B petitions, widely reported at around $100,000. As of 2026 the exact scope keeps shifting, so treat any headline as a snapshot, not a final rule, and confirm the current fee and eligibility rules directly with USCIS or an immigration attorney before they factor into a decision this size. What seems stable is the direction: sponsoring an H-1B worker got more expensive for employers, and some have grown more cautious about filing at all, especially for entry-level roles.

US work authorization after a CS master'sF-1 studyCS master'sOPT~12 monthsSTEM OPTextensionH-1B lotterynot guaranteedThe path ends at a lottery, not a guarantee. Rules change.
The typical US work-authorization path after a CS master's, ending at the H-1B lottery. Durations and rules change; verify with USCIS and ICE SEVP.

OPT Is Still the Real Value of the Degree

This is the part that gets lost in H-1B panic. A CS master's graduate on an F-1 visa generally qualifies for about 12 months of standard Optional Practical Training, and STEM fields (CS and most AI programs) get an additional STEM OPT extension on top of that, bringing the total to roughly three years of authorized work in the US. None of that depends on winning the H-1B lottery. You can work the full OPT period, build a real resume line at a US company, and then decide whether to keep trying for H-1B, transfer to an office outside the US, or take that experience home.

Treat this as the actual return on the degree: up to three years of legitimate US work authorization, regardless of what the lottery does. H-1B is the upside case, not the baseline case.

The H-1B lottery is the visible risk everyone talks about. The quieter one is picking a country and a program without ever comparing what you'd actually take home after tax, or how many years stand between you and permanent residency.

When a US Master's in CS Is Still Worth It

  • You're aiming at research teams or labs concentrated in the US, where being there in person for networking still matters a lot.
  • The program comes with real funding (an assistantship, fellowship, or tuition waiver), so you're not financing it on debt against an uncertain visa outcome.
  • You're comfortable treating the OPT years as the full return and H-1B as a bonus, not a requirement for the degree to pay off.
  • You already have publications, a US employer relationship, or a profile suited to something like O-1, so the lottery isn't your only path.

When It Isn't

  • You're self-funding a private US master's near or above six figures and the plan only works financially if H-1B and a green card follow.
  • You want certainty about where you'll be living in five years, not a plan built around winning a lottery repeatedly.
  • You want a partner or family to be able to work too. Dependent work rights tied to H-1B status are limited.
  • You care most about speed to permanent residency. A US master's plus H-1B is, for most people, one of the slower routes to PR compared with several other countries.

Weighing the Alternatives: Canada, UK, Germany, Australia

None of the alternatives are free of tradeoffs, they're just different bets. Canada offers a post-graduation work permit tied to program length, plus a points-based path to permanent residency without employer sponsorship. The UK's graduate route gives roughly two years of work rights after a degree, though the skilled worker visa that follows has its own salary thresholds. Germany charges little to no tuition at public universities, allows a long post-study job search period, and has a fairly clear path to residency once you're employed. Australia pairs a post-study work visa with a points-tested PR system that tends to reward STEM skills.

What actually matters is after-tax salary, cost of living, and years to permanent residency laid out side by side, not just the headline visa names. That's exactly what the AI Relocation Guide is built for: after-tax pay, visa pathway, and years-to-PR across 21 countries, so you can weigh an offer in Toronto against one in Munich against one in Boston on the same terms. If you'd rather compare all 21 countries before committing to a program, that's the fastest way to see where the US actually ranks for your situation instead of guessing from forum posts.

If you're further along and already working, closer to needing a fast H-1B alternative than picking a first degree, our piece on H-1B alternative countries for ML engineers covers that version of the question in more depth.

How to Actually Decide

Write down three numbers before committing to anything: total program cost including living expenses, the realistic OPT window for your field, and your honest tolerance for uncertainty about H-1B. If the first two hold up on their own, meaning the degree and OPT years are worth it even if H-1B never comes through, the US is probably still a reasonable choice. If the whole plan only works assuming you win a lottery with real odds against you, that's the signal to run the numbers on Canada, Germany, the UK, or Australia before you commit two years and a large tuition bill.

The H-1B changes made a hard system harder and, for some employers, more expensive. They didn't erase the actual value of a US CS master's, which was always the OPT authorization more than the lottery ticket after it. Visa rules and fees keep shifting, so verify the current numbers with USCIS or a licensed immigration attorney before making a decision this size based on anything you read online, including this.

This guide is informational and educational only. It is not legal, immigration, tax, or financial advice. Rules, salaries, and timelines change often, so confirm the current details with official government sources and a qualified professional before you act on anything here.