We measure the welfare consequences of endogenous quality choice in imperfectly competitive markets. We introduce the concept of a "quality markup" and measure the relative importance for welfare of market power over price versus market power over quality. For U.S. cable-television markets between 1997-2006, we find that prices are 33% to 74% higher and qualities 23% to 55% higher than socially optimal. This "quality inflation" contradicts classic results in the literature and reflects our flexible specification of consumer preferences. Furthermore, we find market power over quality is responsible for 54% of the total welfare change from endogenous prices and qualities.