With the cost of college rising each year and questionable career prospects awaiting college graduates, some people are wondering if a college education is still worth it. If you took all of the money you would spend on a college degree and invested it, would you come out ahead?

The Best Schools for Return on Investment

The value of a college degree can be hard to quantify. In addition to the tangible value of your future income, there are many intangible benefits such as learning independence, improved social skills, and general skills such as working with teams, developing good working habits and much more. Because those skills do not have a dollar value, let us examine the numbers we can quantify.

A 2015 study by PayScale, a popular career website, found that not all degrees and colleges are created equally. All calculations below assume no financial aid and on-campus housing.

If we look at specific universities, the ROI for a college degree is a compelling investment. In a tie for best ROI, Brigham Young University (BYU) and Georgia Institute of Technology (Georgia Tech) offer an average 12.5% annual return on investment on a typical four-year, in-state tuition cost of $77,300 and $86,700, respectively.

If we look at the total income graduates can expect rather than the percent return, the results are a bit different. Georgia Tech falls down to eighth place and BYU is not even in the top 15. The top schools for 20-year net ROI (career income less college costs) puts Harvey Mudd College in first place with an expected return of $985,300. California Institute of Technology (Cal Tech) comes in second with an expected 20-year net ROI of $901,400.

Remember, these are the best case scenarios. Other schools, including Ivy League heavyweights Harvard and Yale, do not reach the top spots thanks to a high cost of attendance. The median annualized ROI for all schools comes in around 6% for public schools and 4% for private schools. (See also, College Loans: Private Vs. Federal.)

The Best Majors for Return on Investment

Of course, looking at the ROI of a college degree by school has some flaws. An art major will have very different career prospects from an engineering major.

For a humanities major, the best option is Brigham Young University, with a 9.8% ROI. A business major at the same school can expect a 12.4% ROI, a full 2.6% better. An engineering major at BYU averages a 14% ROI. Computer science and math majors fare similarly at 14.4%.

Of course, that is just looking at one school with a very targeted student population, and one that is consistently at the top of the list. The average for other schools can be quite a bit lower.

Benchmark Investments

Now that we know the 20-year ROI of top degrees from some top schools, let’s take a look at how those same dollars invested would have compared to financial investments.

The safest investment in general for most retail investors is a United States Treasury Bond. Because these investments are so safe, the return paid by the U.S. government is very low. Over the last 20 years, this would have resulted in a 2.5% ROI. Compared to the average college degree, an education would fare much better, yielding about double.

Other investments that fared similarly to a college degree are investments in Ford (F) with a 4.9% ROI, Bank of America (BAC) with a 5.3% ROI and gold with a 6% ROI.

Some stellar investments beat a college degree investment several times over. An investment in Apple (AAPL) stock in 1995 returned 24.8% over the last 20 years, while Microsoft (MSFT) returned 15.2%.

The benchmark for the market return is the S&P 500 index. Over the same period, the S&P 500 returned 7.8%. that return is higher than the average degree, but far from matching the ROI from the top degrees at the best schools. (For more, see: Are U.S. Colleges Still A Good Investment?)

Understand Your Personal ROI on a College Degree

No college experience or career is exactly the same, so your best bet is to estimate your own ROI based on the school and degree of your choice.

I earned a business degree from the University of Colorado at Boulder. The typical ROI for that specific degree is 8.2%, better than the S&P 500 and a safe investment. However, that number does not tell my whole story.

After earning a bachelor’s degree at CU, I went on to earn an MBA from the University of Denver. That private school MBA cost about 33% more than my in-state cost of attendance at CU. While some people might argue that I had a better use for $90,000, I was debt free two years later and my income has had several large jumps, which I attribute to my MBA.

Right after graduating from my MBA program, I found a new job that would never have happened without the networking I did at school. It brought me a modest $5,000 raise, but over 20 years that covers my entire cost of attendance plus an extra $10,000. Any raise over that increases my ROI. Three years later, I received a 40% raise when I accepted a job that I would not have been competitive for without the MBA. If I stay at the same salary as today and never get another raise, that is an 889% ROI on my MBA.

Of course, my results are better than some and worse than some. Your results will vary.

The Bottom Line

While we all want to be like Warren Buffet and beat the S&P for nearly our entire career, Buffett is not average. You can safely invest in the S&P 500 and bring in a steady return, but your growth potential is fairly limited.

Your career, if you are like most people, is going to be your primary income source for most of your life. A college degree does increase income and lower the chances of unemployment, both valuable factors to consider when weighing a college degree against a market investment.

If you’ve made it this far, you know that all degrees are not created equally. If you go to a quality school and earn a business, engineering or computer science degree, you will beat the market. And, if you work hard and do well, your income will continue to increase. A college degree may not beat the market on its own, but coupled with hard work, your return on investment has unlimited potential.