Do we need to wait till a Zygote forms?
Quite early when combined with IVF.
At present there are two method that are available for use.
The first is genetic testing of preimplantation genetic screening (PGS). A single cell is taken from the embryo and tested for sex by genetic testing. Only the right sex embryo is implanted. http://www.babycenter.com/0_choosing-your-babys-sex-what-the-scientists-say_2915.bc?page=1
The second method is the Ericsson method, which is based on the fact that Y sperm swim faster than X sperm, as the Y sperm are smaller. http://www.babycenter.com/0_choosing-your-babys-sex-what-the-scientists-say_2915.bc?page=2
At present there is also a 3rd method that is used in animals but has not gain FDA approval for human use. And that is sperm sorting using florescence activated cell sorting (FACS). In this method a flow cyctometer is used in conjunction with a non-toxic cell permeable DNA dye. the idea here is to sort sperm based on their DNA content. X sperm have more DNA than Y sperm as the X chromosome is bigger than the Y chromosome. This method is called Microsort https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4256056/. Primary concerns is that the DNA might cause DNA damage.
An older method that was greatly used between 1970 to early 1980s to sort sperm by sex was density gradient centrifugation. The idea being X sperm being denser than Y sperm as the X chromosome is bigger than the Y. This method of gender sorting is still available in some IVF clinics but medical studies indicate that the method is ineffective http://www.ingender.com/gender-selection/ericsson/Percoll.aspx
More stuff to read about
Before the zygote, there is no individual for which sex can be defined! However, it is possible to know the sex of the future zygote if you know the gametes that are going to fuse.
In humans, just like in all placental mammals (which excl. kangaroos and platypus), sex is defined by sexual chromosomes, where males are
XY while females are
XX. A mother can therefore only pass on an
X (and have no influence on the sex of the offspring) while a father can pass on either an
X or a
Y which will determine the sex of the offspring. Knowing the paternal gamete (the spermatozoid), one can infer what the sex of the future offspring will be. Of course, in one ejaculate, there are about as many
X-bearing gametes than
Technically speaking, could typically make a karyotype to infer whether chromosome
Y is being transmitted.