Outpatient treatment with metformin reduced long COVID incidence by about 41%, with an absolute reduction of 4·1%, compared with placebo. Metformin has clinical benefits when used as outpatient treatment for COVID-19 and is globally available, low-cost, and safe.