My opinion is tainted by two losses but I guess you need that kind of perspective too.
My first pregnancy we told our families right away. We thought "woohoo! we are expecting! we want to tell everyone!". And we did. And at 10 weeks we discovered our baby had stopped developing at 9 weeks. Un-telling people was absolutely heartbreaking. And having people who heard through the grapevine ask me about my pregnancy weeks after I had my D&C was also heartbreaking. I had to re-live it over and over and over.
This pregnancy we waited to tell family until 8 weeks and after we had seen a strong heartbeat on u/s twice. We announced happily on Christmas day that we were expecting TWINS and that we were super excited but that we wanted to keep things quiet until 13 weeks. Two weeks later we discovered that one of our babies had stopped developing about a week after our perfect 8 week u/s. This time it was much easier because we called our immediate family, they were very supportive, and we didn't have a lot of people asking about the twins and me having to tell them that "one of them died".
We just came out of the closet to our friends and co-workers about a week ago. We were thinking of waiting until 16 weeks but figured that 14 weeks was enough time. Obviously anything can happen but at this point I am showing and it is harder to hide it.
So... all in all... My true advice is to only tell people who will A) be supportive in the event of a miscarriage and B) you will easily be able to get news to. Tell family members not to make it "public knowledge" until later. Because it wasn't calling my mom that killed me. It was running into neighbors while walking my dog and them happily asking about my baby 2 months after my miscarriage. THAT sucks.
Sorry for the long ramble. I just have unfortunately had a lot of experience with telling and un-telling. I get very nervous for people when they announce to near strangers that they are expecting and are 5 weeks along. Unfortunately, pregnancy loss is more common that we like to admit and it just seems so risky to their emotions IMO.