How to calculate the gender pay gap: mean and median, step by step
By the Equaudit team · Updated · 3 min read
The gender pay gap sounds complicated and is not. It is a percentage that compares what women and men earn on average, or at the median, across a whole workforce. This guide shows the formula the EU directive uses, walks through a small example and points out the choices that change your result.
The formula
The directive defines the gender pay gap as the difference between the average pay of female and male workers, expressed as a percentage of the average pay of male workers. The median gap uses the median instead of the average.
The mean is the sum divided by the number of people. The median is the middle value once everyone is lined up from lowest to highest pay, or the average of the two middle values when the count is even. The median is less affected by a few very high salaries, which is why the directive asks for both.
Step 1: convert everyone to hourly pay
To compare full-timers and part-timers fairly, work in gross hourly pay rather than annual pay. Divide gross annual pay by the hours the person is paid for.
| Employee | Gross annual pay | Paid hours per year | Hourly pay |
|---|---|---|---|
| Full-time | €52,000 | 2,080 | €25.00 |
| 60% part-time | €31,200 | 1,248 | €25.00 |
Decide how to treat unpaid leave, overtime and one-off payments, write the decision down and apply it consistently. National rules may specify the reference period and definition of pay.
Step 2: a worked example
Take a tiny company with four women and four men. Hourly pay in euros:
| Hourly pay (sorted) | Mean | Median | |
|---|---|---|---|
| Women | 20.00, 22.00, 25.00, 28.00 | 23.75 | 23.50 |
| Men | 22.00, 26.00, 28.00, 32.00 | 27.00 | 27.00 |
Mean gap: (27.00 − 23.75) ÷ 27.00 = 12.0%. Median gap: (27.00 − 23.50) ÷ 27.00 = 13.0%. Women in this company are paid about 12% less on average and 13% less at the median.
The median women's pay is 23.50 because the two middle values, 22.00 and 25.00, are averaged. The same logic gives 27.00 for men, since 26.00 and 28.00 average to 27.00.
Decisions that change the result
- What counts as pay. The directive covers ordinary basic pay and any other consideration paid directly or indirectly, in cash or in kind. Include variable components consistently. See the bonus and variable pay gap.
- Who is in the population. Define whom you include, such as leavers during the year or workers on long leave, and apply it uniformly.
- How you group jobs. The overall gap is one number, but the directive also looks at gaps within categories of work of equal value. See defining job categories.
- Gender data. The reporting format compares women and men. Make sure your HR system holds this field for everyone and consider how you handle missing or other values with your legal team.
The overall gap is only the start
A single headline number tells you how pay is distributed between women and men across the company, not whether any two people in the same job are paid fairly. A company can have a 15% overall gap and no unequal pay at all if women are concentrated in lower-paid roles, or a 0% overall gap that hides a 10% gap in one department. That is why the directive adds pay quartiles and category-level analysis, and why the 5% rule applies to categories rather than the company total.
To skip the spreadsheet work, upload your payroll CSV to Equaudit and read the indicators in seconds. How it works explains the file format.
Frequently asked questions
What is a good gender pay gap?
There is no universal good number, but the directive treats a gap of 5% or more within a category of workers as the point where you must justify the difference or fix it. Overall gaps are often larger because they reflect the mix of roles.
Should I use the mean or the median?
Report both. The directive asks for both because the mean is sensitive to a few very high salaries, while the median shows the typical worker.
Do I calculate the gap on annual or hourly pay?
Hourly pay is the standard basis because it makes part-time and full-time workers comparable. Check whether your national law specifies the exact definition.