Changes in marine primary production over geological time have influenced a network of global biogeochemical cycles with corresponding feedbacks on climate. However, these changes continue to remain largely unquantified because of uncertainties in calculating global estimates from sedimentary palaeoproductivity indicators. I therefore describe a new approach to the problem using a mass balance analysis of the stable isotopes (18O/16O) of oxygen with modelled O2 fluxes and isotopic exchanges by terrestrial vegetation for 300, 150, 100 and 50 million years before present, and the treatment of the Earth as a closed system, with respect to the cycling of O2. Calculated in this way, oceanic net primary productivity was low in the Carboniferous but high (up to four times that of modern oceans) during the Late Jurassic, mid-Cretaceous and early Eocene greenhouse eras with a greater requirement for key nutrients. Such a requirement would be compatible with accelerated rates of continental weathering under the greenhouse conditions of the Mesozoic and early Tertiary. These results indicate possible changes in the strength of a key component of the oceanic carbon (organic and carbonate) pump in the geological past, with a corresponding feedback on atmospheric CO2 and climate, and provide an improved framework for understanding the role of ocean biota in the evolution of the global biogeochemical cycles of C, N and P.