A new oil–gas Minimum Miscibility Pressure (MMP) calculation algorithm is developed in this work based on the classic cell-to-cell simulation model. The proposed algorithm couples the effects of capillary pressure and confinement in the original cell-to-cell simulation model to predict the oil–gas MMPs in a confined space. Given that the original cell-to-cell algorithm relies on the volume predictions of the reservoir fluids in each cell, a volume-translated Peng-Robinson Equation of State (PR-EOS) is applied in this work for improved accuracy on volume calculations of the reservoir fluids. The robustness of the proposed algorithm is examined by performing the confined MMP calculations for four oil–gas systems. The tie-line length extrapolation method is used to determine the oil–gas MMP in confined space. The oil recovery factor calculated by the proposed MMP calculation algorithm is then used to validate the results. First, to achieve stable modeling results for all four examples, a total cell number of 500 is determined by examining the variations in the oil recovery as a function of cell number. Then, by calculating the oil recovery factor near the MMP region, it is found that the MMP determined by tie-line length method is slightly lower than the inflection point of the oil recovery curve. Through the case studies, the effects of temperature, pore radius, and injection gas impurity on the confined oil–gas MMP calculations are studied in detail. It is found that the oil–gas MMP is reduced in confined space and the degree of this reduction depends on the pore radius. For all the tested pore radii, the confined MMP first increases and then decreases with an increasing temperature. Furthermore, compared to pure carbon dioxide (CO2) injection, the addition of methane (CH4) in the injection gas increases the oil–gas MMP in confined nanopores. Therefore, it is recommended to control the content of CH4 in the injection gas in order to achieve a more efficient gas injection design.