Antibiotic resistance can impair bacterial growth or competitive ability in the absence of antibiotics, frequently referred to as a 'cost' of resistance. Theory and experiments emphasize the importance of such effects for the distribution of resistance in pathogenic populations. However, recent work shows that costs of resistance are highly variable depending on environmental factors such as nutrient supply and population structure, as well as genetic factors including the mechanism of resistance and genetic background. Here, we suggest that such variation can be better understood by distinguishing between the effects of resistance mechanisms on individual traits such as growth rate or yield ('trait effects') and effects on genotype frequencies over time ('selective effects'). We first give a brief overview of the biological basis of costs of resistance and how trait effects may translate to selective effects in different environmental conditions. We then review empirical evidence of genetic and environmental variation of both types of effects and how such variation may be understood by combining molecular microbiological information with concepts from evolution and ecology. Ultimately, disentangling different types of costs may permit the identification of interventions that maximize the cost of resistance and therefore accelerate its decline.