Contribution of drug dealers and prostitutes to the UK economy boosted figures by £10bn according to estimates

George Osborne famously declared "we are all in this together" when it comes to Britain's prosperity. The Office for National Statistics has now taken him at his word, adding up the contribution made by prostitutes and drug dealers.

For the first time official statisticians are measuring the value to the UK economy of sex work and drug dealing – and they have discovered these unsavoury hidden-economy trades make roughly the same contribution as farming – and only slightly less than book and newspaper publishers added together.

Illegal drugs and prostitution boosted the economy by £9.7bn – equal to 0.7% of gross domestic product – in 2009, according to the ONS's first official estimate.

A breakdown of the data shows sex work generated £5.3bn for the economy that year, with another £4.4bn lift from a combination of cannabis, heroin, powder cocaine, crack cocaine, ecstasy and amphetamines.

According to the estimates there were 60,879 prostitutes in the UK in 2009, who had an average of 25 clients per week – each paying on average £67.16 per visit.

There is also detailed data on drugs. The statisticians reckon there were 2.2 million cannabis users in the UK in 2009, toking their way through weed worth more than £1.2bn. They calculate that half of that was home-grown – costing £154m in heat, light and "raw materials" to produce.

The ONS will work in the coming months to bring the data more up to date. The figures will then be included in the broad category of household spending on "miscellaneous goods and services" alongside life insurance, personal care products and post office charges.

The more inclusive approach brings the ONS into line with European Union rules, and will eventually allow comparisons of the size of the shadow economy in different member states.

Joe Grice, chief economic adviser at the ONS, said: "As economies develop and evolve, so do the statistics we use to measure them. These improvements are going on across the world and we are working with our partners in Europe and the wider world on the same agenda.

"Here in the UK these reforms will help ONS to continue delivering the best possible economic statistics to inform key decisions in government and business."

The new elements will be published in the national accounts from September onwards, supplementing the more traditional measures of GDP including construction and manufacturing output. By comparison, the construction sector contributed around £90bn to the UK economy in 2009, and manufacturing £150bn.

The ONS said that in every year between 1997 and 2009 prostitution and illegal drugs boosted the economy by between £7bn and £11bn. Combined with other changes to the national accounts from September, £33bn or 2.3% will be added to the 2009 level of GDP, the ONS said.

Graeme Walker, head of national accounts for the ONS, acknowledged there were limitations to measuring the value of illegal activities to the economy, but said it was a useful exercise nevertheless.

"It's a model-based estimate but one that serves a purpose for the picture of the overall economy."

He said the ONS would attempt to "fill in the gaps" left by available studies but it would be impossible to measure illegal activities as accurately as other components of GDP. Other activities are measured using questionnaires but the response rate in the sex and drugs trades are unlikely to be high.

Alan Clarke, a UK economist at Scotiabank, said that although the government would not feel the benefit of illegal work in terms of income tax take, there would be a spending boost.

"A drug dealer or prostitute won't necessarily pay tax on that £10bn, but the government will get tax receipts when they spend their income on a pimped up car or bling phone."

Steve Pudney, professor of economics at the University of Essex, said he was sceptical about the methods used by the ONS to estimate the size of the drugs market.

"In my view, the ONS estimate of the size of the drug market is unlikely to be very accurate. It rests on some heroically large assumptions which would be difficult to test, and it also uses a measure of demand that is likely to understate systematically the true scale of drug use."

He added: "They are using a demand-side approach which loosely involves multiplying a survey estimate of the number of drug users by another estimate of the amount consumed by the average user.

"Average retail prices of drugs come from other sources – mainly police/customs/security service intelligence sources – and, multiplying this by the estimated demand, gives the size of the market in cash terms."