Predicting the stability of chemical compounds as a function of solution chemistry is crucial towards understanding the electrochemical characteristics of materials in real-world applications. There are several commonly considered factors that affect the stability of a chemical compound, such as metal ion concentration, mixtures of ion concentrations, pH, buffering agents, complexation agents, and temperature. Chemical stability diagrams graphically describe the relative stabilities of chemical compounds, ions, and complexes of a single element as a function of bulk solution chemistry (pH and metal ion concentration) and also describe how solution chemistry changes upon the thermodynamically driven dissolution of a species into solution as the system progresses towards equilibrium. Herein, we set forth a framework for constructing chemical stability diagrams, as well as their application to Mg-based and Mg-Zn-based protective coatings and lightweight Mg-Li alloys. These systems are analyzed to demonstrate the effects of solution chemistry, alloy composition, and environmental conditions on the stability of chemical compounds pertinent to chemical protection. New expressions and procedures are developed for predicting the final thermodynamic equilibrium between dissolved metal ions, protons, hydroxyl ions and their oxides/hydroxides for metal-based aqueous systems, including those involving more than one element. The effect of initial solution chemistry, buffering agents, complexation agents, and binary alloy composition on the final equilibrium state of a dissolving system are described by mathematical expressions developed here. This work establishes a foundation for developing and using chemical stability diagrams for experimental design, data interpretation, and material development in corroding systems.