Injection of carbon dioxide (CO 2 ) is a well-known enhanced-oilrecovery (EOR) technique. Formation of stable foam inside the reservoir can improve macroscopic sweep efficiency. On the other hand, retention of surfactants decreases the cost-efficiency of the EOR process. This paper presents flow-through retention experiments with CO 2 -foaming agents on outcrop Liege chalk plugs at two different temperatures: 55 and 70 C. Two branched ethoxylated (EO) sulfonates with different ethoxylation degree, S1 (EO = 7) and S2 (EO = 12), were used. The aim was to investigate the effect of ethoxylation degree on surfactant retention. Furthermore, the effects of temperature and residual oil on surfactant retention were studied. The effect of waterflooding followed by CO 2 flooding on surfactant retention at reservoir conditions was also examined. Partitioning of the foaming agents between water and oil phases was studied.Results show that increasing the ethoxylation degree of the surfactant decreases the retention on chalk cores saturated with formation water at 55 C. S2, which was found to give the lowest retention at 55 C, was found to have a higher retention at 70 C. The presence of residual-oil saturation after waterflooding (S orw ) decreased the retention of S1 and increased the retention of S2 in comparison to the absence of residual oil. The retention of S2 after waterflooding followed by CO 2 flooding at 340 bar and 55 C was in the same range as retention on 100%-water-saturated core, but significantly lower than retention in residual-oilsaturated cores. The experiments have shown that not only are surfactant structure and temperature important for the retention of surfactants, but also the presence of oil.