Parallel evolution is the repeated evolution of the same phenotype or genotype in evolutionarily independent populations. Here, we use evolve-and-resequence experiments with bacteria and yeast to dissect the drivers of parallel evolution at the gene level. A meta-analysis shows that parallel evolution is often rare, but there is a positive relationship between population size and the probability of parallelism. We present a modeling approach to estimate the contributions of mutational and selective heterogeneity across a genome to parallel evolution. We show that, for two experiments, mutation contributes between $10 and 45%, respectively, of the variation associated with selection. Parallel evolution cannot, therefore, be interpreted as a phenomenon driven by selection alone; it must also incorporate information on heterogeneity in mutation rates along the genome. More broadly, the work discussed here helps lay the groundwork for a more sophisticated, empirically grounded theory of parallel evolution.