The wage gap is calculated by the Bureau of Labor Statistics as well as the US Census by using a formula where they divide the median of the average salary of women by the median of the average salary of men. The result is then multiplied by 100 to get the percentage.