The average cost of a gram of cannabis from the illicit market continues to drop as legal prices rise -- with authorized retailers charging as much as 80 per cent more, according to an analysis by Statistics Canada.

The government agency said Wednesday that the average price of an illegal gram of pot was $5.93 in the second quarter, down from $6.23 in the previous quarter and $6.51 in the prior quarter.

The cost of a legal gram of weed, however, was $10.65, up from $10.21 in the previous quarter and $9.82 in the fourth quarter of 2018, based on self-submitted quotes.

At $10.65, legal cannabis in the second quarter is roughly 80 per cent more costly than the $5.93 price tag on illicit weed.

"The share of respondents who reported purchasing illegally due to 'legal cannabis being too expensive' rose from 27 per cent in the first quarter of 2019, to 34 per cent in the second quarter," the Ottawa-based agency said in a release.

Statistics Canada based these conclusions on price quotes gathered using the StatsCannabis crowdsourcing application between April 1 and June 30. Out of 697 price submissions, 572 of were deemed plausible, it said.

Overall, based on these voluntary submissions, the average price per gram of cannabis fell to $7.87 from $8.03 in the previous quarter, largely attributed to lower reported illegal prices.

The share of StatsCannabis respondents purchasing pot illegally rose to 59 per cent during the quarter, up from 55 per cent in the first quarter.

Statistics Canada urged caution when interpreting the data, as the quotes are self-submitted and the number of responses are limited.

The agency also analyzed cannabis prices obtained from the websites of illegal online cannabis retailers, excluding illicit storefronts.

This data, which Statistics Canada has been collecting since May 2018, was gathered in order to support research and validate price information collected via StatsCannabis, the agency said.

Based on 423,000 price quotes collected over the period -- an average of 32,500 per month -- the average price per gram of dried cannabis was $8.44 during the second quarter of this year, down from $8.61 in the first quarter, Statistics Canada said.

The trends observed in website price data generally align with the quotes collected through the StatsCannabis application, but indicate that the price levels are generally higher online than what is reported via crowd-sourced quotes, it added.

"The higher prices are not out of line with the StatsCannabis data since online retailers would have higher overhead costs than other illegal sources," the agency said.