Two common means of controlling infectious diseases are screening and contact tracing. Which should be used, and when? We consider the problem of determining the cheapest mix of screening and contact tracing necessary to achieve a desired endemic prevalence of a disease or to identify a specified number of cases. We perform a partial equilibrium analysis of small-scale interventions, assuming that prevalence is unaffected by the intervention; we develop a full equilibrium analysis where we compare the long-term cost of various combinations of screening and contact tracing needed to achieve a given equilibrium prevalence; and we solve the problem of minimizing the total costs of identifying and treating disease cases plus the cost of untreated disease cases. Our analysis provides several insights. First, contact tracing is only cost effective when prevalence is below a threshold value. This threshold depends on the relative cost per case found by screening versus contact tracing. Second, for a given contact tracing policy, the screening rate needed to achieve a given prevalence or identify a specified number of cases is a decreasing function of disease prevalence. As prevalence increases above the threshold (and contact tracing is discontinued), the screening rate jumps discontinuously to a higher level. Third, these qualitative results hold when we consider unchanged or changed prevalence, and short-term or long-term costs.