A method for photon dose calculation in radio therapy planning using pencil beam energy deposition kernels is presented. It is designed to meet the requirements of an algorithm for 3-D treatment planning that is general enough to handle irregularly shaped radiation fields incident on a heterogeneous patient. It is point oriented and thus faster than a full 3-D convolution algorithm and uses the same physical data base to characterize a clinical beam as a full 3-D convolution algorithm. It is shown that photon therapy beams can be characterized with great accuracy from a combination of precalculated Monte Carlo energy deposition kernels and dose distributions measured in a water phantom. The data are used to derive analytical pencil beam kernels that are approximately partitionated into the dose from (i) primary released electrons and positrons, (ii) scattered, bremsstrahlung, and annihilation photons, (iii) contaminating photons, and (iv) charged particles from the collimator head. A semianalytical integration method, based on triangulation of the field, is developed for dose calculation using the analytical kernels. Dose is calculated in units normalized to the incident energy fluence which facilitates output factor calculation. For application in heterogeneous media, a scatter correction factor is derived using monodirectional convolution along the ray path. In homogeneous media results are compared with measurements and in heterogeneous media with Monte Carlo calculations and the Batho method.