An analysis is given of the contribution of various crystal imperfections to the rocking widths of reflections and the divergence of the diffracted beams. The crystal imperfections are the angular spread of the mosaic blocks in the crystal, the size of the mosaic blocks and the variation in cell dimensions between blocks. The analysis has implications for improving crystal perfection, defining data-collection requirements and for data-processing procedures. Measurements on crystals of tetragonal lysozyme at room temperature and 100 K were made in order to illustrate how parameters describing the crystal imperfections can be obtained. At 100 K, the dominant imperfection appeared to be a variation in unit-cell dimensions in the crystal.