Strong (100) fiber textured HfN films on the substrates of stainless steel and tool steel were obtained using the reactive d.c. magnetron sputtering technique. Peak positions and widths of reflection planes including (115), (113), (224), (024), (133) and (333) were measured using a non-traditional X-ray diffraction (XRD) method. Residual stresses were then calculated using the sin 2ω method and anisotropic elasticity, and strain distributions obtained by the Williamson-Hall method. The results show that the effects of annealing (900 °C, 1 h) on residual stress and non-uniform strain were small. Also the texture, stress, strain and domain size of the films deposited on two different steel substrates were not significantly different.