This is a question that is very common among young students. The most common answer to it that I have heard is: “There is no good time. It will be an interruption to your career at any stage.” In many ways that is a true answer, but I don’t think that it is the best answer. The best answer is to simply wait until you really, really want to have kids. First of all, there is no requirement to have kids, so no one should feel guilty about “sacrificing” having a family for the sake of anything else if said person doesn’t want to have a family. I remember a talk by a very successful woman scientist who said she simply never felt a desire to have children, so she never had any. Meanwhile, all of her sisters reached a point in their life when they desperately wanted to have a baby, and each of them did.
Some years ago, I reached the point of really wanting to have kids and changed my life accordingly. The whole “my clock is ticking” thing really does exist for many women. While for various reasons, I never reached a state of desperation toward having kids, I have observed it in many women who get to an age when they feel that it is necessary to have a baby at all costs and their life isn’t structured for this to happen. Obviously, one cannot entirely control finding a desirable partner, being in a stable financial situation, etc. Being flexible and working within your circumstances is critical. The point is, that if you wait until you absolutely, positively want to have kids to have them, you will be a much better parent and you will brim with enthusiasm toward your parental duties (though such enthusiasm will be masked by your sleep deprived state). The fact that being a parent is the toughest thing that can happen to you and that you will have to give up working towards your career 24/7 will become insignificant compared to the feelings of love and gratitude that you feel for your kids.
I know that many people get pregnant by “accident” and it turns out that having an “accidental” child becomes the best experience in the person’s life. Obviously, parents that have unplanned kids can love their kids just as much as everyone else. I’d say that most women in academia are far too methodical to get pregnant by “accident” so I’m talking to all of the planners here. (I know, even with planning, you can get pregnant unintentionally). Please don’t have kids to go along with expectations of others, just wait until you want to have one. Similarly, don’t not have kids to go along with expectations of others. When you feel that the time is right for you and you really want to have kids, you will be able to change your life as needed.