Metformin does help with weight loss. It does this through several mechanisms but the primary one is that it increases muscle cells sensitivity to insulin. The insulin resistance you had was contributing to weight gain and the metformin helps to reverse that. Metformin works best when you are on a low carb diet. I am sure your eating better and being mindful of your health is a major contributing factor to your weight loss as well. Generally the weight loss with the metformin will happen during the first 3 months, after that your body somewhat regulates.