Neutral beam injection is the main heating system on a variety of fusion devices, and will be the main heating system of ITER. Especially during high-power operation in long pulse devices, it is important that transmission losses and power deposition in the beamline are well quantified. This paper presents the analytical beamlet code (ABC)3D. ABC3D is based on analytical Gaussian beamlets, and includes shadowing effects. The code is able to calculate emission spectra in the beamline, duct transmission losses, and neutral beam power loads on 3D components. Examples of its application are shown that highlight key results in beam emission spectroscopy, beamline design, and geometry verification in experiments. Limitations to the computational approach are discussed on the basis of a comparison with more advanced calculations.