Criminal Law Update – Drug Supply – the role of algorithms

News Posted: July 12, 2022

Drug Supply – the role of algorithms

A recent Court of Appeal case shed some light on the use of algorithms to measure the likely quantities of drugs supplied by a particular defendant.

The algorithm has been designed by a police officer of the Metropolitan Police Service, in collaboration with an organisation called Forensic Analytics. The police analyse mobile phone data to build a picture that reflects the extent of the drug supply.

The process works in this way:

“The algorithm collates a single list of all of the telephone numbers that appear within a bulk message. This captures the customer base that the drugs line sends adverts to, and accounts for the growth of the customer base over time. As long as the number has appeared within a broadcast list at one point, it is included in the customer base list. Next, the algorithm identifies every 24 hour period [0000-2359] that the customer has initiated [rather than received] a communication with the drugs line. This would indicate that the customer is seeking to purchase drugs. It does not matter whether it is a single communication that day or 50. This will be given the value of 1 [a customer that day]. Only successful calls [in excess of 6 seconds] are included. To account for instances of someone responding to the broadcast message asking to be left alone, anyone who has responded on only one day in a given week is also removed. In addition, the algorithm removes any incoming call with a duration of four seconds or less. This ensures that, should the line be off for the day, the algorithm will not include the unanswered incoming calls for that period. Automated SMS replies are stripped from the calculation. This therefore leaves only those who are in regular communication with the drugs line. Whilst it is an assumption that someone would not request his or her removal from the mailing list multiple times in a week, it is unlikely given the time and cost implication. Furthermore, this volume of customers not accounted for in the equation outweighs this small variance… Finally, the algorithm provides a total of the daily figure of customers across the entire call data period. With this figure, multiplied by the average daily consumption of a crack and heroin user, it is possible to quantify the volume of drugs sold by the line.”

The use of the algorithm was challenged by the defence, but the Court of Appeal held:

“In determining that the category 2 threshold was met, the Recorder did not regard himself as hidebound by the algorithm. His sentencing remarks make plain that he treated it only as a guide. He recognised the fact-sensitive nature of the sentencing exercise, putting the results of the algorithm into context. His slip in relation to the number of customers was immaterial. If the applicant had wanted to challenge the assumptions made by the prosecution evidence, he could and should have produced evidence of his own. In our view it was reasonable for the Recorder to consider the results of a cautiously operated algorithm as a fair way of approaching the Guideline.”

We can draw two main conclusions from this:

(1) First, the algorithm can only be one part of the factual matrix used in sentencing, and

(2) Second, the assumptions are open to challenge.

Despite the widespread comments made in relation to this case we do not believe that the use of this algorithm as yet presents any substantial shift so far as a sentencing exercise is concerned. It is also apparent that close scrutiny is yet to be applied to the algorithm, and we can expect further case law on this over the next couple of years.

How can we help?

We ensure we keep up to date with any changes in legislation and case law so that we are always best placed to advise you properly. If you would like to discuss any aspect of your case, please contact our team on 01743248545 or email

Image credit: “Prim Algorithm 5.svg” by Alexander Drichel, Stefan Birkner is licensed under CC BY-SA 3.0.

We are proud to hold the following accreditations

Enquire Now