Media playback is unsupported on your device Media caption There are an estimated 2.2 million cannabis users in the UK.

The claim: The Liberal Democrat manifesto says that legalising cannabis would raise £1bn for the Exchequer.

Reality Check verdict: £1bn seems like a reasonable estimate, although most of the figures used to make it are based on uncertain figures about currently illegal activities.

When the Liberal Democrats were in the coalition government, they asked the Treasury to work out a costing for this policy.

It was never published, but was obtained by the BBC's Newsnight programme in 2015.

It estimated that 2.2 million people aged 16 to 59 had used cannabis the previous year - smoking a total of 216 tonnes.

It looked at a report from the Institute for Social and Economic Research, which estimated that legalising cannabis could raise tax revenues of between £400m and £900m in England and Wales.

Adding the benefits from things such as reduced police and court costs would take that up to between £500m and £1.25bn a year.

It is clear from the range of the estimate that there is considerable uncertainty surrounding it.

Also, it would need to be considered across the UK as drugs policy is not devolved.

The Treasury report argued that the ISER's £1.25bn figure was probably an over-estimate but agreed that regulating cannabis would raise significant amounts in tax, as well as saving the state up to £200m in court and police costs a year.

The manifesto does not say how much tax would be charged on cannabis, but it is reasonable to compare the tax it could raise with the tax raised from tobacco.

There are just over 11 million tobacco users in the UK, who paid about £9.5bn of tax on that in 2015, an average of about £850 a head.

If the 2.2 million cannabis users spent the same amount per head, that would raise about £1.9bn.

The Office for National Statistics (ONS) estimated, when it was incorporating illegal drugs into the national accounts, that the market for cannabis was worth £1.2bn in 2009 prices.

On the flip side of this calculation, there may be additional costs if there were to be a large increase in demand for cannabis, and the ISER research suggests this would need to be monitored carefully with an eye to modifying the policy, especially if there were an increase in demand from vulnerable groups.

The Liberal Democrats also say they would allow cannabis to be sold through licensed outlets - selling those licences would presumably also raise revenue, although another detail is that potency would be limited by legislation, which would probably mean that an illegal market in more potent cannabis would remain.

The problem with all of these figures is that they are uncertain estimates of illegal activities.

Better statistics are available from the US state of Colorado, which legalised cannabis at the start of 2014.

The most recent figures available cover July 2016 to March 2017, when cannabis taxes raised $185m (£143m).

If you extrapolate that to a full year and from the population of Colorado (5.4 million) to the UK, you get to about £2.3bn.

Now, it's likely that some of the cannabis being sold in Colorado is being taken illegally to other states, but there would have to be a lot of that going on to take the tax figure below the Liberal Democrats' £1bn.

Read more from Reality Check

Follow us on Twitter