When it "feels" right to you.
A common courtesy is to tell your mum before anyone else (other than the father of course!) immediately followed by the other grandparents.
It's fairly common to tell grandparents early, but ask them not to tell anyone else until the second trimester.
However, individual families & their relationships are so variable you can't always do this.
Some mums like a bit of time to get used to being pregnant before they tell anyone at all! Some mums have mothers who just "know"!!!
My mum had only daughters - we both told her at about 8-10 weeks. I have only sons, only GC so far, we were told at about the same time, they day after d-i-l's mum, and asked to tell no-one else until 13 weeks.