This chapter describes the analysis of raw diffraction data, used to produce scaled and merged diffraction amplitudes. The general description of the process is provided within the context of how it is performed in the programs DENZO and SCALEPACK. The data analysis determines many parameters of the diffraction experiment that impact the quality of the final result, providing a flexible and robust approach to problems encountered by crystallographers. Topics covered include: diffraction from a perfect crystal lattice; autoindexing; coordinate systems; experimental assumptions; prediction of the diffraction pattern; detector diagnostics; multiplicative corrections (scaling); global or post refinement; and control through a graphical interface.