Calculating the residual stresses within the material requires additional processing of the diffraction data. To achieve this, one must contrast the recorded diffraction peak locations with the predicted positions in a reference sample that has not undergone any stress. The level of the residual stress is proportional to how these locations differ from one another.