DENVER ― These days, cannabis is Colorado’s cash crop. (Ciao, corn!)

In the three-and-a-half years since the state began allowing adults to purchase marijuana for recreational use, cannabis has contributed more than half a billion dollars in tax revenue to both state and local coffers.

That’s according to a report released Wednesday by the Denver-based marijuana consulting firm VS Strategies. Based on data from the Colorado Department of Revenue, the firm tabulated that cannabis-related taxes from 2014 through mid-2017 totaled $506,143,635.

That includes the taxes on purchases of marijuana for recreational or medical use, as well as fees paid by cannabis businesses. The tax figure is substantially more than some experts predicted in 2012 when Colorado voters approved Amendment 64, which legalized recreational marijuana. At that time, some analysts projected the state would net between $5 and $22 million a year in taxes.

VS Strategies spotlighted its report by presenting an oversize check for half a billion dollars Wednesday to Colorado state Rep. Jonathan Singer (D).

Mason Tvert / VS Strategies State Rep. Jonathan Singer (D) accepts a novelty check for half a billion dollars from "The Cannabis Community" on Wednesday.

A majority of money has gone to fund K-12 education (even with that, Colorado’s education funding badly lags behind most of the rest of the country). Amendment 64 requires the first $40 million in tax revenue be allotted for school construction.

VS Strategies / HuffPost A yearly breakdown of Colorado's marijuana tax revenue, which recently exceeded half a billion dollars in total, and how it's spent.

The remainder of the state’s share of cannabis taxes helps finance health care, health education, law enforcement and substance abuse prevention and treatment programs.

Local governments, which tax marijuana separately from the state, have used their share of the funds in a variety of ways.

Pueblo County, for instance, used some of the cash to start what’s believed to be the first cannabis-tax-funded college scholarship program. In 2017, it distributed $420,000 among 210 students.

The Denver-area city of Edgewater, which has six marijuana dispensaries and a population of 5,300, has used its cannabis windfall to upgrade outdated infrastructure. Cannabis taxes have generated more than $1.4 million for the city, which CBS Denver reports makes up 20 percent of Edgewater’s annual budget.

Marijuana sales in Colorado now regularly exceed $100 million on a monthly basis. In 2016, total recreational and medical sales exceeded $1.3 billion. By comparison, corn ― the state’s most-valuable non-psychoactive crop ― was valued at $569 million that year.

“Marijuana tax money has been used to improve a wide range of programs and services,” Mason Tvert, a leading advocate for Amendment 64 who now works for VS Strategies, said in an email to HuffPost. “It is funding everything from school construction to substance abuse treatment to fighting homelessness. While it might not fix every school or help every person who needs it, it is having a significant and positive impact on our community.”

Under Amendment 64, local governments still have the power to ban marijuana sales. Colorado Springs, for instance ― a city recovering from massive budget shortfalls ― does not allow the sale of recreational weed, and as such misses out on additional tax revenue.