PURPOSE: To quantify the localization accuracy and intrafraction stability of lung cancer patients treated with frameless, four-dimensional (4D) cone beam computed tomography (CBCT)-guided stereotactic body radiotherapy (SBRT) and to calculate and validate planning target volume (PTV) margins to account for the residual geometric uncertainties. MATERIALS AND METHODS: Sixty-five patients with small peripheral lung tumors were treated with SBRT without a body frame to 54 Gy in three fractions. For each fraction, three 4D-CBCT scans were acquired: before treatment to measure and correct the time-weighted mean tumor position, after correction to validate the correction applied, and after treatment to estimate the intrafraction stability. Patient-specific PTV margins were computed and subsequently validated using Monte Carlo error simulations. RESULTS: Systematic tumor localization inaccuracies (1 SD) were 0.8, 0.8, and 0.9 mm for the left-right, craniocaudal, and anteroposterior direction, respectively. Random localization inaccuracies were 1.1, 1.1, and 1.4 mm. Baseline variations were 1.8, 2.9, and 3.0 mm (systematic) and 1.1, 1.5, and 2.0 mm (random), indicating the importance of image guidance. Intrafraction stability of the target was 1.2, 1.2, and 1.8 mm (systematic) and 1.3, 1.5, and 1.8 mm (random). Monte Carlo error simulations showed that patient-specific PTV margins (5.8-10.5 mm) were adequate for 94% of the evaluated cases (2-28 mm peak-to-peak breathing amplitude). CONCLUSIONS: Frameless SBRT can be safely administered using 4D-CBCT guidance. Even with considerable breathing motion, the PTV margins can safely be kept small, allowing patients with larger tumors to benefit from the advantages of SBRT. In case bony anatomy would be used as a surrogate for tumor position, considerably larger PTV margins would be required.