As governments grapple with the rising cost of the opioid crisis, one group may have found a way to predict how high those costs will go. 

For every three fatal overdoses, a local government's public safety costs can increase by an average of 1 percent, or $150,000, according to research from the data platform OpenGov. What’s more, once deaths start spiking, government costs tend to steadily increase at that rate for about three years until they begin to plateau.

The findings give local governments an idea of what to expect financially as they respond to rising overdose deaths. The data were gathered from 20 cities and counties across five states considered to be on the front lines of the crisis -- Kentucky, Maryland, Massachusetts, Ohio and Pennsylvania -- and released exclusively to Governing.

According to the research, the reason for the three-year gap between the spike in overdose deaths and the spending peak is because that’s about how long it has taken governments to recognize what’s happening and develop a response. “During the first year or so, you’re hiring people to respond and you’re building more programs to get ahead of deaths and start to reduce them,” says Joseph Roualdes, head of communications for OpenGov. “Year three is when you see those programs start taking effect and the expenses plateau.”

Take Chelsea, Mass. In 2014, the city of roughly 36,000 responded to its opioid epidemic by launching a harm reduction program, an approach that doesn’t focus on getting everybody clean and sober but on keeping people out of harm’s way.

Three years into the program, costs are still higher, but Community Engagement Specialist Dan Cortez reports that Chelsea, which used to be “known as the place where you went to get drugs” is noticeably different. “Our downtown area has completely shifted. We still have our individuals, and a lot of clients hang out on the square. But I also see moms pushing strollers.”

Indeed, the data suggest the program is having an effect. Two years after Chelsea launched its program, the city’s opioid deaths dropped. They dropped again last year to 13, from a high of 17 in 2015.

Still, while OpenGov’s data attempts to find some uniformity in spending, Roualdes says the reality is that each government tends to have different factors driving its costs. For example, governments in Ohio are seeing their costs for the overdose-reversal drug naloxone skyrocket. But that's not the case in Massachusetts, where local governments purchase the drug through a state grant program.

And as many governments know, there’s a lot more to the opioid crisis response than the death toll. Researchers are trying to get a handle on the ripple effect of costs which include increased spending on child services, the mental toll on emergency workers and the economic cost of lost productivity. For example, in Washington, D.C., 13 percent of the city’s $3,657-per-capita cost of the opioid crisis in 2015 came from non-fatal cases, according to data from the American Enterprise Institute.

To help governments see such ripple effects on their budgets, Roualdes says OpenGov is launching a feature this summer called Strategic Initiatives that will help them track expenses and outcomes by initiative, rather than solely by department. “When I started this research, I had this grand vision of, ‘We’re going to be able to say exactly how much the [different aspects of the opioid crisis] cost,” says Roualdes. “But the real key takeaway was that governments just don’t know.”