The gender pay gap compares the mean or median pay of the two groups. The raw gap covers all employees, whereas the gap for comparable roles neutralizes factors such as job, level or seniority. The two do not measure the same thing and are read together.
Example
Raw gap = (men's mean salary - women's mean salary) / men's mean salary