We develop a quantitative framework for exploring how individuals trade off the utility benefit of social activity against the internal and external health risks that come with social interactions during a pandemic. We calibrate the model to external targets and then compare its predictions with daily data on social activity, fatalities, and the estimated effective reproduction number R(t) from the COVID-19 pandemic in March-June 2020. While the laissez- faire equilibrium is consistent with much of the decline in social activity that we observed in US data, optimal policy further imposes immediate and highly persistent social distancing. Notably, neither equilibrium nor optimal social distancing is extremely restrictive, in the sense that the effective reproduction number never falls far below 1. The expected cost of COVID-19 in the US is substantial, $12,700 in the laissez-faire equilibrium and $8,100 per person under an optimal policy. Optimal policy generates this large welfare gain by shifting the composition of costs from fatalities to persistent social distancing.