We analyse an oligopoly model incorporating horizontal differentiation and quality differences. High quality goods are overpriced and underproduced. When the market is fairly well covered, low quality products may be profitable when their net social contribution is negative, implying excessive entry. In a relatively uncovered market, even low quality goods are underproduced and there may be underentry. When fixed costs are independent of quality, the market tends to select the right firms. Otherwise, the market may produce low quality products when it should produce high quality ones. The model is calibrated using market data for yoghurt.