It turns out marijuana could have taxpayers seeing green in more ways than one. There is a massive windfall associated with making medical weed available nationally and a big data company broke it down for us.

New Frontier Data, a market research company for the cannabis industry, said on Wednesday that their data analysis shows that if medical marijuana was available nationally, the decreased Medicare expenses for three widely used opioid painkillers — OxyContin, hydrocodone, and fentanyl — would lead to taxpayers saving over $220 million.

In preparation for an upcoming report, The Cannabis Industry Annual Report: 2017 Legal Marijuana Outlook, New Frontier Data looked into the United States’ opioid epidemic and how marijuana could impact the use of such medications. In 2013, the country’s Medicare program spent almost $2 billion on three aforementioned opioid drugs. In 2015, more than 33,000 people died because of opioids — the highest rate ever recorded. Opioid drug prescriptions in the U.S. tripled to 207 million in the last 25 years, and more than 2 million Americans are abusing opioids, according to Giada Aguirre De Carcer, CEO and Founder of New Frontier Data.

“In 2015, for the first time, drug-related deaths exceeded the number of fatalities from car accidents,” said De Carcer, who was quoted in a Wednesday press release by the company. “No one can argue that Americans are not gripped by an opioid epidemic, and the research shows that prescribing medical cannabis has helped to reduce the overall number of opioid drug prescriptions.”

In a report published in January, the National Academies of Sciences, Engineering, and Medicine (NAS) presented evidence that medical marijuana can treat chronic pain symptoms — the number one reason opioids are prescribed. A study conducted last year by the University of Georgia found an 11 percent dip in yearly drug prescriptions in states that have medical marijuana programs. “Likewise, based on Medicare disbursements from 2013, were that 11 percent reduction in daily prescriptions to hold and be applied nationwide against those three most-prescribed opioid drugs, it would represent a savings of $220 million to American taxpayers,” New Frontier Data’s press release said.

John Kagia, the executive vice president of industry analytics for New Frontier Data, told Vocativ in an email that out of the $2 billion spent on just those three opioid drugs, $950 million was generated by OxyContin alone. While there has not been a great deal of research on patient drug selection in states where medical cannabis is legal, some studies point to a bright future, he said.

“Research being done at St. Francis Hospital in Connecticut has found that when patients who have a medical marijuana card are given the option to choose between medical cannabis and opioids to manage their acute pain, the patients have overwhelmingly selected medical cannabis,” Kagia said.