A robust multiphase equilibrium calculation algorithm with pressure and enthalpy (PH) specifications, i.e., an isenthalpic algorithm, plays an important role in the compositional simulations of steam-based enhanced oil recovery (EOR) applications (such as steam and solvent co-injection process for heavy oil recovery). Up to now, there are few works documented in the literature focusing on four-phase isenthalpic algorithms. In this paper, we propose a four-phase isenthalpic algorithm with a nested approach. It contains an inner loop and an outer loop. In the inner loop, a well-designed isobaric/isothermal (PT) multiphase (up to four phases) equilibrium algorithm is employed to solve the phase fractions and compositions, while the Brent's method (1971) is applied in the outer loop to update the temperature by satisfying the energy conservation equation. We test the performance of the proposed algorithm using four case studies under different pressure-enthalpy conditions. Calculation results demonstrate that the proposed PH algorithm is always able to converge to the correct phase equilibria with only tens of PT algorithm calls.