Peak AppsTools

Mean, median and quartile pay bands

The gender pay gap formula, worked through

Every statutory gender pay gap, in the UK, in Ireland and under the EU directive, uses the same formula. Below it is applied to ten employees, step by step, so you can check your own figures by hand or in a spreadsheet.

The formula

gap = (A − B) ÷ A × 100

A is the figure for men and B the figure for women: the mean hourly pay of each, the median hourly pay, or the mean or median bonus. The gap is a percentage of men’s pay. A positive gap means men are paid more; a negative gap means women are. It is written into the UK Regulations (SI 2017/172, regulations 8 to 11), the Irish Regulations (S.I. No. 264 of 2022, regulations 7 to 9) and, in words, the EU directive (Article 3(1)(c) and (e)).

Ten employees

Hourly pay already worked out, ranked from lowest to highest. Four are men and six are women.

RankEmployeeSexHourly payQuartile band
1E01Female£11.20Lower
2E02Male£12.00Lower
3E03Female£12.00Lower
4E04Female£13.10Lower middle
5E05Male£14.50Lower middle
6E06Female£15.75Upper middle
7E07Female£18.00Upper middle
8E08Female£19.45Upper middle
9E09Male£24.00Upper
10E10Male£31.50Upper

Mean gap

Men: (12.00 + 14.50 + 24.00 + 31.50) ÷ 4 = £20.50. Women: (11.20 + 12.00 + 13.10 + 15.75 + 18.00 + 19.45) ÷ 6 = £89.50 ÷ 6 = £14.9167.

(20.50 − 14.9167) ÷ 20.50 × 100 = 27.2%

Median gap

The median is the middle value; with an even count it is the mean of the two middle values. Men, in order: 12.00, 14.50, 24.00, 31.50, so (14.50 + 24.00) ÷ 2 = £19.25. Women: 11.20, 12.00, 13.10, 15.75, 18.00, 19.45, so (13.10 + 15.75) ÷ 2 = £14.425.

(19.25 − 14.425) ÷ 19.25 × 100 = 25.1%

Work from the unrounded averages and round only the result. Rounding the women’s mean to £14.92 first would still give 27.2% here, but it can move the last digit in other cases.

Quartile pay bands

Rank everyone and split them into four bands as equal as possible. Ten does not divide by four, so two people are left over. The GOV.UK guidance puts one left over in the lower band; two in the lower and upper middle bands; three in the lower, lower middle and upper middle bands. Ten people make bands of 3, 2, 3 and 2:

BandPeopleMenWomen
UpperE09, E10100.0%0.0%
Upper middleE06, E07, E080.0%100.0%
Lower middleE04, E0550.0%50.0%
LowerE01, E02, E0333.3%66.7%

People on the same pay. E02 and E03 both earn £12.00 and sit in the same band, so nothing changes. When a group on the same rate straddles a dividing line, each band must hold the same mix of men and women from that group, as far as possible (UK regulation 13(2); Irish regulation 10(3)). The GOV.UK example: 40 employees on the same pay, 36 women and 4 men, with 10 falling in the lower band and 30 in the lower middle band. The lower band takes 9 women and 1 man, the lower middle band 27 women and 3 men.

The Irish Regulations and the EU directive ask for four equal groups but do not say where a remainder goes; the calculator applies the GOV.UK method to all three.

Bonus figures

Bonus gaps use the same formula on the bonuses of the people who were paid one. Say two of the four men were paid bonuses of £500 and £1,500, and three of the six women £400, £900 and £1,200.

  • Mean: men (500 + 1,500) ÷ 2 = £1,000; women (400 + 900 + 1,200) ÷ 3 = £833.33; gap 16.7%.
  • Median: men (500 + 1,500) ÷ 2 = £1,000; women £900; gap 10.0%.
  • Paid a bonus: men 2 of 4 = 50.0%; women 3 of 6 = 50.0%. Here the divisor is everyone, not only those paid.

In a spreadsheet

With sex in column B (M or F) and hourly pay in column C, rows 2 to 11:

FigureFormula
Mean for men=AVERAGEIF(B2:B11,"M",C2:C11)
Median for men=MEDIAN(IF(B2:B11="M",C2:C11))
Gap, with men in F2 and women in F3=(F2-F3)/F2*100

In older versions of Excel confirm the median formula with Ctrl+Shift+Enter; in Google Sheets wrap it in ARRAYFORMULA. Quartile bands with ties are where spreadsheets usually go wrong, because the mixing rule is not a single formula.

Unadjusted and adjusted gaps

The statutory figures are unadjusted: they compare all the men with all the women in the organisation, whatever their job, hours or length of service. That is the point of them: a gap often reflects how men and women are spread across jobs and pay levels, which the quartile figures show.

An adjusted gap tries to compare like with like. It is usually estimated with a regression of pay on factors such as job level, hours, tenure and location, and reports the difference left once those are accounted for. No statutory report in the UK or Ireland asks for one, there is no single method, and the result depends on which factors are included. The calculator does not produce an adjusted gap.

Indicator (g) of the EU directive is a step in that direction: it compares men and women within each category of workers doing the same work or work of equal value. Within each category it is still the same unadjusted formula. None of these figures is the same as equal pay, which is the legal right to equal pay for equal work or work of equal value.

Sources: SI 2017/172, regulations 8 to 13; GOV.UK, Making your calculations (updated 21 May 2026); S.I. No. 264 of 2022, regulations 7 to 10; Directive (EU) 2023/970, Articles 3 and 9. Last checked 8 October 2026. The worked example is also a test case the calculator is checked against.

More on pay gap reporting