An algorithm is presented for characterization of the grain resolved (type II) stress states in a polycrystalline sample based on monochromatic X-ray diffraction data. The algorithm is a robust 12-parameter-per-grain fit of the centre-of-mass grain positions, orientations and stress tensors including error estimation and outlier rejection. As examples of use results from two experiments – one on interstitial free (IF) steel and one on copper – will be presented. In the first experiment 96 grains in one layer of IF steel were monitored during elastic loading and unloading. Very consistent results were obtained, with resolutions for each grain of approximately 10 μm in position, 0.05˚ in orientation and 80 μstrain. When averaging over all grains a resolution of 10 μstrain was obtained. In the second experiment it was demonstrated that the strain states of more than 1000 grains in a plastically deformed Cu specimen could be determined to an accuracy of 100 μstrain.