During World War Two Susan, a pattern recognition expert, mathematician Millie, information gatherer Jean and Lucy, a young girl with an incredible memory, work as code-breakers at Bletchley Park. In 1952, Susan, now married, hears on the radio about a serial killer and contacts Deputy Chief Commissioner Wainwright, a wartime friend of her husband Timothy, with her theory that there will be another victim in a particular place. However the police find nothing.Susan then decides to call on her former colleagues and, under the guise of a literary club, asks them to join her in the murder investigation. They are initially reluctant until Susan proves that the killer is using a railway timetable to select his victims by plotting their journeys. By following the killer's pattern and cross-referencing information they deduce that the next victim will be Mary Lawrence and she will be murdered at Upton Park. They hurry to their destination but find they are too late.
The women surmise that the killer is a rail employee, familiar with train times, who offered his victims perfume or nylons to go with him and they narrow the list of suspects down to three men. However, when Susan takes her theory to DCI Compton, in the absence of Wainwright, he is dismissive. Following a failed attempt to trap the killer,in which Lucy, acting as bait, is sexually assaulted by a passenger who is not the murderer, they discover that their original theory is wrong. Susan suspects that the real killer set up the others as red herrings and believes he learned how to cover his tracks because he also worked in espionage. She visits ex-spy master Cavendish, who gives her the name of a man who became psychologically unstable after being buried in rubble for three days. Susan goes to see the man's psychiatrist, unaware that she is facing the man himself.
Susan speaks to a man who claims he is the suspect's psychiatrist and to whom she unwittingly gives her reasons for seeing him. She is lucky to escape and soon realises she has met the murderer but when the police are called to the house he has vanished. She visits Cavendish for more information, only to find that he too has been killed but when she takes her findings to Wainwright he is again dismissive. Research leads the women to find that the serial killer's first victim was Julie Oakwood during the war, and from the leads this gives, Susan makes a final journey to unmask the culprit.
During the war Alice Merren was one of Bletchley's brightest code-breakers. Now it is 1953. Lucy has a clerical job for Scotland Yard, Millie works as a German translator and Susan a housewife perturbed that her husband's promotion may take them overseas. Jean visits Alice in prison, awaiting trial for killing her old flame and Bletchley colleague John Richards. Jean is convinced of Alice's innocence and persuades her friends to investigate. They discover that John sent flowers to a young girl, Lizzie Lancaster and a search of her flat reveals she is in possession of a classified military file and a press cutting of an incident where military personnel were injured by a chemical experiment on Salisbury Plain. The women save Lizzie from a hit and run and Jean correctly assumes that she is Alice's daughter. The Bletchley circle believe both mother and daughter have been set up by John's killer who was also responsible for the Salisbury Plain incident.
Alice is to hang, though she tells her friends she assumed Lizzie had killed John and so taken the blame. The women though know that John was killed and the attempt made on Lizzie's life to prevent them revealing what happened on Salisbury Plain and fell that they too are under surveillance. Discovering that the injured soldiers - all clearly guinea pigs as none had families - were treated at the same military hospital as Timothy had been, a reluctant Susan visits, claiming she needs his medical records for his overseas posting. She locates a horribly injured young soldier who confirms that he and other victims were deliberately chosen for the heartless experiment but Susan is removed by the military and forced to explain to her husband her past at Bletchley and her current mission. Meanwhile Millie, Jean and Lucy learn that John was employed at Porton Down, a government establishment testing chemical weaponry run by Professor Masters, whom they visit. He is a deranged patriot who believed John and Lizzie were Russian spies and the trio are in danger from him unless Susan can prevail upon the honest colonel at the hospital to help them and save Alice.
Susan and her family have moved to India for her husband's posting whilst Alice, though acquitted of murder, finds work impossible to obtain. Also unemployed Millie runs a nice line in selling black market goods but is abducted and her flat ransacked - though she has hidden wads of her cash in her cooker. Alice, Jean and Lucy look for Millie's business associate Jasper but he has vanished and they surmise that he has fled after cheating his bosses. The women learn that these are the Maltese Magros family, headed by the formidable Marta and they are looking for money appropriated by Jasper. Marta lets Millie go on condition she turns a hefty profit for her but the other women want Millie to turn her back on the whole affair. Millie however is concerned that the Magros are bringing in young Czech girls as sex slaves and wants to stop them. Then they find that Jasper has been murdered.
The women report Jasper's murder but next day Ben, Lucy's colleague at the police station, informs them that the body has disappeared. Realising that there is police corruption at work the women decide they must stop the gang themselves. Jean poses as a potential client and visits Marta at the restaurant she runs, accompanied by Lucy, who uses her photographic memory to memorise the contents of Marta's ledger. It is in code but with Lizzie now at teacher training college next to the old Bletchley site the friends return there and find an old enigma machine. With Alice's expert knowledge they get it working and crack the code, which informs them of the times and locations of Marta's incoming shipments. They tip off customs to intercept the next consignment of sex slaves but realise that Marta is on to them and must act quickly to thwart her.