Uptake and storage of anthropogenic carbon dioxide in the ocean is related to the reaction of dissolved carbon dioxide with water to form bicarbonate (and minor quantities of carbonic acid and carbonate). Alkalinity, the excess of bases in solution, governs the efficiency at which this occurs and provides buffering capacity towards acidification. Here I present the biogeochemical processes impacting the ocean carbonate system over multipletimescales. Over geological time scales alkalinity input to the ocean from weathering should be in balance with removal via carbonate mineral burial in the sea. However, a re -evaluation of the modern oceanicalkalinity balance revealed that the so far neglected riverine delivery of particulate inorganic carbon should be included to balance inputs and outputs. Next I present a retrodiction of ocean alkalinity, dissolved inorganic carbon and pH over the last 50 million years.