On an annualized basis Canadians spent $5.7 billion on marijuana between April and June, Statistics Canada says, as consumption of both legal and illegal varieties is growing steadily.

The data agency reported Friday that spending increased by 1.2 per cent over the three-month period, with almost 85 per cent or $4.8 billion of the spending going to illegal versions of the drug. The remainder was spent by medical marijuana users with legal prescriptions for the drug.

The federal government plans to legalize the drug for recreational use on Oct. 17, a development which is likely to see even more spending. But even as the economy prepares for an influx of recreational users, medical use is also exploding.

Cannabis consumption for medical use has more than tripled since the middle of 2016, StatsCan says.

Prices for the drug appear to be falling, too. Across the country, users spent an average of $6.74 per gram on pot in the second quarter. That figure has declined by more than 10 per cent in the past two years, according to its calculations.