Population density is an ecological variable that is hypothesized to be a major agent of selection on offspring size. In high-density populations, high levels of intraspecific competition are expected to favor the production of larger offspring. In contrast, lower levels of intraspecific competition and selection for large offspring should be weaker and more easily overridden by direct selection for increased fecundity in low-density populations. Some studies have found associations between population density and offspring size consistent with this hypothesis. However, their interpretations are often clouded by a number of issues. Here, we use data from a 10-year study of nine populations of the least killifish, Heterandria formosa, to describe the associations of offspring size with habitat type, population density, and predation risk. We found that females from spring populations generally produced larger offspring than females from ponds; however, the magnitude of this difference varied among years. Across all populations, larger offspring were associated with higher densities and lower risks of predation. Interestingly, the associations between the two ecological variables (density and predation risk) and offspring size were largely independent of one another. Our results suggest that previously described genetic differences in offspring size are due to density-dependent natural selection.