Migraine is the third most prevalent disease in the world. Preventive treatment is indicated in about 40% of individuals with episodic migraine. Although 4 treatments are approved by the US Food and Drug Administration for prevention of episodic migraine, none were designed to prevent migraine, efficacy is modest, and all have significant adverse-event profiles. As a result, less than 1/3 of migraine sufferers with who are candidates for prevention receive drug treatment and of those who are treated, more than 85% have discontinued the preventive drug within one year. Migraine pain is associated with the activation and sensitization of specific receptors involved in pain-promoting pathways. Metformin, which is a widely available, well-tolerated anti-diabetic medication, can downregulate pain-promoting pathways. Metformin has demonstrated positive results in animal models of migraine in the laboratory. Given the longstanding use and established safety record of metformin, the investigators will evaluate the safety and efficacy of metformin for preventive treatment of migraine in a randomized, double-blind, placebo-controlled, crossover trial.