The variables affecting the occurrence of hydrocarbons in aquifers used for public supply in California were assessed based on statistical evaluation of three large statewide datasets; gasoline oxygenates also were analyzed for comparison with hydrocarbons. Benzene is the most frequently detected (1.7%) compound among 17 hydrocarbons analyzed at generally low concentrations (median detected concentration 0.024 μg/l) in groundwater used for public supply in California; methyl tert-butyl ether (MTBE) is the most frequently detected (5.8%) compound among seven oxygenates analyzed (median detected concentration 0.1 μg/l). At aquifer depths used for public supply, hydrocarbons and MTBE rarely co-occur and are generally related to different variables; in shallower groundwater, co-occurrence is more frequent and there are similar relations to the density or proximity of potential sources. Benzene concentrations are most strongly correlated with reducing conditions, regardless of groundwater age and depth. Multiple lines of evidence indicate that benzene and other hydrocarbons detected in old, deep, and/or brackish groundwater result from geogenic sources of oil and gas. However, in recently recharged (since ~1950), generally shallower groundwater, higher concentrations and detection frequencies of benzene and hydrocarbons were associated with a greater proportion of commercial land use surrounding the well, likely reflecting effects of anthropogenic sources, particularly in combination with reducing conditions.