In stereotactic body radiotherapy (SBRT) of lung tumors, dosimetric problems arise from: 1) the limited accuracy in the dose calculation algorithms in treatment planning systems, and 2) the motions with the respiration of the tumor during treatment. Longitudinal dose distributions have been calculated with Monte Carlo simulation (MC), a pencil beam algorithm (PB) and a collapsed cone algorithm (CC) for two spherical lung tumors (2 cm and 5 cm diameter) in lung tissue, in a phantom situation. Respiratory motions were included by a convolution method, which was validated. In the static situation, the PB significantly overestimates the dose, relative to MC, while the CC gives a relatively accurate estimate. Four different respiratory motion patterns were included in the dose calculation with the MC. A "narrowing" of the longitudinal dose profile of up to 20 mm (at about 90% dose level) is seen relative the static dose profile calculated with the PB.