Here’s the world’s ultimate swearword, according to maths

Reaching for a new swearword to use in frustrating situations? This mathematician’s code may hold the answer.

Try 6 issues for £9.99 when you subscribe to BBC Science Focus Magazine!
Published: June 15, 2023 at 4:34 pm

In a real watershed moment for mathematics, one researcher has developed a formula she claims has created the world’s best swear word.

MSc student Sophie Maclean, who is due to begin her PhD in number theory later this year at King’s College London, wrote a code which can read an existing list of swearwords and analyse their qualities to create a new one.

So what curse did the code spit out? According to maths, the ultimate swearword is ‘banger’ – or ‘ber’ for short.

The answer may be a little disappointing for those expecting something coarser. “I think neither is as satisfying as a ‘f*ck’ when you've stubbed your toe, or a ‘sh*t’ when you realise you've forgotten your parent's birthday. But both feel like they could be quite good insults for people,” said Maclean.

To determine the swears, Maclean used a Markov chain: a mathematical model that predicts the probability of a sequence based on previous inputs. In this case, the Markov chain assessed the likelihood of each letter following the one before it – a bit like predictive texting.

The Markov chain was given a sanitised list of swearwords pulled from Ofcom’s guide to using offensive language on TV and radio, which is based on surveys of public attitudes to certain words and phrases. Maclean cleaned up the list to remove what she deemed to be highly offensive swearwords, using only 45 of the 186 English words listed in the guide.

In the guide, these words are ranked by several offence levels:

  • Mild: words unlikely to concern audiences in most circumstances and require limited context. (examples: cow, pissed, arse)
  • Moderate: words which cause greater potential for offence and require more context. (examples: sh*t, b*llend, arseh*le)
  • Strongly offensive: words which require clear contextual justification to be used. (examples: too rude for this page)

These rankings are reflected in Maclean’s code, with more offensive words given a heavier weighting. She also integrated algorithms into the code to calculate the likely characteristics of the ultimate curse, which was likely to begin with 'b', have four letters, and end in -er (what Maclean calls ‘the w*nker-t*sser phenomenon’).

Taking these factors into account, the code reads each of the existing swearwords to build its predictions. With 'b' as the most common starting letter for the swearwords listed, Maclean plugged this letter into the start and let the code do the rest.

But she discovered that there were in fact two letters equally likely to come after 'b': 'a' and 'e' – meaning a tie between ‘banger’ and ‘ber’.

As Maclean points out, ‘banger’ already has some lewd connotations while ‘ber’ provides the opportunity for a fresh start. (A great one to teach your children, perhaps).

Maclean shared an initial version of the code at the Cheltenham Science Festival in early June. This initial code produced randomised curses as the first letter was not restricted, producing alternative new curses like ‘ditwat’.

“Personally, I don't know if I have a favourite swear word or not,” Maclean said during her talk, “but actually science has shown that it can reduce pain if you stub your toe and swear.”

This phenomenon is called the hypoalgesic effect (an action or sensation which lessens pain stimuli), and has been studied for several decades. Unfortunately for the new curses, research in 2020 found that only conventional and established swearwords increase pain tolerance by 33 per cent more than made-up words. Ber!

About our expert

Sophie Maclean is a mathematics MSc student at King’s College London, having completed her BA in Mathematics at Trinity College, Cambridge. A self-proclaimed ‘overthinker’, Maclean has delivered talks around the UK on the maths of everyday life. She is due to start her PhD in number theory at King’s later this year.

Read more: