I. INTRODUCTION On a typical day in the United States, roughly 300,000 untried defendants are incarcerated and 700,000 are free on bail. (1) While the tradeoffs a judge must consider when setting bail are well-recognized, what level of bail is optimal is an open question. Our objective is to provide a rigorous framework for understanding bail policy and to estimate socially optimal levels of bail. The objectives of this study are to provide a rigorous framework for understanding bail policy, to estimate socially optimal levels of bail, and to contribute to the literature on policy evaluation by exploring the welfare implications of one specific publicly provided good with externalities (freedom from jail) that has measurable costs and benefits. Following Landes (1973, 1974), we explicitly model the process of bail setting as a welfare maximization problem in which an optimal social planner would seek to minimize the total cost incurred by society. The four costs that enter the planner's problem are the social cost of jailing the defendant, the private cost to the defendant from being incarcerated, the cost of crimes a defendant may commit while awaiting trial, and the cost to society of a criminal absconding. An increase in bail levels would lead to higher numbers of defendants who could not afford to post bail and would have to remain in jail until their trials. Detaining these additional individuals would impose costs on the justice system (who must feed, house, and monitor the incarcerated defendants) and also on the defendants, who would suffer from lost freedom. A decrease in bail levels would increase the number of defendants who could afford to post bail. The justice system and potential victims would then face the risks of these defendants possibly absconding and/or committing new crimes. The current study examines how to optimally balance these various consequences of changing the level of bail. First, we empirically estimate the effects of bail levels on the fraction of defendants posting, fleeing, and committing crimes during pre-trial release. Next, we assemble estimates of the per-unit costs associated with each of these pre-trial outcomes. We then combine these per-unit costs with our estimated causal relationships to measure the total cost incurred by society as a causal function of bail levels. Finally, using our estimates, we calculate optimal bail levels for different types of defendants, and we make recommendations for social welfare-maximizing bail policies. Ordinary least squares estimates of the effects of bail are likely to suffer from omitted variables bias. For example, judges assign higher bail levels to defendants deemed as dangerous in ways that may be unobservable to the econometrician. These defendants will also be more likely to commit subsequent crimes or to abscond. The omission of the dangerous variable will cause ordinary least squares to understate the effects of bail on flight and rearrest risk. We address this concern by using data from the 1981 Philadelphia Bail Experiment (Goldkamp and Gottfredson 1982). In this experiment, judges randomly assigned to the treatment group were given bail guidelines to use, while members of the control group set bail as they had previously. The bail guidelines caused the treatment judges to set considerably lower levels of bail than those set by the control group. Since defendants were randomly assigned to judges, the experiment induced exogenous variation in the bail levels faced by defendants. This experiment allows us to obtain unbiased estimates of the effects of bail on posting, failure-to-appear at trial, and rearrests. In addition to estimating optimal bail policies, this study contributes to the economics of crime literature by estimating the value that defendants place on 90 d of freedom. This parameter is a necessary input into our estimates of the socially optimal bail and is of interest in its own right. …