Raccoons have distinctive markings that make them easily recognizable as raccoons, but the males and females look very much the same. Determining the gender of a raccoon on sight can be a bit of a challenge. Observe habits of adults closely; with orphaned babies, you or an expert can sex them with an up-close and personal inspection.
Genitals Tell the Tale
While it's difficult to see the genitals on a grown raccoon, since they're covered in fur and you don't want to get close to wild ones, it's easy to sex baby raccoons, also called kits. If you are raising a litter, you can check their genitals, much like sexing puppies. Both boys and girls have what look like small bumps when they are babies, and placement is key. When you look at a raccoon lying on its back, you will see the anus directly below the tail. In front of the anus is the genitals; if the bump is slit-shaped and between the legs, quite close to the anus, it's the female vulva. If it's slightly longer and located more towards the middle of the belly, it's the male penis.
Adult raccoons weigh between 10 to 30 pounds or more, and males are usually larger than females. Males may have slightly wider faces.
Females are often seen in family groups. If you see a raccoon with babies trailing behind her, then she is certainly female. If you see one foraging for food during the day, you're likely witnessing a nursing mom. Adult males are solitary animals, and their territories cover about a square mile -- bigger than a female's. Neither gender is normally aggressive unless it feels threatened. Females who are protecting their young tend to become aggressive with less provocation.
If the raccoon in question is in your attic, it's probably a female. Mother raccoons seek out remote spaces like attics to raise their young on their own -- fathers don't participate in raising babies. Very determined and devoted parents, mother raccoons will trek miles to be reunited with her kits, so removing them from their babies won't keep them from returning. Professional animal control companies will responsibly deal with this for you, usually placing young with wildlife rehabilitators.