Cost-benefit analysis is a key input for the ex-ante evaluation of public projects and policies. An ideal cost-benefit analysis incorporates all the social costs and benefits of a project for all members of a society. One of the big challenges to achieve this is the need to place monetary values on nonmarketed goods and services. The objective of the presentation is to provide the audience with the basic tools to obtain estimates of willingness to pay from a contingent valuation survey using Stata. The use of the user-written commands singleb and doubleb is illustrated.