The free-living nematode Caenorhabditis elegans is distributed globally and found in many varied habitats. However, in comparison to our understanding of the genetics of the species, little is known about natural variation and many major life history traits appear to show only limited differences between isolates. Here we show that temperature affects the lifetime fecundity and the reproductive timing of C. elegans and that there is a genotype by environment interaction, with isolates varying in how lifetime fecundity changes with temperature. We show that the lower lifetime fecundity observed at higher temperatures is primarily due to a reduction in the number of functional sperm. Further, isolates vary in their lifetime fecundity because of inter-isolate differences in this effect of temperature on the number of functional sperm.