Accelerating rates of species extinction have generated much recent interest in understanding how biodiversity affects the functioning of ecosystems. Experiments to date have shown communities composed of fewer species generally capture a smaller fraction of available resources, and achieve lower standing stock biomass than more diverse communities. However, it is uncertain how changes in biodiversity and the resulting alterations in biomass affect the rates of important ecological processes like primary production, which regulates fluxes of CO2 and O2 between the biotic and abiotic components of the environment. Here we show that species richness influences not only the standing stock biomass of primary producers, but also rates of gross primary production measured by changes in O2 concentrations in aquatic systems. We manipulated the richness of five widespread species of algae in laboratory microcosms and then quantified how richness impacts algal biomass, rates of gross primary production (GPP), and the ratio of production to respiration. Algal biomass increased by a factor of 1.82 for each level of species richness, and GPP by a factor of 1.20, for each additional species. Production to respiration ratios increased about 10% for each additional species, indicating that systems with more species were increasingly autotrophic – that is, they produced more O2 than they consumed, and accumulated CO2 faster than they released it. These trends were driven by two highly productive species that became co-dominant in species rich polycultures at the expense of other taxa. Our experiment suggests that changes in biodiversity may influence not only the rates at which O2 and CO2 are produced and released in ecosystems, but also the total amount of carbon that is sequestered and stored as biomass.