Most investigations of the forces shaping protein evolution have focused on protein function. However, cells are typically 50%-75% protein by dry weight, with protein expression levels distributed over five orders of magnitude. Cells may, therefore, be under considerable selection pressure to incorporate amino acids that are cheap to synthesize into proteins that are highly expressed. Such selection pressure has been demonstrated to alter amino acid usage in a few organisms, but whether "cost selection" is a general phenomenon remains unknown. One reason for this is that reliable protein expression level data is not available for most organisms. Accordingly, I have developed a new method for detecting cost selection. This method depends solely on interprotein gradients in amino acid usage. Applying it to an analysis of 43 whole genomes from all three domains of life, I show that selection on the synthesis cost of amino acids is a pervasive force in shaping the composition of proteins. Moreover, some amino acids have different price tags for different organisms--the cost of amino acids is changed for organisms living in hydrothermal vents compared with those living at the sea surface or for organisms that have difficulty acquiring elements such as nitrogen compared with those that do not--so I also investigated whether differences between organisms in amino acid usage might reflect differences in synthesis or acquisition costs. The results suggest that organisms evolve to alter amino acid usage in response to environmental conditions.