Deaths from drug overdoses have been increasing in recent years, and while people can – and do – die from a drug overdose at any age, data show that certain drugs are more likely to be responsible for deaths in some age groups than in others.

Data from the Centers for Disease Control and Prevention show that overdose-related deaths reached a record high of 52,404 in 2015. Much of the attention has been on opioids like prescription painkillers and heroin, but other drugs contribute to mortality as well, including cocaine and the anti-anxiety drug alprazolam, also known by brand names Xanax and Niravam.

Using data about mortality from the CDC's Wide-ranging Online Data for Epidemiologic Research, or WONDER database, which uses information from death certificates, U.S. News unpacked the numbers to reveal how these drugs affect different age groups.

For the purposes of this report, data were not filtered by race or gender, and were broken down by 10-year increments. Young children and adults 85 and older were excluded.

Here's what the age distribution of overdoses from four different drugs looked like in 2015. Charts are presented in no particular order.

Cocaine

Overdoses from cocaine, which include crack, were responsible for 6,784 deaths last year. Deaths often occur because the drug contributes to heart attack, stroke or other medical complications.

Deaths from cocaine overdoses were highest among people who are middle-aged.

Heroin

Overdoses from heroin, a cheaper, more accessible alternative to prescription painkillers, killed 12,982 people in 2015. An overdose from heroin or other opioids depresses the nervous system and can cause a person to stop breathing. With these drugs, however, an overdose can be reversed through administering the drug naloxone.

The highest number of deaths from heroin overdose occurred among 25 to 34 year olds.

Benzodiazepines

Benzodiazepines includes drugs like Xanax, Niravam, Klonopin, Valium and others that affect the central nervous system. Past CDC reports have shown these drugs tend to contribute to overdose when they are combined with other drugs. In 2015 these drugs were associated with 8,758 deaths.

More deaths occur among 45- to 54-year-olds than any other age group.

Methadone

Methadone, a drug that can be prescribed to ease the withdrawal symptoms of someone addicted to another opioid, contributed to 3,285 deaths in 2015. Deaths have been on the decrease since 2008, following policies aimed at reducing prescriptions, warnings from the Food and Drug Administration and efforts to better inform doctors about the drug's dangers.

Deaths from methadone overdose were highest among 45- to 54- year olds.

The data do not reveal to what extent people overdosed after experimentation or whether their deaths occurred after long-term use.

The CDC has noted that there are a couple of variables to keep in mind when looking at the data. First, in thousands of cases more than one drug – including alcohol – is involved. If more than one substance is detected in a person's system, that fatality will show up in the counts for each of those categories.