The formation of basaltic crust at mid-ocean ridges and ocean islands provides a window into the compositional and thermal state of the Earth's upper mantle. But the interpretation of geochemical and crustal-thickness data in terms of magma source parameters depends on our understanding of the melting, melt-extraction and differentiation processes that intervene between the magma source and the crust. Much of the quantitative theory developed to model these processes has neglected the role of water in the mantle and in magma, despite the observed presence of water in ocean-floor basalts. Here we extend two quantitative models of ridge melting, mixing and fractionation to show that the addition of water can cause an increase in total melt production and crustal thickness while causing a decrease in mean extent of melting. This may help to resolve several enigmatic observations in the major- and trace-element chemistry of both normal and hotspot-affected ridge basalts.