The Mg/Ca ratio of seawater has changed significantly over the Phanerozoic, primarily as a function of the rate of ocean-crust production. Echinoids, crabs, shrimps, and calcareous serpulid worms grown in artificial seawaters encompassing the range of Mg/Ca ratios that existed throughout the Phanerozoic exhibit a direct nonlinear relationship between skeletal and ambient Mg/Ca. Specimens grown in seawater with the lowest Mg/Ca (∼1) changed their mineralogy to low-Mg calcite (<4 mol% MgCO3), suggesting that these high-Mg calcareous organisms would have produced low-Mg calcite in the Cretaceous, when oceanic Mg/Ca was lowest (∼1). These results support the empirical evidence that the skeletal chemistry of calcareous organisms has varied significantly over the Phanerozoic as a function of the Mg/Ca of seawater, and that the Mg/Ca of unaltered fossils of such organisms may be a record of oceanic Mg/Ca throughout the Phanerozoic. Mg fractionation algorithms, which relate skeletal Mg/Ca, seawater Mg/Ca, and temperature, were derived from these and other experiments. They can be used to estimate paleoceanic Mg/ Ca ratios and temperatures from fossil skeletal Mg/Ca of the organisms evaluated. Pale oceanic Mg/Ca ratios, recalculated by using the echinoderm Mg fractionation algorithm from published fossil echinoid Mg/Ca, crinoid Mg/Ca, and paleotemperature data, are consistent with other estimates and models of oceanic Mg/Ca over the Phanerozoic.