A method for the simulation of electron scattering and diffraction in solids and molecules within the cluster approach is presented with explicit applications to photoelectron diffraction, electron scattering in molecules, and low-energy electron diffraction. No approximations are made beyond the muffin-tin model, and, in particular, an exact representation of the free-electron Green function is used. All multiple-scattering paths are accounted for up to an order of scattering that ensures convergence. The method relies upon a convenient separation of the free-electron Green function in rotation matrices and translations along the z axis, which greatly reduces the computation time and storage demand. The evaluation of the multiple-scattering expansion is implemented using the fully convergent recursion method, which permits one to perform an iterative refinement of the final-state wave function, as expressed in the basis set of spherical harmonics attached to each atom of the cluster. Examples are offered in which the direct multiple-scattering expansion and the more elaborated simultaneous relaxation method fail to converge, whereas the recursion method leads to convergence. The computation time needed by the resulting computer program of electron diffraction in atomic clusters to determine the self-consistently scattered wave function is proportional to ${N}^{2}{(l}_{\mathrm{max}}{+1)}^{3},$ where N is the number of atoms in the cluster and ${l}_{\mathrm{max}}$ is the maximum angular momentum for which the scattering phase shifts take non-negligible values. Within this method it is possible to establish that in practical cases $N>1000$ might be needed for a convergence of the cluster size, although the angular averaging inherent in many experiments may reduce this. The recursion method was also modified to reduce the effort in computing angular distributions of photoelectrons and low-energy diffracted electrons, which now require negligible time for each angle of emission once the wave function has been determined for a given electron energy. Angle and energy distributions of core-level photoemission, elastic scattering of electrons from a free molecule, and low-energy electron diffraction in large-unit-cell surfaces are calculated.