Subjects will then keep a headache diary for 4 weeks to establish baseline characteristics, including number of migraine days per month, number of moderate to severe headache days per month, and number of days per month of acute medication use. The 4-week baseline period will be followed by 2 treatment periods of 12 weeks each, separated by a washout period of 4 weeks (total study duration, 32 weeks). For the 12-week treatment periods, subjects will receive either metformin 500mg twice daily or matching placebo twice daily.