I'm pregnant. When to tell my boss?
First, you must have in mind that it depends on the country you live in. If you are unlucky to live somewhere where the law doesn't protect you, it may be a bit tricky, but it doesn't mean you have to keep your mouth shut until everybody sees your baby bump.
If your country has something like Equal Employment Opportunity or Disabilities Act, you are in a way better position but you still have to think a bit before you tell the news.
First, and the most important, forget your friends at work and tell your boss first. When you go home for a couple on months, somebody else must take over your duties and your boss should know in advance that will happen. It is not good to leave the superior in the dark and let her finds out from other sources that you are expecting.
If you are working at at least decent company with good relations with your colleagues, the news will be accepted with happiness. And in turn you should make everybody's life easier: try to see who could continue your work, and state clearly that you will finish what you have to do before you leave.
Then, if you have any health problem that may pull you from the job earlier or demand the longer stay at home, be straight and talk to your boss. Again: Your boss should have all information because she's responsible for the company to run smoothly and she need all info she can get.
And third, some people like to work from home while they are with their newborn, some don't. Talk to you boss and see can you do some work from home, of course if you want it. Some bosses will appreciate that and some will say "I don't wanna see you, be with your baby!" That all depends on the person, but in any case, the offer will show that you care.
So, in short: If you are sure you are pregnant, do not wait. The more honest and straight you are, the better. And congratulations!