Contact tracing (also known as partner notification) is a primary means of controlling infectious diseases such as tuberculosis (TB), human immunodeficiency virus (HIV), and sexually transmitted diseases (STDs). However, little work has been done to determine the optimal level of investment in contact tracing. In this paper, we present a methodology for evaluating the appropriate level of investment in contact tracing. We develop and apply a simulation model of contact tracing and the spread of an infectious disease among a network of individuals in order to evaluate the cost and effectiveness of different levels of contact tracing. We show that contact tracing is likely to have diminishing returns to scale in investment: incremental investments in contact tracing yield diminishing reductions in disease prevalence. In conjunction with a cost-effectiveness threshold, we then determine the optimal amount that should be invested in contact tracing. We first assume that the only incremental disease control is contact tracing. We then extend the analysis to consider the optimal allocation of a budget between contact tracing and screening for exogenous infection, and between contact tracing and screening for endogenous infection. We discuss how a simulation model of this type, appropriately tailored, could be used as a policy tool for determining the appropriate level of investment in contact tracing for a specific disease in a specific population. We present an example application to contact tracing for chlamydia control.