While the gender pay gap has halved to 5% for millennials, women in their 30s and 40s continue to face a rise in pay inequality, according to new research by the Resolution Foundation.

According to data published by the think-tank, the discrepancy in average hourly pay between men and women has almost halved during the past generation. However, the data also shows women entering work now will still earn significantly less than their male counterparts over their careers, particularly among women who choose to have children.

At first glance, the gender pay gap appears to be about women being paid less than men for the same job – but this is not entirely the case. Although illegal gender discrimination most likely plays a part in the pay gap, it is not the only factor.

So why is the gender pay gap so complicated?

The gender pay gap depends on age

The Resolution Foundation research shows young men and women in Britain begin their first decade of employment on almost an even footing in terms of pay.

For millennials – those born in the last two decades of the 20th century – in their 20s, the gender pay gap now stands at 5%, a figure which has halved over the last generation. For Generation X, people born between 1966 and 1980, there is a 9% difference.

The pay gap is compounded further by the motherhood penalty. Women who have children tend to do so in their 30s, which along with the rising costs of childcare and a lack of well-paid flexible working, can widen the gender pay gap.

Gender pay gap
The gender pay gap depends on several factors iStock

"The gender pay gap grows over women's working lives, particularly impacted by the point when women have children. But it is misleading to think we've cracked it for young women," says Sam Smethers, chief executive of the Fawcett Society.

"The proportion of women in the workforce who are graduate educated overtook men in the mid-90s, so if anything the pay gap should be much smaller. Millennial women overall are earning more relative to men than previous cohorts of younger women because more of them are graduates. But the gap soon opens up."

Furthermore, the Institute for Fiscal Studies research shows very limited progress in the gender pay gap among graduates over the last two decades.

Pregnant woman
Without flexible and secure work, women pay the price of motherhood penalty iStock

It depends on whether you work part-time

Part-time work, which typically has lower hourly rates than full-time work, is chiefly undertaken by women and has a big impact on the gender pay gap. Around 41% of women work part time, compared to 12% of men, partly because of a lack of widely-available, flexible working in full-time jobs, often because they take on the majority of unpaid care for children or relatives.

According to research from the Institute of Fiscal Studies found women on average earn around 10% less at the point they have their first child, a gap which widens to one-third by the time the child is 12.

Although shared parental leave was introduced in April 2015, the majority of new fathers are not taking advantage of it. Figures obtained by the law firm EMW via a Freedom of Information request found just 3,000 new parents – around 4% of new eligible couples – claimed shared parental leave in the first quarter of 2016.

Without secure and better-paid part-time work, compressed hours, job shares and the ability to work from home, women risk being trapped in lower-paid jobs that do not make the most of their skills.

It depends on the kind of work you do

Women tend to go into professions or jobs that are less valued or not paid as well as they should be, many of which relate to the traditional family role of women – such as caring, catering and nursing.

Male-dominated sectors, such as science, technology, engineering and mathematics (STEM) professions, in comparison, are much better valued and paid – so occupational segregation remains a big problem.

Research published by the accountancy firm Deloitte in September 2016 found women earn an average of 8% less in graduate starting salaries than their male counterparts across all STEM subjects combined.

Using ONS data, Deloitte found women in a graduate starting salary in healthcare earned an average of £24,000, compared to £28,000 for men.