If you’re considering pursuing an advanced degree after college, watch out: Not all graduate degrees are created equal. While it’s important to follow your passions, some degrees are more likely than others to provide you with stable, lucrative career opportunities. 

Fortune commissioned PayScale to crunch the numbers on which graduate degrees (both M.A.s and Ph.D.s) were the least and most useful, based on four factors: long-term potential for job growth, median pay at mid-career or 10 years experience, job satisfaction, and stress levels. Most of the available research about the relative benefits and drawbacks of different degree programs focus on individual details like income potential or job availability. PayScale attempted a more holistic approach, weighing quantitative details like income against qualitative characteristics like overall job satisfaction.

Overall, they found that STEM degrees were the most useful, with graduates by-and-large finding high-paying, low stress jobs. Degrees in fields like biostatistics, computer science, and economics topped Fortune's list, while arts, divinity, and education degrees were on the bottom. While a master’s in biostatistics is associated with a median salary of $105,900, according to PayScale, a master’s in early childhood education will make you a mere $48,700. 

However, it’s important to note that while the degree holders on the bottom of the PayScale list consistently made less and often noted higher stress levels, many also said their jobs offered extremely high levels of satisfaction. For instance, 83 percent of those with master’s degrees in early childhood education were highly satisfied with their jobs, as were 87 percent of those with a master’s in reading and literacy, and a full 95 percent of those with a degree in pastoral ministry.

Additionally, as Fortune notes, graduate school can be an expensive endeavor. So while comparing degree programs, before you send in your application, also consider whether the cost is worth it. Check out the five most and least useful graduate degrees below, and view the full list with all the stats on Fortune.

Most Useful:

M.A., Biostatistics
M.A., Statistics
Ph.D., Computer Science
Ph.D., Economics
M.A., Applied Mathematics

Least Useful:

Master of Fine Arts (MFA)
M.A., Early Childhood Education
Master of Divinity (MDiv) tied with M.A., Elementary Education
M.A., Reading and Literacy
M.A., Theology

[h/t Fortune]