Why a pay-gap cost calculator should make zero network calls
I maintain a small open-source calculator that prices what it costs to close an unexplained gender pay gap under the EU Pay Transparency Directive (2023/970). You give it a CSV of employees (salary, gender, grade, tenure, category), and it prices two options: minimum compliance and full equalisation. It ships as a static HTML page and, separately, as an Excel workbook with the same calculation in…
I have created an open-source calculator that estimates the financial impact of closing an unexplained gender pay gap in accordance with the EU Pay Transparency Directive (2023/970). Users simply upload a CSV file containing employee details such as salary, gender, grade, tenure, and category. The calculator then generates two options: minimum compliance and full equalisation.
The calculator is available as a static HTML page and an Excel workbook with live formulas. It operates entirely within the user's browser, requiring no network connections or third-party servers. The input data remains on the user's computer, ensuring privacy and security. The page itself serves as the complete application, with HTML, CSS, and JavaScript all contained within a single file.
To maintain the zero-network-call requirement, the calculator eliminates several conveniences. There are no external fonts or libraries, no CDN usage, and no analytics or error reporting. The charting function uses plain SVG graphics instead of a charting library. The calculator only accepts the CSV input through the "input type= file" element and reads the data into memory with the FileReader API. Once the calculation is complete, the data is discarded upon refreshing the page.
The calculator's code is open-source, and it includes two automated checks to ensure adherence to the zero-network-call principle. The first check scans the built page for any external scripts, stylesheets, or images. The second check opens the page in headless Chrome, records all network requests made during the load, and fails if any are detected. A Python port of the calculation is also available in the repository for independent verification.
The calculator computes the residual pay gap after controlling for grade and tenure using ordinary least squares (OLS) regression. The results are displayed as medians by rank, along with the explicit formula and outcome of the OLS regression using sums and Cramer's rule. Users can modify input values and instantly observe changes in the output.
While the calculator addresses the concern of trustworthiness in handling sensitive data, it does not determine whether a gender pay gap is lawful or group similar roles into categories for compensation purposes. These decisions are left to the user's discretion. Ultimately, the decision of whether salary data should touch a server to calculate the gender pay gap is a separate question, and the creator believes there is one clear answer.
The calculator, sample CSV, and the checks mentioned above are available at the provided GitHub repository.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.