Plant biodiversity can enhance primary production in terrestrial ecosystems, but biodiversity effects are largely unstudied in the ocean. We conducted a series of field and mesocosm experiments to measure the relative effects of macroalgal identity and richness on primary productivity (net photosynthetic rate) and biomass accumulation in hard substratum subtidal communities in North Carolina, USA. Algal identity consistently and strongly affected production; species richness effects, although often significent, were subtle. Partitioning of the net biodiversity effect indicated that complementarity effects were always positive and species were usually more productive in mixtures than in monoculture. Surprisingly, slow growing species performed relatively better in the most diverse treatments than the most productive species, thus selection effects were consistently negative. Our results suggest that several basic mechanisms underlying terrestrial plant biodiversity effects also operate in algal-based marine ecosystems, and thus may be general.