Due to respiratory motion, lung tumor can move up to several centimeters. If respiratory motion is not carefully considered during the radiation treatment planning, the highly conformal dose distribution with steep gradients could miss the target. To address this issue, the common strategy is to add a population-derived safety margin to the gross tumor volume (GTV). However, during a free breathing CT simulation, the images could be acquired at any phase of a breathing cycle. With such a generalized uniform margin, the planning target volume (PTV) may either include more normal lung tissue than required or miss the GTV at certain phases of a breathing cycle. Recently, respiration correlated CT (4DCT) has been developed and implemented. With 4DCT, it is now possible to trace the tumor 3D trajectories during a breathing cycle and to define the tumor volume as the union of these 3D trajectories. The tumor volume defined in this way is called the internal target volume (ITV). In this study, we introduced a novel parameter, the phase impact factor (PIF), to determine the optimal CT phase for intensity modulated radiation therapy (IMRT) treatment planning for lung cancer. A minimum PIF yields a minimum probability for the GTV to move out of the ITV during the course of an IMRT treatment, providing a minimum probability of a geometric miss. Once the CT images with the optimal phase were determined, an IMRT plan with three to five co-planner beams was computed and optimized using the inverse treatment planning technique.