The growing global need has led to the best use and exploitation of non-renewable resources, especially oil resources. Gas injection in oil fields is one of the common methods in the industry of exploiting hydrocarbon reservoirs. One of the common gases for gas injection in reservoir is carbon dioxide gas because good injection results. There are problems in injecting gas into reservoir, the most obvious of which is the undesirable movement of gas in the porous media. One of the reasons for the unfavorable movement of gas is the low density and low viscosity of the gas. These factors cause gravitational separation and the phenomenon of fingering. Replacing foam with gas is one way to reduce gas injection problems. Oil flooding by foam can have a better sweeping efficiency than gas. Foam has a higher viscosity than gas and in the injection will reduce the phenomenon of fingering. In this research, an attempt is made to achieve a foam with higher stability and high oil recovery ability. Half-life has been used to compare the stability of foams. The half-life is measured as the time it takes for the foam to reach half its original volume. To evaluate the ability of foam to recover oil, we inject it into the micromodel and compare the amount of oil used with the amount of oil used with other injections in the micromodel. In this study, sodium-dodecyl sulfate surfactant, silica fume and gum xanthan polymer were used to make foam generating solutions and foam curing. After performing stability tests at the critical concentration of micelle surfactant, the optimum concentration for silica nanoparticles was 0.06 wt%. For gum xanthan polymer, the concentration is 0.055 wt% for the state with the highest half-life. Foam made from surfactant solution has a half-life of 36 minutes, and foam improved with silica has a half-life of 45 minutes, ie it has a 25% recovery. On the other hand, if we use xanthanum polymer and silica nanoparticles to improve the stability of the foam, it will have a bad half-life of 58 minutes, which means that this foam has a 61.1% recovery half-life. In the micromodel tests, we see the highest oil recovery from the micromodel in the case of injection of improved foam with polymer and nanoparticles. Keywords: Foam, Foamability, Foam stability, Micromodel