The cost of attending graduate school for a master's degree in physics varies according to the program and institution. For example, enrolling in Columbia University's master's program in physics costs more than $18,000 per semester. Meanwhile, the same type of program at a state university, such as Stony Brook University, may only cost a little over $8,000 per year for a New York resident.References:
Columbia University: Student Financial Services Tuition & Fees
Stony Brook University: Office of Financial Aid and Scholarship Services
Resources:
American Institute of Physics: Home
That's 6 to ten years depending how far they took it.
2 semesters a year, 6 years, 18 grand a semester... $216,000.
That's not how it works in real life though. No one in the hard sciences like physics actually pays to go to grad school. The supposed tuition ends up getting covered by the department, and they end up paying you a stipend either for TAing, or for doing research (or both).
In any case, the show isn't trying to be realistic about their careers. According to The Staircase Implementation, they've all been at Caltech since ~5 years before the show started, for a total of something like 10 years now, even though they were in their mid/late 20s in Season 1? When did these people go to grad school? Why are they working in non-tenure jobs at the same university for 10 years?
That's not how academic jobs work. If you're on a research track, you go to grad school, get your PhD, spend ~5 years or so in two different postdoc jobs or so before getting a tenured faculty position somewhere (if you're lucky). You don't spend a full decade at one institution without tenure. Maybe that'll happen in the rare case, but it wouldn't happen for all four of these guys (well.....three, since Howard is in a different situation without a PhD). Why hasn't any of them moved on to another job, or applied for a faculty job by now? It's sort of like Riker on TNG, remaining first officer of the Enterprise for 15 years.
But it doesn't matter. Like I said, they're not trying to be realistic about this stuff, so just it's probably best just to ignore it.