Another indicator are nipples. Only the females have them. Most of the time the males will kind of suck them in, so when that happens you can just look for nipples.
I used the nipple test to sex the little ones. I can sex them pretty reliably at about 10 days with the nipple method.
If I am just holding back females for breeding I will cull all of the male babies as soon as they are old enough to sex. This allows the females to feed more heavily and gives them a good spurt in growth.
However, for mice or rats that are at least 4 weeks old...the nutsack should be pretty visible lol.