Analysis of a crystal structure using the Rietveld profile technique requires a suitable description of the shape of the peaks. In general, modern refinement codes include accurate formulations for most effects; however, the functions used for peak asymmetry are semi-empirical and take very little account of diffraction optics. The deficiencies in these methods are most obvious for high-resolution instruments. This study describes the implementation of powder diffraction peak profile formulations devised by van Laar & Yelon [J. Appl. Cryst. (1984), 17, 47–54]. This formalism, which describes the asymmetry due to axial divergence in terms of finite sample and detector sizes, does not require any free parameters and contains intrinsic corrections for the angular dependence of the peak shape. The method results in an accurate description of the observed profiles for a variety of geometries, including conventional X-ray diffractometers, synchrotron instruments with or without crystal analyzers and neutron diffractometers.