Purpose: To investigate the dosimetric effect of variable gas volume in esophageal cancer radiation therapy (RT) and whether a density override (DO) in treatment planning can effectively mitigate this dosimetric effect. Material and methods: Nine patients with gastrointestinal gas pockets in the planning computed tomography (pCT) were retrospectively included. Per patient, the intensity-modulated RT (IMRT) and volumetric-modulated arc therapy (VMAT) plans associated with no DO, DO ¼ 0.5, and DO ¼ 1 in the gas pockets were made. Initial and follow-up gas volumes were assessed from the pCTs and conebeam CTs (CBCTs), respectively. Fractional CTs were created based on the pCT and CBCTs to calculate the fractional doses using all six plans. We then investigated for all six plans the correlation between the gas volume difference (relative to initial gas volume) and the dose difference (relative to planned dose). We also calculated and compared the accumulated dose by summing the fractional doses using two strategies: single-plan strategy (i.e. using each of the six plans separately) and plan-selection strategy (i.e. selecting one of the three plans depending on the fractional gas volume for IMRT and VMAT planning separately). Results: The dose difference was approximately linearly correlated to the gas volume difference. Underdoses of >3.5% and overdoses of >7% were found for gas volume decreases >160 mL/330 mL and increases >260 mL/370 mL for IMRT/VMAT planning, respectively. Moreover, for most patients, the single-plan strategy with the use of DO ¼ 0.5 resulted in neither undesired underdose nor much overdose. The plan-selection strategy, however, can always ensure sufficient target coverage and minimize high dose regions to the most extent. Conclusions: The variation in gas volume during the treatment course can result in clinically undesired underdose or overdose. The DO-based plan-selection strategy can effectively mitigate the gas-induced underdose and minimize the overdose for esophageal cancer RT.