We modeled equilibrium lead solubility using tidyphreeqc, an R interface for PHREEQC, and pbcusol, an extension of tidyphreeqc. Thermodynamic data relevant to the lead-water-carbonate-orthophosphate system were sourced from Schock et al. (Table ), and activity coefficients were calculated as described in Parkhurst and Appelo. Model inputs were pH, orthophosphate, and dissolved inorganic carbon concentration, calculated from pH and alkalinity. We assumed that lead solubility was controlled by hydroxypyromorphite, a mineral that has been identified in lead pipe corrosion scale recovered from the distribution system we studied here. Since there were not enough paired distribution system data to include aluminum in the model, we fit a separate model to account for aluminum's effect. We calculated hydroxypyromorphite solubility on a grid of orthophosphate and aluminum concentrations at pH 7.5 and 5 mg L -1 of dissolved inorganic carbon, assuming that both hydroxypyromorphite and variscite (AlPO4 • 2H2O) reached equilibrium with the solution.