The formation and stability of Mg(2+) and Ca(2+)-phytate complexes was studied potentiometrically using an ISE-H(+) electrode. Measurements were performed at 10 degrees C and 25 degrees C in NaCl(aq) in the ionic strength range 0.1< or =I< or =0.75 mol L(-1). For both magnesium and calcium systems, the formation of ten M(i)PhyH(j)((12-2i-j)-) species was observed in the range 3< or =pH< or =7 with i=1, 2, 3 and j=3, 4, 5 (and i=3, j=2). These species are quite stable; here we report for example some quantitative data for the species Ca(i)PhyH(3)((9-2i)-), i=1, 2, 3 (equilibrium iCa(2+)+H(j)Phy((12-j)-)=Ca(i)PhyH(j)((12-j-2i)-): K(ij)) at I=0.25 mol L(-1) and t=25 degrees C: logK(13)=3.42, logK(23)=6.47 and logK(33)=9.41. The speciation of the Ca(2+)-phytate system was also checked by ISE-Ca(2+) measurements. Dependence on ionic strength was modeled using a simple Debye-Hückel type equation and formation constants were calculated at infinite dilution. The stability constants of complexes formed at pH>7 were estimated using an empirical predictive equation. The sequestering ability of phytate towards Mg(2+) and Ca(2+) was calculated in different experimental conditions and compared with those of other chelating agents.