Technical writing

CDC Drug Overdose Mortality Data: The Federal Dataset Behind the Opioid Crisis

· 12 min read· AI Analytics
Federal DataCDCPublic HealthOpioids

More than 107,000 Americans died of drug overdoses in 2022. Roughly 70,000 of those deaths involved synthetic opioids — primarily illicit fentanyl — according to death certificates processed by the CDC's National Vital Statistics System. That figure, and nearly everything known about the trajectory of the opioid crisis, comes from three overlapping federal datasets that the CDC has built and maintained for decades: NVSS death certificate records coded with ICD-10 underlying and multiple cause codes, the CDC WONDER mortality query system, and the VSRR Provisional Drug Overdose Death Counts released monthly. Together they are the empirical foundation for every federal and state policy response to the epidemic.

Three waves, one dataset

Epidemiologists studying drug overdose mortality have characterized the opioid epidemic as occurring in three distinct but overlapping waves, each visible as a step-change in the NVSS time series.

Wave 1 — prescription opioids (starting 1999). Beginning in the late 1990s, overdose deaths involving natural and semi-synthetic opioids — oxycodone, hydrocodone, codeine, morphine — rose sharply as prescribing rates increased following aggressive marketing by manufacturers and a shift in pain management guidelines. ICD-10 code T40.2 (“natural and semi-synthetic opioids”) captures this category in the multiple cause of death field. The geographic footprint concentrated heavily in Appalachia: West Virginia, Ohio, Kentucky, and Tennessee had the highest per-capita death rates, reflecting the rural populations targeted by pill mill networks and the economic conditions that generated high rates of chronic pain and prescription drug dependence.

Wave 2 — heroin (starting approximately 2010). As prescription opioid supplies tightened following the 2010 reformulation of OxyContin and increasing scrutiny of high-volume prescribers, a population already dependent on opioids shifted to heroin, which was cheaper and more available than diverted prescription pills. Heroin deaths, coded T40.1, began rising in 2010 and accelerated through 2016. The geographic shift was notable: heroin deaths spread from traditional urban markets into suburban and rural areas that had been primarily affected by prescription opioids.

Wave 3 — synthetic opioids and illicit fentanyl (starting approximately 2013). The third and most lethal wave began as illicit fentanyl — manufactured in clandestine laboratories rather than diverted from the pharmaceutical supply — began appearing in the heroin supply. Code T40.4 (“synthetic opioids, excluding methadone”) captures this category. Fentanyl is approximately 100 times more potent than morphine by weight; small dosing inconsistencies produce fatal overdoses. By 2016 fentanyl had surpassed heroin as the leading driver of opioid overdose mortality. By 2022, T40.4 deaths numbered more than 70,000 of the 107,000-plus total drug overdose deaths.

A fourth emerging trend appears in the most recent VSRR data: polysubstance deaths involving fentanyl in combination with stimulants — cocaine and methamphetamine. The T40.5 (cocaine) and T43.6 (psychostimulants) categories have risen substantially as illicit fentanyl has contaminated the stimulant supply, creating overdose risk in populations that did not primarily use opioids.

The NVSS: death certificates and ICD-10 coding

The National Vital Statistics System is the foundational data source. Death certificates filed by physicians, medical examiners, and coroners in every US jurisdiction flow through state vital records offices to the CDC's National Center for Health Statistics (NCHS). NCHS codes each death using the International Classification of Diseases, Tenth Revision (ICD-10), assigning one underlying cause of death and up to twenty multiple cause of death codes.

For drug overdose deaths, two layers of coding matter:

Underlying cause codes

The underlying cause of death for a drug overdose is the mechanism of poisoning. Four code ranges apply:

  • X40–X44 — Accidental poisoning by and exposure to drugs, medicaments, and biological substances. This is the largest category by volume; most overdose deaths are ruled accidental.
  • X60–X64 — Intentional self-poisoning (suicide). Deaths classified here involve the same drugs as the accidental category but with a determination of suicidal intent.
  • X85 — Assault by drugs, medicaments, and biological substances. Rare; covers deaths classified as homicide by poisoning.
  • Y10–Y14 — Poisoning, undetermined intent. Used when the manner of death cannot be established with confidence, often in jurisdictions where the coroner did not conduct a full investigation or where the circumstances were ambiguous.

The CDC's standard drug overdose death counts aggregate all four ranges (X40–X44, X60–X64, X85, Y10–Y14) as the universe of drug poisoning deaths. Excluding Y10–Y14 (undetermined intent) understates the total, since many of these deaths are functionally accidental overdoses that received an undetermined ruling because of incomplete investigation at the scene.

Multiple cause codes: the drug-specific signal

The underlying cause code tells you a drug overdose occurred. The multiple cause of death field tells you which drugs were involved. The T40 series is the primary multiple cause field for opioid overdose deaths:

  • T40.1 — Heroin
  • T40.2 — Natural and semi-synthetic opioids (oxycodone, hydrocodone, codeine, morphine)
  • T40.3 — Methadone
  • T40.4 — Synthetic opioids, excluding methadone (fentanyl, tramadol, fentanyl analogs)
  • T40.5 — Cocaine
  • T43.6 — Psychostimulants with abuse potential (methamphetamine, MDMA)

A single death certificate can carry multiple T40 codes when more than one drug is involved. In practice, the majority of fentanyl overdose deaths also carry codes for other substances: cocaine, methamphetamine, alcohol, and benzodiazepines appear frequently as co-occurring causes. This polysubstance structure is critical for interpreting the data — counting T40.4 deaths as purely “fentanyl deaths” overstates the fentanyl-only phenomenon and understates the role of drug combinations in the mortality signal.

One persistent measurement problem: death certificates in approximately 20 percent of drug overdose cases list only the generic category (“unspecified opioid,” T40.6) rather than a specific drug. This occurs most often in jurisdictions with limited toxicology capacity or when deaths are investigated by coroners rather than medical examiners. The unspecified category disproportionately affects rural counties and low-resource jurisdictions, creating a systematic undercount of specific drug involvement in precisely the geographic areas that were hardest hit by the epidemic.

CDC WONDER: querying mortality across geography and demographics

CDC WONDER (Wide-ranging Online Data for Epidemiologic Research) is the public-facing query interface for NVSS mortality data. It covers the Multiple Cause of Death dataset from 1999 through the most recent finalized year (currently 2022, with 2023 typically released in mid-2025). The interface allows analysts to cross-tabulate drug overdose deaths by any combination of:

  • Year (or year range)
  • State and county
  • Age group (single year, 5-year groups, or custom)
  • Race and Hispanic origin
  • Sex
  • Underlying cause (ICD-10 code or range)
  • Multiple cause (any T40 code combination)

WONDER enforces a cell suppression rule: cells with fewer than ten deaths are suppressed to protect confidentiality. This suppression creates gaps in county-level analysis for rural areas and for specific demographic subgroups. Querying drug-specific deaths (T40.1 heroin) by county and year for low-population rural counties will produce largely suppressed results. The workaround is to aggregate across drug categories or years to reach the ten-death threshold, or to use state-level data for demographic breakdowns that are too small at the county level.

Accessing WONDER

The interactive query interface is available at https://wonder.cdc.gov/mcd-icd10.html for the 1999–2020 dataset and https://wonder.cdc.gov/mcd-icd10-expanded.html for the 1999–2022 expanded dataset. Both interfaces export results as tab-delimited text files that can be loaded directly into pandas or R. For bulk downloads, WONDER provides a batch request form that accepts an XML request body, enabling programmatic query submission without manual browser interaction. The CDC's public API endpoint for WONDER accepts POST requests to https://wonder.cdc.gov/controller/datarequest/D76(Multiple Cause of Death) with an XML payload specifying geographic, demographic, and cause filters.

VSRR Provisional Drug Overdose Death Counts

The Vital Statistics Rapid Release (VSRR) Provisional Drug Overdose Death Counts address a fundamental limitation of the finalized NVSS data: death certificates take approximately 12 months to be finalized after the death occurs, meaning the most recent finalized year is always more than a year stale.

VSRR releases 12-month rolling death counts updated monthly, with a typical 6-month lag from the reference period end to publication. The counts are provisional because they are based on preliminary death certificate data that has not yet completed full quality review and coding. The CDC publishes completeness percentages alongside each data point; recent months (within the 6-month lag window) typically show completeness below 75 percent and should be suppressed in trend analysis. Months with completeness above 90 percent are generally reliable, though final counts typically run 5–10 percent higher than the provisional values after coding is completed.

VSRR data is published at the state level, not the county level. It covers the same drug categories as the finalized NVSS data (T40.1–T40.5, T43.6) and is available via the CDC's Socrata-powered open data portal at https://data.cdc.gov/resource/xkb8-kh2a.csv. The dataset is updated the first week of each month. The 12-month rolling count format smooths seasonal variation and avoids the problem of comparing months with different numbers of days; it is the standard format for tracking overdose trends in public health surveillance.

Geographic patterns: from Appalachia to everywhere

The geographic fingerprint of the opioid epidemic changed substantially across the three waves.

In Wave 1 (prescription opioids), overdose death rates concentrated heavily in a belt of Appalachian and adjacent states: West Virginia consistently led the nation in per-capita overdose mortality, followed by Ohio, Kentucky, Tennessee, and Pennsylvania. These states shared economic characteristics — post-industrial decline, high rates of physical labor in mining and manufacturing, geographic isolation from addiction treatment services — that created large populations susceptible to prescription opioid dependence and limited access to treatment. West Virginia at the peak of Wave 1 had overdose death rates more than three times the national average.

In the fentanyl era (Wave 3), the geographic concentration eroded. Illicit fentanyl entered drug markets nationwide simultaneously, meaning states with historically lower overdose rates experienced rapid acceleration. New England, particularly Massachusetts and New Hampshire, emerged as high-mortality regions early in the fentanyl wave. By 2020–2022, the highest absolute death counts shifted to large-population states: California, Florida, Pennsylvania, Ohio, and North Carolina, reflecting population size rather than per-capita rates. In per-capita terms, West Virginia remained elevated, but the geographic concentration that characterized Wave 1 had largely dissolved.

The West Coast saw a distinct pattern: methamphetamine-involved deaths, which had remained flat during the eastern opioid epidemic, began surging after 2015 as illicit fentanyl adulterated stimulant supplies. By 2022, California reported some of the highest stimulant-fentanyl combination death rates in the country.

Racial disparities: the inversion of a historical pattern

One of the most significant findings in recent CDC WONDER analyses involves racial disparities in overdose mortality. For much of the prescription opioid era, overdose death rates were highest among white Americans — a pattern that reflected the geographic and demographic concentration of prescription opioid oversupply in largely white rural communities.

That pattern has reversed in the fentanyl era. Between 2015 and 2022, overdose death rates among Black Americans increased at a pace substantially faster than among white Americans. By 2020, Black Americans had surpassed white Americans in age-adjusted overdose death rates — the first time this had occurred since the NVSS began tracking drug-specific mortality. American Indian and Alaska Native populations, already facing elevated overdose mortality throughout the epidemic, also saw accelerated increases through the fentanyl period.

The mechanism driving this reversal is the contamination of stimulant drug supplies with illicit fentanyl. Cocaine markets — which serve a disproportionately Black urban population compared to heroin and prescription opioid markets, which historically concentrated among white rural users — became heavily adulterated with fentanyl starting around 2016–2018. People who used cocaine without opioid tolerance faced a much higher lethality rate from fentanyl exposure than people who had developed tolerance through prior opioid use. The result was a sharp increase in overdose deaths in populations that had not been the primary targets of the prescription opioid crisis and who were less likely to have access to naloxone or opioid-specific harm reduction services.

CDC WONDER data shows this disparity clearly when queried by race and multiple cause code: T40.5 (cocaine) deaths with a concurrent T40.4 (synthetic opioid) code account for a disproportionate share of the mortality increase in Black communities relative to White communities, where T40.4-only deaths (fentanyl without stimulants) represent a larger share of the increase.

Python analysis: 10-year trends by drug category

The VSRR Provisional Drug Overdose Death Counts are the most accessible source for longitudinal trend analysis, available via the CDC's Socrata API without an account or API key:

import pandas as pd
import requests
import matplotlib.pyplot as plt

# CDC WONDER exports data as tab-delimited text files.
# Download from: https://wonder.cdc.gov/controller/datarequest/D76
# (Multiple Cause of Death, 1999-2020, grouped by year + drug category)
# Select ICD-10 multiple cause codes: T40.1-T40.4 for specific opioid categories.

# For programmatic access, use the CDC VSRR Provisional Drug Overdose Death Counts CSV,
# updated monthly at:
# https://data.cdc.gov/NCHS/VSRR-Provisional-Drug-Overdose-Death-Counts/xkb8-kh2a

VSRR_URL = "https://data.cdc.gov/resource/xkb8-kh2a.csv"
params = {
    "$limit": 50000,
    "$order": "year DESC, month DESC",
}

r = requests.get(VSRR_URL, params=params, timeout=60)
r.raise_for_status()

# Parse response (Socrata API returns CSV)
from io import StringIO
df = pd.read_csv(StringIO(r.text))

# Key columns:
#   state_name       -- "United States" for national, or state name
#   year             -- calendar year (2015-present)
#   month            -- month name ("January", etc.)
#   indicator        -- drug category label (see below)
#   data_value       -- 12-month rolling death count
#   percent_complete -- data completeness indicator (suppress <75%)

# Relevant indicator values (drug categories):
#   "Number of Drug Overdose Deaths"
#   "Natural & semi-synthetic opioids (T40.2)"
#   "Heroin (T40.1)"
#   "Synthetic opioids, excl. methadone (T40.4)"
#   "Cocaine (T40.5)"
#   "Psychostimulants with abuse potential (T43.6)"
#   "Methadone (T40.3)"

# Filter: national 12-month rolling counts by drug category
national = df[df["state_name"] == "United States"].copy()

# Parse period end date
national["period_end"] = pd.to_datetime(
    national["year"].astype(str) + "-" + national["month"],
    format="%Y-%B"
)

# Pivot by drug category for trend chart
key_indicators = [
    "Synthetic opioids, excl. methadone (T40.4)",
    "Natural & semi-synthetic opioids (T40.2)",
    "Heroin (T40.1)",
    "Cocaine (T40.5)",
    "Psychostimulants with abuse potential (T43.6)",
]

trend = (
    national[national["indicator"].isin(key_indicators)]
    .pivot_table(index="period_end", columns="indicator", values="data_value")
    .sort_index()
)

# Suppress low-completeness periods (6-month lag means recent data is incomplete)
completeness = (
    national[national["indicator"] == "Number of Drug Overdose Deaths"]
    .set_index("period_end")["percent_complete"]
    .apply(pd.to_numeric, errors="coerce")
)
trend = trend[completeness.reindex(trend.index).fillna(0) >= 75]

fig, ax = plt.subplots(figsize=(14, 6))
for col in trend.columns:
    ax.plot(trend.index, trend[col], label=col.split(" (")[0])

ax.set_title("CDC VSRR: 12-month rolling drug overdose deaths by category")
ax.set_xlabel("Period end")
ax.set_ylabel("Deaths (12-month rolling count)")
ax.legend(fontsize=8, loc="upper left")
plt.tight_layout()
plt.savefig("cdc_overdose_trend.png", dpi=150)

# --- State-level fentanyl burden ---
# "Synthetic opioids, excl. methadone" = illicit fentanyl proxy
fentanyl_states = (
    df[
        (df["indicator"] == "Synthetic opioids, excl. methadone (T40.4)")
        & (df["year"] == df["year"].max())
        & (df["state_name"] != "United States")
    ]
    .dropna(subset=["data_value"])
    .sort_values("data_value", ascending=False)
)
print(fentanyl_states[["state_name", "data_value"]].head(15))

The WONDER tab-delimited export format is compatible with the same pandas workflow; replace the Socrata fetch with pd.read_csv('wonder_export.txt', sep='\t', skipfooter=15, engine='python')to handle the notes footer that WONDER appends to every export. State-level completeness in the VSRR data varies: large states (California, Texas, Florida, New York) tend to reach 90 percent completeness within 4–5 months of the reference period end; smaller states may take 7–8 months. Filtering to completeness above 75 percent before charting prevents misleading downward trends in the most recent months.

Policy applications: how the data drives funding decisions

CDC overdose mortality data feeds directly into federal and state policy mechanisms that allocate harm reduction and treatment resources.

SAMHSA State Opioid Response grants. The Substance Abuse and Mental Health Services Administration distributes State Opioid Response (SOR) and State Targeted Response (STR) grants based in part on each state's share of national overdose mortality. States with higher overdose death counts receive proportionally larger formula-based allocations. The CDC VSRR and finalized NVSS data are the authoritative inputs to this calculation. When a state's provisional overdose counts rise, the subsequent grant cycle typically reflects increased funding — with a 1–2 year lag from data publication to grant award.

Naloxone distribution targeting. State health departments and federally qualified health centers use county-level CDC WONDER data to target naloxone distribution programs. Counties with high overdose death rates — adjusted for T40.4 fentanyl involvement, which requires naloxone at higher doses and multiple doses per reversal than heroin — receive priority outreach. The racial disparity finding has prompted several states to shift naloxone distribution toward urban Black communities through partnerships with social service agencies that operate outside traditional substance use disorder treatment settings.

Syringe services program justification. The federal ban on using federal funds for syringe services programs was effectively lifted in 2016 for local governments that could demonstrate high HIV or hepatitis C risk, which is correlated with injection drug use. States applying for this exception cite CDC WONDER county-level data on drug overdose mortality as evidence of the severity of injection drug use in the target jurisdiction. The T40.1 (heroin) category is the most relevant indicator, since heroin is predominantly injected; the decline of T40.1 relative to T40.4 in recent years reflects the shift from heroin to fentanyl in counterfeit pill form, which is increasingly non-injected.

Treatment capacity planning. The Health Resources and Services Administration (HRSA) uses overdose mortality data alongside data on buprenorphine prescriber availability and treatment facility capacity to identify areas with the largest treatment gap. Counties where overdose death rates are high but buprenorphine prescriber density is low are flagged for targeted workforce development and telehealth expansion under the Rural Health Clinics program and the HRSA Substance Use Disorder Treatment telehealth expansion authorities.

Data limitations and analytical caveats

Several systematic limitations constrain what conclusions can be drawn from CDC overdose mortality data.

The 6-month provisional lag means that VSRR data reflects conditions 6 to 12 months before publication. In a rapidly evolving drug supply — particularly as novel synthetic opioids like nitazenes and xylazine-adulterated fentanyl emerge — this lag can obscure new mortality signals until they have already produced significant death counts.

The 20 percent unspecified opioid problem (T40.6) is worst in precisely the counties where understanding drug-specific trends matters most for policy: rural counties with limited forensic resources that may have been epicenters of prescription opioid deaths in Wave 1 and are now experiencing Wave 3 fentanyl mortality. Analyses that rely exclusively on T40.4 counts will undercount fentanyl deaths in low-resource jurisdictions.

The WONDER suppression threshold (cells with fewer than ten deaths are suppressed) creates systematic gaps in county-level trend analysis for small populations and specific demographic subgroups. Longitudinal analysis at the county level for states with many small rural counties requires aggregation strategies — either combining years or combining counties into multi-county regions — that reduce geographic resolution.


For the DEA ARCOS controlled-substance transaction dataset that shows the prescription opioid distribution patterns underlying Wave 1 mortality: 380 million transactions: indexing the DEA's ARCOS opioid distribution data →

For the HHS-OCR HIPAA breach database — another NCHS-adjacent dataset tracking failures in the healthcare system that treats overdose survivors: The Wall of Shame: what the HHS-OCR HIPAA breach database reveals about healthcare data security →

For Census ACS demographic data used to compute per-capita overdose rates and contextualize racial disparities by tract-level population: The demographic backbone: using Census ACS data to contextualize every other federal dataset →