Few investments pay off better than a good college degree. But not all degrees are equal. An engineering major will probably earn more than a philosophy major. It’s also a bigger investment.

A new paper estimates how much it costs to educate students in different fields. The economists looked at education costs and future earnings from undergraduates that came through the University of Florida system. They estimate it typically costs the universities more than $62,000 to educate an engineer (including professor salaries, facilities fees, and administrative costs). The price to educate an English or business major is nearly half that. The chart below shows the estimated costs of each degree, listed in order of subject popularity.

Engineering degrees cost about 40% more than the lowest-cost majors; that difference can mostly be attributed to higher personnel costs. Engineering majors also need more expensive indirect resources: advising, administration, financial aid, plant maintenance, library costs, and student services.

Though it costs more to educate an engineer, it pays off, according to the paper—at least, for the student who gets the degree. The chart below shows the earnings of past graduates, up to age 45, (controlling for demographic and institutional factors) minus the cost of each degree. The value of each degree is scaled to show how much it pays off relative to an education major (which is set to zero). For example, a business major can expect to earn $78,000 more (after costs) than an education major by the time they reach age 45.

At most universities, people pay the same tuition no matter what they study—and what students pay in tuition is less than what the university spend to educate them, no matter what they study. But universities spend different amounts on different degrees, and english and philosophy majors demand fewer resources—which means they essentially subsidize engineers.

From a life-time income perspective, philosophy majors subsidizing engineers is regressive. Since college is already financially crippling for many families, perhaps charging tuition that is adjusted to the potential value of each major would be more fair. It could be argued this type of pricing would make students more aware of the value of their degree. Engineering is the most profitable major, but it’s not very popular. That may be, in part, because tuition isn’t set based on what you study so price does not signal the value of different degrees. Degree-specific pricing is one way to convey value to students.

Of course, many students don’t pick a degree based on earnings potential. Charging by degree would change the nature of a college education. College in America is not intended to be vocational training; it’s also an opportunity to get exposure to different ideas and try different fields.

Then there’s the concern that if engineering classes cost more, low-income students would be discouraged from pursuing the major. This would undermine economic mobility: STEM (science, technology, engineering, and math) courses are generally more expensive to teach and they also have higher dropout rates—so upping the price tag increases the risk associated with taking a STEM class.

The study also found that university spending on high-return fields, like engineering, fell from 1999 to 2013. The University of Florida system put comparatively more resources in low-return fields like biology. It may be responding to student demand or trying to shift resources away from more expensive subjects. This makes economic sense for the university, but could be impacting its students’ earning potential: engineering classes cost more, and it’s the student who reaps the benefits, not the university (at least directly—there may be indirect benefits if higher earners become large donors or improve university rankings).

There is a case for subsidizing STEM education, but if universities don’t share in the payoff from their investments they (and English majors), may not continue to do so for long. A better alternative could be increasing government subsidies earmarked for STEM education and financing with income taxes, some of paid, inevitably, by high-earning engineers.