PCR has revolutionized many aspects of biochemistry and molecular biology research. In the following exercise, students learn PCR by isolating their own DNA, amplifying specific segments of the X and Y chromosomes, and estimating the sizes of the PCR products using agarose gel electrophoresis. Based on the pattern of PCR products, students can distinguish between male and female samples and determine the gender of an unknown DNA donor. The exercise is presented for upper division undergraduate majors in microbiology, biochemistry, and molecular biology, but can be adapted to different academic levels and disciplines. The use of student samples in the exercise can enhance learning of these techniques by making PCR and agarose gel electrophoresis directly relevant to the students.