Thermodynamic equilibrium calculation is sometimes difficult in a system when minor but important species are present, when only stoichiometric condensed phases are stable and the gas phase is absent, and when multiple minima are present in the Gibbs energy of some non-ideal solution phases. A new program is being developed to overcome these problems. The Gibbs energy minimization method has been implemented to determine the thermodynamic equilibrium similar to other conventional programs. When the system is singular, however, the chemical potentials of the system components are uniquely determined by taking additional minimization of the molar Gibbs energy of the gas phase. Accordingly, the vapor pressure, for instance, is always determined even when only pure condensed phases are active and the gas phase is absent at equilibrium. Furthermore, an automatic routine that introduces multiple phases of different compositions and checks their stability has been implemented to detect possible phase splitting in non-ideal solution phases.