Tuition has tripled at four-year private colleges and nearly quadrupled at four-year public college over the last 30 years. Student loan debt is at an all-time high of $1.2 trillion and about 40 million Americans have at least one student loan, up from just 28 million in 2008.

Startling numbers, sure. But according to a report from the San Francisco Federal Reserve, it still very much pays to go to college. Here's why: You can expect to earn about $20,300 a year more when you earn a degree. That's been the average over the past 40 years. The exact premium of a college education has varied over time-- at its lowest point in 1980, it was about $15,750 a year-- but according to the report, college graduates always earn more.

“As economists, we pride ourselves on the fact that we want to look at the data,” John Williams, president of the San Francisco Federal Reserve, tells Yahoo Finance in the accompanying video. "We don’t have a bias one way or another. We just want to do the analysis.” And Williams says that analysis strongly points to the value of a college degree.

Rising tuition can scare parents and prospective students. Last year, tuition at public universities in the U.S. rose 2.9% for in-state students and 3.3% for out-of-state students. At private universities, that figure rose 3.7%, according to The College Board.

But college is an investment, Williams points out. Assuming a typical four-year public college tuition, it takes about “nine or ten years to pay back on that investment,” says Williams. “Then after that, it’s all gravy,” he says.

For four years of private college, Williams says, it would take a little longer-- about 17 years-- to pay it back. But, he says, “through your 40s and 50s and through the rest of your career, all that extra money is extra return on that.”

What's more, Williams says a college degree is the key to upward mobility. “When you look at families that start with lower amounts of...household income -- in the lower half of the distribution -- college is really the stepping stone in terms of economic and social mobility,” he says. “It really lets people go from starting out with very little financial resources and ending up with being in the upper quarter of income.” Getting a college degree is also important to those born in the upper quarter of income to stay there, according to the Fed.

The bottom line —no matter your income level -- is stay in school and get a degree, according to Williams.

“For kind of all these things that we view as the 'American Dream,' one of the things that is clear in the data is that going to college-- whether you start out at a lower income family or a high income family-- this is the way at least on the financial side basically to maximize your chances,” he says.

More from Yahoo Finance

This year's college grads are psyched about their job prospects

How to pick the right college: Tips from a university president

Parents can spy on teens' smartphones, but should they?