Which colleges have the best return on investment?

The value of a college education can be determined by many intangible factors: knowledge gained, opportunities seized and connections made. So can you really place a price on what you gained during your college years?

Well, PayScale has. The compensation information company ranked hundreds of U.S. colleges and universities on their total cost and alumni earnings. It calculated a 20-year return on investment by estimating what graduates will earn over two decades of work, minus what they would have earned as a high school graduate and the cost of college.

Read More529 balances are growing, but so are college costs

"With student loan debt over $1 trillion, we are surprised more parents and students aren't taking a closer look at the financial aspects of college education," said Lydia Frank, PayScale's editorial director.

PayScale 2014 College ROI Chart

Ranking
School Name
School Type
20-year ROI
Annualized ROI
1 Harvey Mudd College Private not-for-profit $985,300 8.70%
2 California Institute of Technology Private not-for-profit $901,400 8.60%
3 Stevens Institute of Technology Private not-for-profit $841,000 8.10%
4 Colorado School of Mines Public (in-state tuition) $831,000 11.40%
5 Babson College Private not-for-profit $812,800 8.00%
6 Stanford University Private not-for-profit $809,700 7.90%
7 Massachusetts Institute of Technology Private not-for-profit $798,500 8.00%
8 Georgia Institute of Technology Public (in-state tuition) $796,300 12.50%
9 Princeton University Private not-for-profit $795,700 8.20%
10 Colorado School of Mines Public (Out-of-state tuition) $771,000 9.10%
Source: PayScale

Colleges that specialize in engineering dominated the list. The top three schools overall for college return on investment are Harvey Mudd College, Caltech and Stevens Institute of Technology. When you considered financial assistance to students, Stanford comes in third on the list. You can play with PayScale's ranking here.

Not surprisingly, PayScale found that alums who majored in engineering, computer science and math or who ended up working in business and finance have the best chance of seeing a 20-year return on investment of more than $1 million for their education.

Read MoreHow not to drown in student loan debt

A college education pays dividends, but perhaps not as good as the overall stock market. Only 24 percent of schools included in PayScale's ranking have a 20-year annualized return on investment higher than the S&P 500's annualized 7.8 percent from 1994 to 2014.