AbstractBet-hedging evolves in fluctuating environments because long-term genotype success is determined by geometric mean fitness across generations. However, specialist versus generalist strategies are usually considered in terms of arithmetic mean fitness benefits to individuals, as in habitat or foraging preferences. We model how environmental variability affects phenotypic variation within and among individuals to maximize either long-term arithmetic versus geometric mean fitness. For traits with additive fitness effects within lifetimes (e.g. foraging-related traits), genotypes of similar generalists or diversified specialists perform equally well. However, if fitness effects are multiplicative within lifetimes (e.g. sequential survival probabilities), generalist individuals are always favored, since geometric mean fitness favors greater within-individual phenotypic variation than arithmetic mean fitness does. Interestingly, this conservative bet-hedging effect outcompetes diversifying bet-hedging. These results link behavioral and ecological specialization and earlier models of bet-hedging, and thus apply to a range of natural phenomena from habitat choice to host specificity in parasites.Impact summaryWhich factors determine whether it is better to be a specialist or a generalist? Environmental fluctuations are becoming larger and more unpredictable across the globe as a result of human-induced rapid environmental change. A key challenge of evolutionary biology is therefore to understand how organisms adapt to such variation within and among generations, and currently represents a knowledge gap in evolutionary theory. Here we focus on how traits evolve when the (changing) environment determines the optimal value of a trait, so that the optimal trait value changes unpredictably over time. Our mathematical model investigates how much variation is optimal in a trait. We expect specialists (low within-individual trait variation) to be favored in stable environments, with generalists (high trait variation) favored in more variable environments. We show that the answer depends on whether we look from the point of view of the individual or all individuals of the same genotype. If an individual does well in the short term, but its offspring all experience a different environment and therefore do badly, the genotype as a whole is in trouble, and will not be favored in the long term. One solution to this problem could be to produce offspring with different trait values, to ensure that at least some of the offspring do well no matter the environmental conditions they grow up in. This “don’t put all your eggs in one basket” diversification strategy is well-known in some organisms, but how helpful is it if there is also some within-individual (i.e. generalist) trait variation? By answering these questions under various environmental scenarios, we link together many different concepts in evolutionary ecology and animal behavior, increasing our understanding about how organisms may cope with the current changes in environmental conditions around the world.