She's at least 9.4% behind those other guys. T.J. Kirkpatrick/Getty Images The recruitment consultancy Robert Half decided to get some early PR out of International Women's Day this Tuesday. It published an analysis of salary rates in the UK for men and women concluding that women will earn £298,064 ($422,267) less than men over their lifetimes, a gender pay gap of 24%.

The press release has already been written up by the Evening Standard, The Guardian, and here at Business Insider.

The problem with this statistic is that ... it's rubbish.

The gender pay gap in the UK is just 9.4% and getting smaller every year, according to the Office for National Statistics, which does an annual survey of men's and women's wage rates specifically to monitor discriminatory pay.

And yet, the media persistently reports that women earn 20% or 30% less than men. The BBC made this exact claim as recently as February.

The Robert Half press release is somewhat misleading because it is written as if the company generated its own salary data independently. In fact, Robert Half's expert did an "analysis" only of existing data, and a footnote at the very bottom of the release says the data came from the ONS.

The ONS' data is excellent because it answers the central question that plagues the debate on pay: Do women earn less because they are discriminated against? Or are there other factors that make it appear that way?

The data drills down into hourly wages, without counting overtime (men tend to work more OT). Overall, the pay gap is only 9.4%. But the gap varies over your lifetime, and in some periods — until you're aged 30 — women can earn 6.5% more than men.

"For part-time employees separately, women are paid more on average, resulting in a 'negative' gender pay gap," the ONS says. "Although the trend is more volatile than for full-time employees, there is evidence that the gap [in favour of women] has widened in the long term. It has remained relatively stable in recent years, although it increased from 5.5% in April 2014 to 6.5% in April 2015."

Here is what that looks like in a chart:

In the chart above, whenever the columns are at zero or dip below it, men and women are receiving equal pay or women are being paid more. "When looking at the differences for full-time employees, the gap is relatively small up to and including those aged 30 to 39 (with the exception of the 16 to 17 age group)," the ONS says. "In fact, in the 22 to 29 age group, women are paid on average slightly more than men."

The obvious trend in the chart is that once you hit your 30s, men start getting paid more. "From 40 upwards, the gap is much wider, with men being paid substantially more on average than women," the ONS says. The main reason: "This is likely to be connected with the fact that women who have children often take time out of the labour market."

It's not just that having kids hurts your earnings in later life, either. It's the work you choose to do, the ONS says. "It should be noted that the figures do not show differences in rates of pay for comparable jobs, as they are affected by factors such as the proportion of men and women in different occupations. For example, a higher proportion of women work in occupations such as administration and caring, that tend to offer lower salaries."

The overall point here is that yes, men do earn more than women. A lot more: Men get an average of £567 a week in Britain compared with £471 for women. That is, actually, a 20% pay gap. But men get that extra money because they don't work part time as much, because they work more overtime, because they don't take time off to have children, and because they tend not to work lower-paid jobs as much as women do.

But the good news is that the pay gap is getting smaller (in 2014 it was the smallest since records began). And the majority of the pay gap is not caused by sexist rates of pay. It's caused by taking time off to have children, and by going into less lucrative careers.

That last point ought to be especially important if you're a woman in your early 20s. Look at the chart above — the career choice you make now will be much more financially significant than the 9.4% discrimination penalty, especially when you hit your 40s.

Obviously, there is a debate to be had about whether we value child-raising fairly. Only women can get pregnant, and the number of men willing to put their careers on hold while their female partners go back to work is vanishingly small. And the men in some industries — software coding for instance — are objectively hostile to successful women (according to this excellent blind test of Github programmers).

Women take a significant pay hit when they have children because, typically, they take unpaid time out of the workforce and men tend not to. When they return to work, sometimes after a break of years, they are "behind" on their careers — and there is a financial penalty for that. Worse, this "lag" effect comes at a period when people hit their earnings peak: their late 30s and 40s. This is when workers can expect to enter the ranks of management. Men who have not given up work to raise kids are "ahead" of women as they enter this age bracket, and the losses women suffer because of that break become financially substantial. That is why the gender pay gap increases as we age.

So, if you want to fix the gender pay gap you need to fix childcare — by providing free childcare at work, for instance — so that women aren't doing most of it unpaid.