The cost of graduate studies in science is really MINIMAL. Many PhD graduate students have a fellowship: their tuition paid by the university and some even given a small stipend and subsidized housing – so they can squeak by without paying a penny. Others had to take a research or teaching assistanthip in the univeristy to cover the tuition and stipend, something very doable. That’s what I and my friends who got PhDs in physics, engineering, biology did. BTW, my husband and I, both PhDs, didn’t have any student debt.
Of course, there are costs of missed opportunities of investment, like savings for retirement, etc.