Compare wage and benefit growth in Python

Compare private-industry and state/local-government wage and benefit growth using published ECI changes, with original definitions and adjustment kept explicit.

Compare wage and benefit cost growth

A compensation budget needs more than average pay. The Employment Cost Index (ECI) measures how employers’ wage and benefit costs change while controlling for shifts in the mix of jobs. This example compares the published growth in wages and benefits from December 2024 to December 2025 for private industry and state/local government workers.

The optional input.csv contains four genuine sector/component selections. The identical choices appear in the selections list in the Python code below. They identify the groups to look up; they contain no invented wage amounts or fictional workforce.

Download quarterly_observations.csv into your working folder. This is a genuine subset of the paid table: all eight quarters of 2024–2025 for the four selected unadjusted 12-month-change series, with all 32 columns unchanged. The full $29 download contains 105,966 quarterly observations across 1,278 original national series, plus standard errors, definitions, footnotes and coverage. Inspect the full coverage and fields.

Code example

This standard-library Python code runs in a notebook cell, IPython or a script. It selects the published twelve_month_change statistic and unadjusted series (U) for 2025-Q4. The result is December-to-December growth, not the average of calendar year 2025. Change quarter to compare another available quarter; use the series directory for other groups and components.

Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.

Python 3.10+ · Jupyter, IPython or a script
import csv
from pathlib import Path

# Two sectors and their wage/benefit series; these choices also appear in input.csv.
selections = [
    {"owner_code": "2", "estimate_code": "02"},
    {"owner_code": "2", "estimate_code": "03"},
    {"owner_code": "3", "estimate_code": "02"},
    {"owner_code": "3", "estimate_code": "03"},
]
data_folder = Path(".")
quarter = "2025-Q4"
wanted = {(x["owner_code"], x["estimate_code"]) for x in selections}
observations = {}
with (data_folder / "quarterly_observations.csv").open(newline="", encoding="utf-8") as f:
    for row in csv.DictReader(f):
        key = (row["owner_code"], row["estimate_code"])
        if (key in wanted and row["quarter"] == quarter
                and row["statistic"] == "twelve_month_change"
                and row["seasonal"] == "U"
                and row["industry_code"] == "000000"
                and row["occupation_code"] == "000000"
                and row["subcell_code"] == "00"):
            if key in observations:
                raise ValueError("Selection matches multiple series; refine the group.")
            observations[key] = row

results = []
for selection in selections:
    key = (selection["owner_code"], selection["estimate_code"])
    row = observations.get(key)
    if row is None or row["availability"] != "reported":
        raise ValueError(f"No reported growth estimate for {key} in {quarter}.")
    results.append({"sector": row["owner_name"], "component": row["estimate_name"],
                    "quarter": quarter, "year_over_year_pct": row["value"]})

for row in results:
    print(f'{row["sector"]} | {row["component"]} | {row["quarter"]} | {row["year_over_year_pct"]}%')

Analysis of the output

Private industry workers | Wages and salaries | 2025-Q4 | 3.3%
Private industry workers | Total benefits | 2025-Q4 | 3.4%
State and local government workers | Wages and salaries | 2025-Q4 | 3.3%
State and local government workers | Total benefits | 2025-Q4 | 3.5%

Wage costs rose 3.3% in both sectors over the year ending December 2025. Benefit costs rose 3.4% for private industry and 3.5% for state/local government. These figures describe growth, not the amount employers spend per hour. They can give a compensation review historical context, but do not prescribe a raise or establish that one sector pays more.

The code reads BLS’s published percentage changes directly. Calculating changes from rounded index levels can produce a different last decimal. Wages and benefits are separate components; adding their growth rates would not give total compensation growth. For that measure, select the total-compensation series instead.

The 0.1-percentage-point difference in benefit growth does not establish statistical significance. The full download includes available standard errors and official notes. The code stops if a requested estimate is missing or the selection matches multiple series, so neither a missing value nor an ambiguous group silently becomes a result.

Choose the labor measure for your question

Use ECI for compensation-cost growth with employment-mix effects controlled. Use CES employment, hours and earnings for industry payroll jobs and average earnings; changes in the mix of workers can affect those averages. Use CPI-U for consumer-price change. These products have different populations and group definitions, so a shared date does not make them directly interchangeable.

Compare related business and labor datasets →

Using the full dataset

Extract the purchased ZIP and replace the sample with its complete quarterly_observations.csv. The code runs unchanged. The full table contains current-dollar indexes, published 3-month changes and published 12-month changes for national compensation, wages and total benefits between 2001 and 2025 where available.

The unique key is series_id + year + period. series.csv supplies original titles, adjustment, component/statistic codes and source start/end dates. Index bases and units are recorded in the quarterly table. groups.csv defines the ECI owner, industry, occupation and subcell codes. Keep identifiers as text; ECI group codes are not a direct NAICS/SOC crosswalk, and overlapping groups must not be summed.

Join standard_errors.csv on the same key to inspect the available precision estimate and its missing status. footnotes.csv expands the official notes. coverage.csv distinguishes numeric readings, explicit source-missing readings and absent quarters for each series/year. Histories vary: 256 delivered series end before 2025 Q4. No successor series are spliced or gaps interpolated.

Current-dollar indexes use December 2005 = 100. ECI’s fixed weights are updated periodically; the December 2022 update used 2021 weights and the 2018 occupational classification. Preserve those source notes when interpreting long histories. source_accounting.csv records how every original observation/aspect row entered or fell outside this edition.

Sources and versions

Source: BLS ECI bulk files, captured November 6, 2026 UTC, with bulk data last modified October 30. The purchased observation scope is 2001–2025 where available. This is revised history in that retained snapshot, not original quarterly publication vintages or a live feed.

Read the BLS technical notes, standard-error guidance and weights/classification update. Regional and metropolitan series, constant-dollar statistics, standalone health-insurance costs and relative-importance weights are outside this product’s scope.

Your one-time purchase includes processing improvements and documented publisher error corrections to this edition. New periods or genuinely new source editions may be sold separately; routine revisions are not automatically errata. There is no membership or automatic-refresh promise. BLS provides the source data free; ACD sells preparation, validation, documentation and delivery. Read the preparation record.

Example checked November 6, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.