Choosing a university and a subject in which to major are among the most formative (and expensive) investments a young person is likely to make before the age of 20. And while the oft-debated value of a college education can be tough to quantify, a new study by PayScale aims to do just that.

The company's 2014 College Return on Investment study measured the net earnings of college graduates from 1,310 American universities. (Net earnings were defined by PayScale as income garnered during a total of 20 years -- minus what each student could have earned as a high school graduate, the cost of tuition, and the average amount of financial aid awarded by each respective institution.)

By these standards, the university with the best ROI in the nation is Harvey Mudd -- the California college with a heavy focus on science, engineering and math. Graduates can expect a 20-year net return of nearly $1 million.

Related: Tell Us: Is Michigan's 'Free College Tuition' Proposal a Good One?

Harvey Mudd is trailed closely thereafter by similarly elite names with a scientific bent: Caltech, MIT and Stanford.

But which university fares the worst? Shaw University, in Raleigh, N.C., where graduates can expect to be in debt $156,000 in 20 years’ time, according to the study.

PayScale also measured ROI by major, the least potentially lucrative of which is unsurprisingly education, touting -- at most -- a 20-year net ROI of $154,000 at Montclair State University.

And apologies, art history majors, but President Obama may have had a point. The most expensive degree of all is an art diploma from Murray State University in Kentucky, which could set you back $234,000, all told, after 20 years in the workforce.

The most lucrative fields of study will likely come as no surprise to anyone. At the top of the list are computer science and economics degrees from Stanford, which boast eventual returns of $1,557,000 and $1,140,000, respectively.

Related: 3 Ways to Keep College Entrepreneurs' Dreams Alive, Even After Graduation