The popular press often touts workforce demographic diversity as profit enhancing because it may reduce the firm's communication costs with particular segments of customers or yield greater team problem-solving abilities. On the other hand, diversity also may raise communication costs within teams, thereby retarding problem solving and lowering productivity. Unfortunately, there is little empirical research that disentangles the above countervailing effects. Diversity in ability enhances the team productivity if there is significant mutual learning and collaboration within the team, while demographic diversity may harm productivity by making learning and peer pressure less effective and increasing team-member turnover. We evaluate these propositions using a novel panel data from a garment plant that shifted from individual piece rate to group piece rate production over three years. Because we observe individual productivity data, we are able to econometrically distinguish between the impacts of diversity in worker abilities and demographic diversity. Teams with more heterogeneous worker abilities are more productive at the plant. Holding the distribution of team ability constant, teams composed of only one ethnicity (Hispanic workers in our case) are more productive, but this finding does not hold for marginal changes in team composition. We find little evidence that workers prefer to be segregated; demographically diverse teams are no more likely to dissolve, holding team productivity (and hence pay) constant, than homogeneous teams.