Looking through search engines such as Google and other websites you will find that there is little information relating to how long it takes for diarrhoea to settle. In fact, the truth is that most people have a different view of what diarrhoea actually is and if they can tolerate it. Loose stool may mean 3 or 4 times a day or less (or more) and not be an issue. Liquid, explosive episodes with little warning on the other hand can definitely impact daily life and lead to other health problems and dehydration. Some people prone to constipation may actually not mind being a little loose!
The important thing is to recognize when it is a problem, and, if it could be the sign of something else such as infection or even cancer. One way to find out if it is the metformin is to stop taking it for a few days. If you still have diarrhoea after 3 or 4 days then you have your answer. If you have not ever had a problem and suddenly are aware that your bowel habits have changed then it could indicate a serious problem and you definitely need to get that checked out with your doctor.