Abstract. In this paper we quantify the total cost of an epidemic spreading through a social network, accounting for both the immunization and disease costs. Previous research has typically focused on determining the optimal strategy to limit the lifetime of a disease, without considering the cost of such strategies. In the large graph limit, we calculate the exact expected disease cost for a general random graph, and we illustrate it for the specific example of an Erdös-Rényi network. We also give an upper bound on the expected disease cost for finite-size graphs, and show through simulation that the upper bound is tight for Erdös-Rényi networks and graphs with exponential degree distributions. Finally, we study how to optimally perform a one-shot immunization to minimize the social cost of a disease, including both the cost of the disease and the cost of immunization.