Carbon dioxide (CO2) flooding has been widely applied to enhance oil recovery. In low temperature CO2 injection cases, three hydrocarbon phases may be formed at equilibrium. Given the fact that connate water always exists in formations, and in many cases water injection precedes CO2 injection, four-phase equilibrium may arise where one aqueous phase plus three hydrocarbon phases coexist. In cases where CO2 dissolution into water cannot be ignored, a robust and efficient four-phase equilibrium calculation framework is necessary for a compositional reservoir simulator. This is challenging not only because the number of variables increases but also because stability analysis becomes much complicated as the number of phases increases. In this research, a novel four-phase equilibrium calculation framework is proposed for a compositional reservoir simulator. A reduced variables method is adopted to solve four-phase flash problems efficiently and robustly. Multiphase flash calculations using reduced variables (RV) can converge to the equilibrium solution faster than formulations using conventional variables (Petitfrere and Nichita, 2015). Also RV solves numerical problem in Newton iterations with trace components in aqueous phase. In addition to the implementation of the RV formulation, a systematic procedure consisting of stability analysis and flash calculations is proposed without any prior knowledge of initial K-values. Sets of different initial K-values are appropriately tested in each stability analysis. We perform comprehensive testing using characterized fluids found in publications, in order to validate robustness of the proposed procedure. The four-phase regions in pressure-composition (PX) space can be accurately identified using our procedure. On the other hand, some points are mistakenly evaluated as the three-phase state if the existing approaches such as Li and Firoozabadi (2012) are used, as in the case of previously published articles on four-phase equilibrium calculations. Our framework proposed in this paper is a promising four-phase equilibrium calculation framework for a compositional reservoir simulator. The procedure achieves excellent robustness and efficiency with minimal modification to the conventional two or three-phase equilibrium calculation framework.