Want college to pay off? These are the 50 majors with the highest earnings.

A “Jobs” banner hangs outside the U.S. Chamber of Commerce in Washington, D.C., in this file photo from January 2014. (Photo by Andrew Harrer/Bloomberg)

Engineering and technology are among the most challenging fields of study in college, but all of that hard work apparently is paying off, as many of the top-earning entry-level jobs are tied to related majors, according to a Glassdoor study released Monday.

The job search engine analyzed more than 500,000 resumes and self-reported salaries to determine which majors pay the most during the first five years after graduation. Eight of the 10 most-bankable majors are tied to engineering or technology, such as computer science, electrical engineering and information technology. Nearly half of the majors listed are in science, technology, engineering and math (STEM) fields, though business-related majors, such as accounting and marketing, crack the top half of the 50 majors listed.

The analysis is consistent with previous studies that show employers place a premium on graduates in STEM fields. Researchers at the Georgetown University Center on Education and the Workforce found that the top 25 percent of earners with education degrees can expect to make as much as the bottom 25 percent of people with engineering degrees, even mid-career. An advanced degree will improve an educator’s prospects, but not enough to narrow the wage gap with engineers, the study said.

Having a bachelor’s degree of any kind from a reputable school gives young workers a better chance in a job market that increasingly demands a college education. Four-year college graduates now comprise a larger share of the workforce than people with just a high school diploma, according to another Georgetown study. Researchers at the Hamilton Project say median earnings of those who have a bachelor’s degree are higher than median earnings of high school graduates, regardless of the college major.