Abstract. Modelers compute ocean carbonate chemistry often based on code from the Ocean Carbon Cycle Model Intercomparison Project (OCMIP), last revised in 2005. Here we offer improved publicly available Fortran 95 routines to model the ocean carbonate system (mocsy 2.0). Both codes take as input dissolved inorganic carbon C T and total alkalinity A T , tracers that are conservative with respect to mixing and changes in temperature and salinity. Both use the same thermodynamic equilibria to compute surface-ocean pCO 2 and simulate air-sea CO 2 fluxes, but mocsy 2.0 uses a faster and safer algorithm (SolveSAPHE) to solve the alkalinitypH equation, applicable even under extreme conditions. The OCMIP code computes only surface pCO 2 , while mocsy computes all other carbonate system variables throughout the water column. It also avoids three common model approximations: that density is constant, that modeled potential temperature is equal to in situ temperature, and that depth is equal to pressure. Errors from these approximations grow with depth, e.g., reaching 3 % or more for pCO 2 , H + , and A at 5000 m. The mocsy package uses the equilibrium constants recommended for best practices. It also offers two new options: (1) a recently reassessed total boron concentration B T that is 4 % larger and (2) new K 1 and K 2 formulations designed to include low-salinity waters. Although these options enhance surface pCO 2 by up to 7 µatm, individually, they should be avoided until (1) best-practice equations for K 1 and K 2 are reevaluated with the new B T and (2) formulations of K 1 and K 2 for low salinities are adjusted to be consistent among pH scales. The common modeling practice of neglecting alkalinity contributions from inorganic P and Si leads to substantial biases that could easily be avoided. With standard options for best practices, mocsy agrees with results from the CO2SYS package within 0.005 % for the three inorganic carbon species (concentrations differ by less than 0.01 µmol kg −1 ). Yet by default, mocsy's deep-water f CO 2 and pCO 2 are many times larger than those from older packages, because they include pressure corrections for K 0 and the fugacity coefficient.