An updated version of this post can now be found here: http://arrogantscientist.wordpress.com/sexing-drosophila/
Being able to tell male Drosophila apart from female Drosophila is about the most basic requirement for Drosophila genetics. There’s nothing dumber than trying to mate two females together, or more frustrating than putting a male in with a vial full of virgins (for you that is, I’m sure the male would disagree).
So, here are three ways to tell them apart.
The Bad Way

Male (left) and Female (right) wild-type Drosophila (OregonR).
The above picture shows a clear difference in size between the male and female flies, but the place to look here is the lower abdomen – the tergites here are black on the male and not in the female. This is simple, but in practice it is not a good way to tell them apart. The different body shapes and colours between stocks and individuals can vary significantly, and the distinction is rarely as clear as above. Often, inexperienced people use this as the way to tell them apart, but if you do, you will at some point get stuck, and are very likely to make a mistake.
The Right Way
Male Drosophila have a patch of bristles (the black bits above) on their forelegs, used during courtship, that females do not. If it has sex combs, it’s a male. This method is probably the most accurate, but rarely used to sex drosophila in practice. It would take far too long to look at the forelegs of every fly you need, when it is possible to sex the fly from a distance (especially since you have to know what you’re looking for to even be able to notice the sex combs).
The Best Way
Ideally, you need to be able to sex flies accurately, but quickly. The best method is to simply look at their genitals.

Drosophila genitals, front view. (Male left, female, right).
These rarely differ in appearance between individuals, and can be seen from a distance and from various angles.

Drosophila genitals, side view. (Male left, female, right).
In practice, someone experienced in sexing flies will use a combination of these three methods. With a little practice, it is easy to become proficient at separating males from females, no matter what phenotypes the flies may have.
Things to remember
Depending on the genotype, age, conditions and other factors, individuals can vary significantly. If in doubt, try verifying using the sex combs, but if you can’t, just don’t use the fly.
If it has has an egg sticking out of it… it’s a female.
Males are not always smaller than females (especially if you are dealing with tubby mutants – often found on TM balancers).
Hermaphrodites can occur, but they’re very rare. I might have a picture of one I found somwhere…

Helpful and fun to read i love the pics
Thanks = )
By: Marie on January 5, 2012
at 8:27 pm
Hi,
Your photos about sexing flies are really nice! Would you object if we were to reproduce these with attribution for the manual for the laboratory course we run at Cornell?
Sincerely,
Mike Goldberg
By: Michael L. Goldberg on May 30, 2012
at 4:27 pm
Hi Mike,
I’d be more than happy for you to use my pictures. If you drop me an email (arrogantscientist@googlemail.com), I can give you better versions with the lighting corrected and no text.
By: arrogantscientist on May 31, 2012
at 6:18 pm
Does the female in the top photo have an egg sticking partway out of her? I can see something small, round and translucent at the very tip of her abdomen, and I don’t know if it’s an egg or just part of her.
These are really wonderful photos!
By: Lindsay on June 2, 2012
at 1:09 am
That little “knob” is not an egg, it’s part of the female, although I confess I don’t know what it’s called. The eggs are actually somewhat larger and are pearly white.
By: arrogantscientist on June 2, 2012
at 8:08 pm
The little “knob” as you call it is the gonopod of segment 8 or in layman terms the vaginal plate.
By: Julia on July 4, 2012
at 9:01 am
[...] More fly sexing resources [...]
By: More fun with genetics | HS Biology IB on March 14, 2013
at 12:58 am