The strength of selection in populations has traditionally been inferred by measuring changes in bulk population parameters, such as mean reproductive rates. Untangling the effect of selection from other factors, such as specific responses to environmental fluctuations, poses a significant problem both in microbiology and in other fields, including cancer biology and immunology, where selection occurs within phenotypically heterogeneous populations of cells. Using "individual histories"-temporal sequences of all reproduction events and phenotypic changes of individuals and their ancestors-we present an alternative approach to quantifying selection in diverse experimental settings. Selection is viewed as a process that acts on histories, and a measure of selection that employs the distribution of histories is introduced. We apply this measure to phenotypically structured populations in fluctuating environments across different evolutionary regimes. Additionally, we show that reproduction events alone, recorded in the population's tree of cell divisions, may be sufficient to accurately measure selection. The measure is thus applicable in a wide range of biological systems, from microorganisms-including species for which genetic tools do not yet exist-to cellular populations, such as tumors and stem cells, where detailed temporal data are becoming available.phenotypic diversity | selection strength | statistical mechanics | stochastic switching | fundamental theorem of natural selection