With rising tuition costs, inflating interest, and a less-than-stellar job market, college degrees have become somewhat of a gamble in recent years, so much so that college attendance has begun to decrease, rather than increase, for the first time in over a decade. But, if you’re looking for a stable, middle-class income, a new study suggests that your best bet these comes from community colleges rather than four-year institutions.

The study by CollegeMeasures.org, a website operated in partnership with the American Institutes for Research and the Matrix Knowledge Group, collated earnings data on graduates of traditional four-year colleges and universities and compared them to graduates who only had associate’s degrees from technical schools and community colleges. Despite the stigma that the latter tends to carry, the study instead found that those with two-year degrees often receive the highest salaries.

“These numbers and the consistency of these numbers are surprising to me,” said Mark Schneider, president of CollegeMeasures.org and a vice president at the American Institutes for Research.

Schneider and his team at CollegeMeasures.org found that graduates of technical and occupational programs made an average of $6,000 a year more than graduates of four-year liberal arts programs. Additionally, these grads were much more likely to receive annual incomes of near $40,000 sooner than their counterparts.

For instance, graduates of two-year nursing programs, which are currently in high demand, earned an average of $45,342, while most graduates with bachelor’s degrees made an average of $36,067. Four-year graduates made $31,184, political science majors earned $31,184, and English majors made just $29,222 a year.

“In the U.S., we’ve tended to think that the bachelor’s degree is the only thing that matters,” Schneider said, “and this data tells us that technical degrees from community colleges are hidden gems.”

Schneider’s findings have been corroborated by other studies as well, such as one conducted by Anthony Carnevale, director of Georgetown’s Center on Education and the Workforce, who noted that while past generations could count on a bachelor’s degree ensuring gainful employment across almost any field, the increased competition for middle-class jobs has significantly altered how a four-year degree is received in the workforce.

“In general, majors that are linked to occupations have better employment prospects than majors focused on general skills,” said Carnevale. “It’s a system in which you can’t just have an ambition to go to college and get a degree. You have to pay attention to the courses and the content of your degree.”

However, Carnevale was quick to point out that these findings do not reflect lifetime earnings, and that while two-year degrees can ensure a stable income much faster, those with four-year degrees continue to out-earn those who have only reached the associate’s level. Still, says Carnevale, graduates of technical programs are quickly becoming far more marketable than those with degrees from humanities and liberal arts programs.

“The degree level matters, but a lot less than it used to,” said Carnevale. “What matters is what you take. Thinking about it as a hierarchy of degrees isn’t the way to think about it anymore.”