The opioid epidemic cost the federal government $26 billion in lost tax revenue between 2000 and 2016, and state governments $11.8 billion, according to a new study published in Medical Care.

The study combines previous research and surveys, as well as existing empirical tools to measure tax revenue, to calculate how much income and sales tax revenue has been lost from people dropping out of the labor market, even temporarily, due to opioid misuse, addiction, or overdose.

Different states were affected differently, from California’s $843 million in lost tax revenue to Alaska and New Hampshire’s $0 (because they don’t have a statewide sales or income tax relevant to the study). Generally, the more populous states with higher tax rates were hurt more, as well as states hit harder by the opioid crisis.

The study does have some limitations. For one, these are estimates; it’s possible they are missing some variables that could affect the projections. The researchers also rely on the National Survey on Drug Use and Health to calculate the effects of opioid misuse, but this survey is known to underestimate total misuse and addiction.

Still, the study offers some insight into the financial impact of the opioid crisis. Over the years, we’ve already seen lots of stories about the human impact: In 2017 alone, more than 70,000 deaths were linked to drug overdoses, and most those overdose deaths were linked to opioids. That means lost friends, family, and peers. But the new study shows that the overdose crisis also hits communities’ budgets.

Previous studies have estimated the overall economic impact of the opioid epidemic, beyond just tax revenue. A 2016 study, also in Medical Care, put the total economic burden of prescription opioid overdose, misuse, and addiction at $78.5 billion in 2013. And a 2017 report by Altarum, a health care research organization, put the cost of the opioid epidemic at more than $95 billion for 2016.

But a White House analysis in 2017 estimated the cost of the opioid epidemic at $504 billion in 2015. Unlike previous reports, the White House Council of Economic Advisers looked at not only direct costs like health care expenses and lost potential earnings from work, but also the full value of all the activities that people could contribute to if they didn’t die prematurely. That gave the White House a much broader — and much higher — estimate of total costs.

The estimates are relevant both to measure the impact of the opioid crisis and to put the potential solutions in context. Experts have long said that the federal government should spend tens of billions of dollars to tackle the crisis by funding treatment, prevention, and harm reduction efforts. But while Congress has allocated funding in the single-digit billions here and there, it has yet to invest the tens of billions — or even $100 billion over 10 years, as Sen. Elizabeth Warren (D-MA), a presidential candidate, has proposed — that experts say is necessary. So the opioid epidemic continues, killing tens of thousands of Americans each year.

The latest Medical Care study is particularly relevant here, showing that a taxpayer-funded response in the tens of billions could have paid for itself. And that’s for 2000 to 2016, when the opioid crisis was not quite as bad as it is today.

The study could also help guide ongoing lawsuits against opioid manufacturers and distributors. The litigation seeks to punish pharmaceutical companies for their role in flooding communities with dangerous, addictive drugs and recoup some of the costs that the crisis has led to.

“Estimating damages that are closely tied to opioid misuse is critical for determining what funds states, and potentially the federal government, may be able to recover in litigation,” Joel Segel, Yunfeng Shi, John Moran, and Dennis Scanlon wrote in the study. “The estimates also have public health implications as damages paid to state or federal governments could potentially be allocated to opioid treatment and prevention efforts.”

So we now have the numbers. Whether government officials will act on them remains to be seen.

For more on solutions to the opioid epidemic, check out Vox’s hub for articles.