Want to earn more? That means you need to get a raise or promotion at your current job, or go out and find a new one with that same end in mind. But the extent to which worker’s wages in the United States increase from doing so is not equal, even for those with similar levels of education. Namely, women earn less than their male counterparts even at the beginning of their career, and that gap only widens over a lifetime.

But where is this gap coming from? Is it because men are more likely to get promoted or secure higher raises? Or do men go out and find new jobs at a higher rate, and secure better salaries when they do? New research by Erling Barth of Norway’s Institute for Social Research, Sari Pekkala Kerr of Wellesley College, and Claudia Olivetti of Boston College tries to unpack just where the gender wage gap is emerging. They find that there is no single answer, and that instead it depends on age, education, and marital status.

For workers with a college education, gender-based gaps in pay are primarily caused by disparities that emerge within a single workplace. In other words, men get raises and promotions at a significantly higher rate than their female colleagues do. Some of these results may be due to younger women having greater family responsibilities, which in turn may limit how much time or effort that can put into paid employment. Research demonstrates how working long hours—even without a proportional rise in actual output—can result in disproportionate economic rewards. Harvard University economist Claudia Goldin calls this “the last chapter” in attaining gender equality.

But other research shows that, even after accounting for experience and hours worked, women still face pay disparities compared to their male colleagues. Of course, pay secrecy policies common in many workplaces leave women in the dark about these salary differences, which makes it impossible for them to address any potential discrimination. A difference in men and women’s tendency to negotiate also doesn’t fully explain what’s going on. While women may be more reluctant to negotiate, that’s partly due to the fact that it doesn’t go as well for them when they do.

Barth, Kerr, and Olivetti find there is a smaller widening in pay over their lifetimes for men and women who are not college-educated—and this is not primarily driven by the disparities that emerge within a single workplace. Instead, the widening pay gap for non-college workers largely derives from differences between men and women in where they work and their “job mobility,” or how often workers change jobs, and the kinds of pay increases they get when they do.  If you leave one job to take a more-advanced position somewhere else, then that could result in higher earnings. Alternatively, if leaving one’s job is due to a layoff or for personal reasons (to raise children or take care of an elderly parent, for instance), then a worker’s earnings tend to go down.

The three researchers also find that job mobility and the subsequent differences in pay that arise are a factor in the widening gender gap for college-educated workers as well, but to a lesser extent. But, interestingly, the authors find that regardless of the education level, it is marital status, rather than gender, that is more of a defining factor in this realm. The researchers say that “these results suggest that among married couples, the household division of labor tend to limit women’s career choices with respect to job-to-job changes and this is an important determinant of the widening of the gender earnings gap, especially for college educated women who are more likely to be in occupations with steep age-earnings profiles.”

Whether the gender wage gap comes from climbing the career ladder at a single company, or the extent to which women benefit from switching jobs, one thing is clear: Both may require investments in time that go above and beyond what is necessary to do a good job. Of course, these are issues that affect all workers, but women still tend to take on a disproportionate amount of unpaid work compared to men, which means they are the ones more likely to cut back, especially given the absence of work-life policies that other countries have. Discrimination also plays a role, which speaks to the fact that there is no single answer or policy solution that can combat the many ways women are disadvantaged depending on their race, education level, marital status, age, and whether or not they have children.