In this study we investigate a method for positioning the margin required around the clinical target volume (CTV) to account for the random geometrical treatment uncertainties during conformal radiotherapy. These uncertainties are introduced by patient setup errors and CTV motion within the patient. Three-dimensional dose distributions are calculated for two four-field box techniques and a three-field technique, using rectangular fields. In addition, dose calculations are performed for four prostate cases, treated with a three-field conformal technique. The effects of random rotational and translational deviations on the delivered dose are described as a convolution of the "static" dose with the distribution of the deviations. For the rectangular field techniques, these convolutions are performed with a range of standard deviations (SDs) of the distribution of random translations (0-7 mm in the three directions) and rotations (0 degree-5 degrees around the main axes). Two centers of rotation are considered: the isocenter and a position that is 3.5 cm shifted with respect to the isocenter. For the prostate cases, the random deviations are estimated by combining the results from organ motion and setup accuracy studies. The required margin is defined as the change in the position of the static 95% isodose surface by the convolution and it is approximated by a morphological erosion operator, applied to the static 95% isodose surface. When the center of rotation coincides with the isocenter the change in the position of the static 95% isodose surface can accurately be described by an erosion operator. For the rectangular field techniques, the margin is equal to about 0.7 SD of the distribution of translations, independent of the distribution of rotations. When the center of rotation does not coincide with the isocenter and rotations are considerable, the margin is strongly place dependent, and the accuracy of the approximation by an erosion operator is much lower. In conclusion, margins for random uncertainties can be approximated by a dilation operator (inverse of an erosion operator) when the center of rotational deviations coincides with the isocenter. The size of the margin is about 0.7 SD of the distribution of translations. When rotational deviations are present and the center of rotation does not coincide with the isocenter, the margin can become strongly place dependent and the convolution computation should be incorporated in the planning system.