How does a developing baby decide if it’s going to be a boy or a girl?
With mammals, like us, it’s in the genes. You’re a boy if you have boy genes (an X chromosome and a Y chromosome) and you’re a girl if you have girl genes (two X chromosomes).
Reptiles do it differently. They determine their gender by the temperature of the eggs! For turtle eggs buried in the sand, warmer sand means more girls and cooler sand means more boys.
The exact temperature that makes the difference depends on the species of turtle. For example, For North Carolina loggerheads, sand that is 28°C (82°F) or less will be mostly males (boys), while sand warmer than 32°C (90°F) will be mostly females (girls). Sand that is between those two temperatures will have a mixture of male and female hatchlings (Girondot, 1999).
The temperature of the eggs will depend on a lot of factors, including where the nest is – in the sun or in the shade – and where in the nest the egg itself is. Eggs in the center of the nest will be warmer than eggs on the edges of the nest.
Loggerhead Sex Determination Temperature Profile
Girondot, M. (1999). Statistical description of temperature-dependent sex determination using maximum likelihood. Evol. Ecol. Res. 1, 479-486.