A new method for the calculation of simultaneous chemical and phase equilibria at specified temperature and pressure is presented. An algorithm previously proposed for isothermal multiphase flash problems is extended and modified for systems with reversible chemical reactions. A method for the automatic selection of independent chemical reactions is improved and extended to nonideal mixtures. The iterative calculations are initialized with an accelerated direct substitution procedure. A second-order minimization algorithm is utilized for the final iterations. The differential phase stability test is applied to verify the need for adding new phases to the system. Phase removal is tried even for two-phase systems whereas, in flash problems without reaction, phase removal only needs to be attempted for systems with three or more phases. Examples that illustrate the performance of the method for mixtures with nonideal phases are presented.