I usually wait until about 8 weeks. By then the roosters combs are more developed as are their tail feathers (they tend to stick up).
The neck feathers on roosters are pointy ended and the neck feathers on hens are round ended so use a small piece of cardboard to see if the feathers are round tipped or pointy tipped. The hens look more matronly by then too.
Hope thet helps.