The selective blocking feature of the foam system has been widely used in oil and gas development, and its effect can be influenced by foaming agent concentration, foam quality, permeability, temperatures, and oil saturation. In this paper, foam flow experiments are carried out to study the variation law of resistance factor with these factors in both oil-free and oilbearing environments. By analyzing the variation curves, the mathematical models of foam resistance factor under each influencing factor are achieved. Then, a novel resistance factor model simultaneously considering the effects of above factors is obtained, and the validation is proved by the experimental results. Finally, the novel model is used to calculate the distribution of resistance factors and residual permeability after water flooding. This research has a significant guidance for designing foam flooding programs, selecting foam systems, advancing numerical simulation of foam flooding, and developing of foaming agents.