Cancer develops as a result of somatic mutation and clonal selection, but quantitative measures of selection in cancer evolution are lacking. We applied methods from evolutionary genomics to 7,664 human cancers across 29 tumor types. Unlike species evolution, positive selection outweighs negative selection during cancer development. On average, <1 coding base substitution/tumor is lost through negative selection, with purifying selection only detected for truncating mutations in essential genes in haploid regions. This allows exome-wide enumeration of all driver mutations, including outside known cancer genes. On average, tumors carry ~4 coding substitutions under positive selection, ranging from <1/tumor in thyroid and testicular cancers to >10/tumor in endometrial and colorectal cancers. Half of driver substitutions occur in yet-to-be-discovered cancer genes. With increasing mutation burden, numbers of driver mutations increase, but not linearly. We identify novel cancer genes and show that genes vary extensively in what proportion of mutations are drivers versus passengers.