We assess the welfare consequences of occupational licensing for workers and consumers. We estimate a model of labor market equilibrium in which licensing restricts labor supply but also affects labor demand via worker quality and selection. On the margin of occupations licensed differently between U.S. states, we find that licensing raises wages and hours but reduces employment. We estimate an average welfare loss of 12 percent of occupational surplus. Workers and consumers respectively bear 70 and 30 percent of the incidence. Higher willingness to pay offsets 80 percent of higher prices for consumers, and higher wages compensate workers for 60 percent of the cost of mandated investment in occupation-specific human capital.