Background: Several studies have been published favouring sigmoidectomy with primary anastomosis over Hartmann's procedure for perforated diverticulitis with purulent or faecal peritonitis (Hinchey grade III or IV), but cost-related outcomes were rarely reported. The present study aimed to evaluate costs and cost-effectiveness within the DIVA arm of the Ladies trial. Methods: This was a cost-effectiveness analysis of the DIVA arm of the multicentre randomized Ladies trial, comparing primary anastomosis over Hartmann's procedure for Hinchey grade III or IV diverticulitis. During 12-month follow-up, data on resource use, indirect costs (Short Form Health and Labour Questionnaire) and quality of life (EuroQol Five Dimensions) were collected prospectively, and analysed according to the modified intention-to-treat principle. Main outcomes were incremental cost-effectiveness (ICER) and cost-utility (ICUR) ratios, expressed as the ratio of incremental costs and the incremental probability of being stoma-free or incremental quality-adjusted life-years respectively. Results: Overall, 130 patients were included, of whom 64 were allocated to primary anastomosis (46 and 18 with Hinchey III and IV disease respectively) and 66 to Hartmann's procedure (46 and 20 respectively). Overall mean costs per patient were lower for primary anastomosis (€20 544, 95 per cent c.i. 19 569 to 21 519) than Hartmann's procedure (€28 670, 26 636 to 30 704), with a mean difference of €-8126 (-14 660 to-1592). The ICER was €-39 094 (95 per cent bias-corrected and accelerated (BCa) c.i.-1213 to-116), indicating primary anastomosis to be more cost-effective. The ICUR was €-101 435 (BCa c.i.-1 113 264 to 251 840). Conclusion: Primary anastomosis is more cost-effective than Hartmann's procedure for perforated diverticulitis with purulent or faecal peritonitis.