The η→3π amplitude is sensitive to the quark mass difference mu−md and offers a unique way to determine the quark mass ratio Q2≡(ms2−mud2)/(md2−mu2) from experiment. We calculate the amplitude dispersively and fit the KLOE data on the charged mode, varying the subtraction constants in the range allowed by chiral perturbation theory. The parameter-free predictions obtained for the neutral Dalitz plot and the neutral-to-charged branching ratio are in excellent agreement with experiment. Our representation of the transition amplitude implies Q=22.0±0.7.