A mathematical model to describe the line shape of an x-ray diffraction peak from stacks of different layers such as, for instance, an interstratified clay mineral has been evolved. The aim was to be able to analyse the proportions of different specific stacking sequences in two-component interstratified samples. A maximum-entropy algorithm was applied to observed powder-diffraction intensities in order to obtain the probability of each stacking sequence. Application to natural smectite-illite clays gave reasonable results.