Undecided about what to major in at college? Maybe this will help. Bankrate.com ranked 162 majors based on several factors including median annual income, unemployment rate and the percentage of people who went on to achieve a masters, doctorate or another advanced degree.

Data analyst Adrian Garcia said naval architecture and marine engineering is the most valuable college major. These are the people who work on ships and international trade.

He said this major earns a hefty median annual salary of $90,000 along with a low unemployment rate of 1.6% among graduates. The percentage of higher degree holders in the field (29%) is also the lowest of the top five, meaning naval architecture and marine engineering grads are less likely to incur the added expense of an advanced degree.

Garcia said overall, STEM degrees, particularly engineering, dominate the top of the ranks. The second most valuable college major is nuclear engineering followed by pharmaceutical sciences, genetics and electrical engineering — which pay more but have higher unemployment than naval architecture and marine engineering.

Mathematics and computer science is tied for the second-highest median income ($99,000) but it fails to crack the top 20 most valuable majors due to its 4.5% unemployment rate among graduates.

On the flip side, drama and theater arts is the least valuable college major. Garcia says those with this degree earn the fourth lowest median annual salary of $35,500 and face a high unemployment rate at 5.2%. Also, 26% of drama and theater arts degree holders have invested in an advanced degree.

Other majors in the bottom five are arts degrees. The second least-valuable college degree is visual and performing arts, followed by composition and rhetoric, linguistics and comparative language and literature and fine arts.

"Choosing a college major is a personal balancing act between passion, earning potential and job opportunities," said Garcia.