Is a four-year college degree worth it? Generally yes, but the results vary quite a bit across majors — and can even vary widely within majors.

That’s the takeaway from new research by Brad Hershbein and Melissa Kearney at The Hamilton Project. The authors analyzed Census Bureau data to find out which college majors earned the most and the least. Topping the list are the engineering fields, to no one’s surprise. Some of the least-earning majors are related to education, theater and art. Over a lifetime, the median expected earnings for a drama or theater arts major is lower than that of someone with a two-year associate’s degree.

But the report found that regardless of major, “median earnings of bachelor’s degree graduates are higher than median earnings of high school graduates for all 80 majors studied. This is true at career entry, mid-career and end of career,” the authors write.

“College degrees may not be a guarantee of higher income, but they come closer than just about any other investment one can make,” they add.

Early childhood education majors had the lowest median earnings, but still higher than the median earnings for people with only a high school degree. The researchers estimate that even when college costs are taken into account, the median early childhood education major still makes 10 percent to 15 percent more than the median American with just a high school degree.

This is the full chart of majors ranked by median lifetime earnings:

One thing to keep in mind is that these rankings exclude people with graduate degrees, which leaves out doctors, lawyers, and professors. This explains the somewhat low spot occupied by political science and government majors, a good chunk of whom go on to law school. If those students are taken into account, they tug the median earnings for the major above the median earnings for, say, architecture or nursing.

In this interactive from the Hamilton Project, which allows you compare up to four majors, you can include or exclude people with graduate degrees. The top chart shows what a median person makes in a year over the course of his or her career.

The researchers point out that for some majors, like those involved with primary education, annual earnings peak early in a career. Other majors see continuous growth, drama and earth science being two examples. “There is a remarkable pattern in the data: Initially low-earning majors tend to see the fastest earnings growth in early career, while initially high-earnings majors tend to see the slowest earnings growth,” the researchers write.

The bottom chart in the interactive is even more interesting. So far we have been talking about people at the median, or the 50th percentile of the earnings distribution. But what about everyone else? People in the same major don’t all make the same amount of money.

Some majors are particularly unequal. For instance, lifetime earnings at the 90th percentile of economics majors are 2.9 times those at the median. The wide spread indicates the diversity of jobs that economics majors fill — from public policy to finance. In contrast, for elementary education majors, earnings at the 90th percentile are only 1.6 times earnings at the median.

The range of earnings within each major is wide — about as wide as the spread we saw above in the charts comparing median earners in different majors. Put another way, a person at the 90th percentile for childhood education majors will quite handily outearn someone at the 10th percentile of computer engineering majors. In fact, at the 90th percentile, people with only a high school degree outearn any college majors at the 10th percentile.

The real message in these data is your college major is not your destiny. It takes some amount of grit to make it anywhere. Smart choices about which skills to acquire will get you some, but not all, of the way there.