Introduction: We retrospectively evaluated the efficacy and toxicity of gross tumor volume (GTV) mean dose optimized stereotactic body radiation therapy (SBRT) for primary and secondary lung tumors with and without robotic real-time motion compensation. Materials and methods: Between 2011 and 2017, 208 patients were treated with SBRT for 111 primary lung tumors and 163 lung metastases with a median GTV of 8.2 cc (0.3-174.0 cc). Monte Carlo dose optimization was performed prioritizing GTV mean dose at the potential cost of planning target volume (PTV) coverage reduction while adhering to safe normal tissue constraints. The median GTV mean biological effective dose (BED)10 was 162.0 Gy10 (34.2-253.6 Gy10) and the prescribed PTV BED10 ranged 23.6-151.2 Gy10 (median, 100.8 Gy10). Motion compensation was realized through direct tracking (44.9%), fiducial tracking (4.4%), and internal target volume (ITV) concepts with small (≤5 mm, 33.2%) or large ( > 5 mm, 17.5%) motion. The local control (LC), progression-free survival (PFS), overall survival (OS), and toxicity were analyzed. Results: Median follow-up was 14.5 months (1-72 months). The 2-year actuarial LC, PFS, and OS rates were 93.1, 43.2, and 62.4%, and the median PFS and OS were 18.0 and 39.8 months, respectively. In univariate analysis, prior local irradiation (hazard ratio (HR) 0.18, confidence interval (CI) 0.05-0.63, p = 0.01), GTV/PTV (HR 1.01-1.02, CI 1.01-1.04, p < 0.02), and PTV prescription, mean GTV, and maximum plan BED10 (HR 0.97-0.99, CI 0.96-0.99, p < 0.01) were predictive for LC while the tracking method was not (p = 0.97). For PFS and OS, multivariate analysis showed Karnofsky Index (p < 0.01) and tumor stage (p = 0.02) to be significant factors for outcome prediction. Late radiation pneumonitis or chronic rip fractures grade 1-2 were observed in 5.3% of the patients. Grade ≥ 3 side effects did not occur. Conclusion: Robotic SBRT is a safe and effective treatment for lung tumors. Reducing the PTV prescription and keeping high GTV mean doses allowed the reduction of toxicity while maintaining high local tumor control. The use of real-time motion compensation is strongly advised, however, well-performed ITV motion compensation may be used alternatively when direct tracking is not feasible.