Here I test the hypothesis that temporal variation in geographic range size within genera is affected by the expansion and contraction of their preferred environments. Using occurrence data from the Paleobiology Database, I identify genera that have a significant affinity for carbonate or terrigenous clastic depositional environments that transcends the Database's representation of these environments during the stratigraphic range of each genus. These affinity assignments are not a matter of arbitrarily subdividing a continuum in preference; rather, genera form distinct, nonrandom subsets with respect to environmental preference. I tabulate the stage-by-stage transitions in range size within individual genera and the stage-by-stage changes in the extent of each environment. Comparing the two shows that genera with a preference for a given environment are more likely to increase in geographic range, and to show a larger average increase in range, when that environment increases in areal extent, and likewise for decreases in geographic range and environmental area. Similar results obtain for genera with preferences for reefal and non-reef settings. Simulations and subsampling experiments suggest that these results are not artifacts of methodology or sampling bias. Nor are they confined to particular higher taxa. Genera with roughly equal preference for carbonates and clastics do not have substantially broader geographic ranges than those with a distinct affinity, suggesting that, at this scale of analysis, spatial extent of preferred environment outweighs breadth of environmental preference in governing geographic range. These results pertain to changes over actual geologic time within individual genera, not overall average ranges. Recent work has documented a regular expansion and contraction when absolute time is ignored and genera are superimposed to form a composite average. Environmental preference may contribute to this pattern, but its role appears to be minor, limited mainly to the initial expansion and final contraction of relatively short-lived genera.