Track True Labor Costs: Average Compensation
by Role in Excel

Learn how to measure the true average compensation by role so you can better understand labor costs across your business. In this lesson, you’ll see how to compare roles month by month, spot cost patterns, and build a clear visual that makes payroll insights easier to manage and share.

Download the Excel file used in this tutorial:

How to Build Average Compensation by Role in Excel

1. Create the fully loaded payroll cost field

  • Start by building the total payroll cost for each employee record.
  • Combine the main compensation components into one fully loaded cost field:
    • Gross pay
    • FICA
    • Unemployment
    • Workers’ comp
    • Benefits
  • This creates the total burdened cost that will later be summarized by month and by role.

2. Derive the month from the payroll period

  • Use the payroll period end date to create a month field.
  • Use the EOMONTH function so each payroll record rolls up to the correct month-end date.
  • Make sure the month is based on the period end, not the pay date or period start.
  • This gives you a consistent monthly grouping field for the report.

3. Generate a unique list of months

  • Use the UNIQUE function to pull a distinct list of months from the month field you created.
  • Because the data is stored in a table, the structured references make the formula easier to read.
  • This list becomes the vertical axis of the report.

4. Generate a unique list of roles

  • Use the UNIQUE function again to pull a distinct list of job roles.
  • Then use the SORT function to place the roles in alphabetical order.
  • Use the TRANSPOSE function so the role list runs across the top row instead of down a column.
  • This creates the horizontal axis of the report.

5. Sum the total payroll cost by month and role

  • Use the SUMIFS function to calculate total payroll cost for each role in each month.
  • Set the sum range to the fully loaded payroll cost field.
  • Apply criteria for:
    • The selected month
    • The selected role
  • This gives you the total burdened payroll cost for that role in that month.

6. Count the number of employees in each role for each month

  • To calculate an average, you cannot simply count rows because payroll records may repeat employees across pay periods.
  • Instead, build the employee count carefully:
    • Use FILTER to return employee names that match the selected role and month
    • Use UNIQUE to remove duplicate names
    • Use COUNTA to count the unique employees returned
  • This ensures the denominator reflects the actual number of employees in that role for that month.

7. Divide total payroll cost by unique employee count

  • Take the total payroll cost result and divide it by the unique employee count.
  • This gives you the average fully loaded compensation for each role by month.
  • At this point, you have the core calculation for the KPI matrix.

8. Lock the references before copying across the table

  • Adjust the cell references so the formula copies correctly across rows and columns.
  • Lock the month reference so it stays fixed correctly as you copy across roles.
  • Lock the role reference so it stays fixed correctly as you copy down months.
  • Use the F4 key or add dollar signs manually to control which row or column remains fixed.

9. Copy the completed formula across the full matrix

  • Once the references are locked correctly, copy the formula across the entire report grid.
  • Fill it across all roles and all months.
  • This creates the completed Average Compensation by Role matrix.

10. Apply a heat map to highlight higher and lower values

  • Select the completed matrix.
  • Go to conditional formatting and apply Color Scales.
  • Use More Rules if you want to customize the colors.
  • Choose a scale where darker shading represents higher compensation values.
  • This makes it easier to spot the most expensive roles and identify month-to-month changes visually.

11. Adjust formatting for readability

  • Resize columns or rows as needed so the table is easier to read.
  • Review the color scale to make sure the numbers remain visible.
  • Fine-tune the formatting so the final output is clean and easy to interpret.

12. Review the final role-by-month compensation pattern

  • Once the table is complete, you can scan it to identify changes in compensation by role over time.
  • The darker cells indicate higher average compensation months.
  • This final layout makes it easy to compare roles side by side and monitor changes month by month. 

Tracking Average Compensation by Role in Excel

Q1. What does average compensation by role mean?
Average compensation by role measures how much each position costs your business over a specific period. It helps you compare payroll costs across roles and understand where labor expenses are highest.

Q2. Why is average compensation by role an important HR KPI?
This is a valuable human resources KPI because it gives leaders a clearer view of workforce costs by position. It can help with budgeting, hiring decisions, compensation planning, and overall labor cost management.

Q3. What should be included in average compensation by role?
A complete view of compensation should include more than just wages or salary. It often includes payroll taxes, benefits, workers’ compensation, unemployment costs, and other employer-paid expenses that affect the true cost of each role.

Q4. How can this analysis help my business?
By tracking average compensation by role month by month, you can identify cost trends, compare departments more accurately, and spot roles that may be more expensive than expected. This makes it easier to plan staffing and improve profitability.

Q5. What is the best way to visualize average compensation by role?
A heat map is one of the best ways to display this metric because it quickly highlights which roles have the highest and lowest costs over time. This makes workforce cost analysis easier to interpret at a glance.

Q6. Can I use this same approach for other HR metrics?
Yes. The same setup can be used for other HR dashboards and workforce analytics, including headcount by department, overtime costs, turnover trends, benefits expense, or labor cost per employee.

Get more lessons like this
by joining our newsletter

Receive weekly Excel tutorials, tips, and KPIs straight to your inbox

Databoards

Analysis & Development