Depending on the strain, the sexes can be separated as early as one week, but definitely by 4 weeks. The females will have the small dark area on the abdomen (gravid spot), and the males will not. By three months, they could be breeding, so I wouldn't wait that long if you absolutely do not want more babies.
Assuming you have at least three tanks (or two, one with a divider), the best thing is to separate the ones that are obviously males or females, and then just hold off on the "maybes." Keep in mind that it is better to have one or two females in with all the males, then to have even one male in with all the females.