ObjectiveTo investigate medications associated with cognitive function.DesignPopulation-based cross-sectional cohort study.SettingUK Biobank.ParticipantsUK Biobank participants aged 37–73 years who completed cognitive tests at the baseline visit in 2006–2010.Main outcome measuresCognitive test outcomes on verbal–numerical reasoning test (n=165 493), memory test (n=482 766) and reaction time test (n=496 813).ResultsMost drugs (262 of 368) were not associated with any cognitive tests after adjusting for age, gender, education, household income, smoking, alcohol status, psychostimulant/nootropic medication use, assessment centre, and concurrent diagnoses and medications. Drugs used for nervous system disorders were associated with poorer cognitive performance (antiepileptics, eg, topiramate breasoning(score) −0.65 (95% CI −1.05 to −0.24), bmemory(score) −1.41 (−1.79 to −1.04); antipsychotics, eg, risperidone breaction time(ms) −33 (−46 to −20), negative values indicate poor cognitive performance and vice versa). Drugs used for non-nervous system conditions also showed significant negative association with cognitive score, including those where such an association might have been predicted (antihypertensives, eg, amlodipine breasoning −0.1 (−0.15 to −0.06), bmemory −0.08 (−0.13 to −0.03), breaction time −3 (−5 to −2); antidiabetics, eg, insulin breaction time −13 (−17 to −10)) and others where such an association was a surprising observation (proton pump inhibitors, eg, omeprazole breasoning −0.11 (−0.15 to −0.06), bmemory −0.08 (−0.12 to −0.04), breaction time −5 (−6 to −3); laxatives, eg, contact laxatives breaction time −13 (−19 to −8)). Finally, only a few medications and health supplements showed association towards a positive effect on cognitive function (anti-inflammatory agents, eg, ibuprofen breasoning 0.05 (0.02 to 0.08), breaction time 4 (3, 5); glucosamine breasoning 0.09 (0.03 to 0.14), breaction time 5 (3 to 6)).ConclusionsIn this large volunteer study, some commonly prescribed medications were associated with poor cognitive performance. Some associations may reflect underlying diseases for which the medications were prescribed, although the analysis controlled for the possible effect of diagnosis. Other drugs, whose association cannot be linked to the effect of any disease, may need vigilance for their implications in clinical practice.