If you are talking about doing it yourself and you're not a wing sexing or vent sexing expert, the first secondary sex characteristics start showing up around four to six weeks. That is the earliest you can expect to take an educated guess and be right about it.
The sex-links being the exception to that rule.
Here, this might help:
according to UC Davis Veterinary Care Program.
2. Physical Characteristics (4-6 weeks of age)
a. Comb The cockerels comb is medium size and pinkish, the pullets is small and yellowish.
b. Legs The cockerels legs are sturdy and long, the pullets are finer and shorter.
c. Tail The cockerels tail is stumpy and curved, the pullets is longer and straight.
d. Back The cockerel has a thin line of stub feathers down the center of his back, the pullet has more advanced feathering along the center of her back.
e. Side of neck, flank and crop The feathering in the cockerel in these areas is poorly advanced, the pullets feathering in these areas is well advanced.
f. Wing bows In the cockerel the wing bows are bare, in pullets the wing bows are covered with small feathers.