Purpose: To develop and validate an automatic algorithm for the detection and functional assessment of lung tumors on three-dimensional respiratory gated PET/CT images. Method and Materials: First the algorithm will automatically segment lung regions in CT images, then identify and localize focal increases of activity in lung regions of PET images at each gated bin. Once the tumor voxels have been determined, an integration algorithm will include all the tumor counts collected at different bins within the respiratory cycle into one reference bin. Then the total activity (Bq), concentration (Bq/ml), functional volume (ml) and standard uptake values (SUV) are calculated for each tumor on PET images. Validation of the automatic algorithm was demonstrated by conducting experiments with the computerized 4D NCAT phantom and with a dynamic lung-chest phantom imaged using a GE PET/CT System at Baptist Hospital of Miami. Tumor variables to be controlled were: volume, total number of counts (activity), maximum and average number of counts. These values were the gold standard to which the results of the algorithm were compared. The tumor's motion was also controlled with different respiratory periods and amplitudes. Results: Validation, feasibility and robustness of the algorithm were demonstrated. With the algorithm, the best compromise between short PET scan time and reduced image noise can be achieved, while quantification and clinical analysis become faster and more precise.