Whether it’s the result of political pressure or wanting to stay ahead of progressive trends, a number of larger companies are conducting internal audits to investigate whether they could be accused of having a so-called pay gap between men and women.

Google conducts such an audit every year, and this year produced a surprising result. According to The New York Times, Google’s analysis found that more men than women were being underpaid.

As a result, Google will award $9.7 million out of a compensation fund, the majority of it going to men. The fund was established to remedy compensation gaps revealed by the annual study.

The study’s results conflict sharply with analysis conducted by the Labor Department, which is currently investigating the tech giant. Janet Herold, regional solicitor for the Labor Department, said her department’s analysis at this point indicates discrimination against women, and that this discrimination is “quite extreme.”

The Labor Department is also suing Google to force it to hand over data that Google believes reveals confidential information and violated employees’ privacy.

Google is also facing an employee-led effort that claims the company significantly underpays women compared to men.

So who’s right? Google, its employees, or the government?

Well, it depends on how you measure pay between groups.

Across the U.S., broad-based pay comparisons show that women make 20 cents less on the dollar than men. But after accounting for important factors such as one’s education, hours spent at work, occupation, and experience, the gap drops to between 3 and 5 cents. And even that doesn’t account for harder-to-measure factors.

The government has little insight into the day-to-day operations of Google and has to rely on limited and abstract data, such as job title, pay, gender, and race. This means government reports are less likely to paint an accurate picture of employee pay according to work performed.

And how about the employee-led effort? It only included self-reported pay data from 2 percent of Google’s global workforce and was divided across six broad pay levels.

Clearly, the government’s analysis, as well as the employee-led effort, are lacking. They essentially assume that all employees with the same job title perform identical jobs, when in fact that is not the case.

Google is not a 1950 assembly line where all employees clock in at 9 a.m., produce 50 widgets, and then clock out at 5 p.m. It is a diverse and complex company in which job titles may say little about the work an employee does.

While the government and employee-led studies are limited, Google itself performed a more detailed analysis. After all, the company knows a thing or two about analyzing data.

Google presumably included important factors in its analysis that affect pay, such as years of experience, education, hours, and some measure of performance.

Even so, this did not create a true apples-to-apples comparison.

Nor could it. In today’s day and age, with more flexible job schedules, highly diversified job functions (even within a given title), and broad compensation packages, very few jobs are truly identical. 

The problem with top-down government controls that attempt to equalize pay across gender or race is that those policies could end up hurting the people they intend to help.

For starters, policies like the Paycheck Fairness Act threaten to take away decades of gains women have made in the labor market by eliminating more flexible arrangements, and instead imposing one-size-fits-all jobs, schedules, and compensation packages that may not actually fit women’s needs and desires.

Moreover, expensive lawsuits encouraged by such legislation would likely cause employers to discriminate against women in the hiring process—thus protecting themselves against potential gender-based discrimination lawsuits.

At the end of the day, most workers—men and women alike—want to be paid based on what they produce. That’s not possible with government-imposed pay scales.

Instead of telling companies how much to pay their workers, and limiting the types of jobs available to women (and men), lawmakers should work to reduce barriers and burdens for job creators and support women in the choices they make for themselves.