An efficient algorithm is presented that calculates the Debye–Scherrer electron diffraction pattern, in the kinematical approximation, for clusters with several thousand atoms. The algorithm creates a histogram of interatomic distances in the cluster and applies a fast Fourier transform to it, to calculate the diffraction pattern. The approximation of binning interatomic distances into discrete, evenly spaced, histogram classes is discussed. When the class width is small, the distortion introduced to the diffraction pattern can be represented by a pseudotemperature factor, analogous to thermal movement of the cluster.