With my first pregnancy, we told everyone right away. We had been trying for 9 months to get pregnant and were ecstatic once we found out. I ended up miscarrying 3 weeks after we told everyone. It was very difficult to tell everyone that we lost the baby.
When I got pregnant after the miscarriage, we waited until the end of the 1st trimester until we broke the news. Same with my 3rd pregnancy. We waited until I had my first u/s at 11 weeks before we broke the news. I did tell my employer earlier though. I felt they deserved to know and also since I had history of miscarriage, I thought it was fair to let them know in case it happened again and I needed time off.