Petrogenetic hypotheses involving fractional crystallization, assimilation, or mixing of magmas may be expressed and tested as problems in leastsquares approximation. The calculation uses all of the data and yields a unique solution for each model, thus avoiding the ambiguity inherent in graphical or trial-and-error procedures. The compositional change in the 1960 lavas of Kilauea Volcano, Hawaii, is used to illustrate the method of calculation.