Residual stresses are of great importance during the entire production cycle of high-grade steels. The use of modern tools based on the finite element method is steadily increasing to optimize heat treatment processes. As for industrial purposes it is often not possible to measure the entire set of material data a sensitivity analysis shows the relative influence of material properties related to phase transformation on the residual stresses during hardening. Subsequently the application of the numerical heat treatment model is shown on two examples: The magnitudes of residual stresses during the quenching of a forged bar in different quenching media are compared. The paper concludes with a numerical simulation of the heat treatment of a die used for extrusion processes. Phase distribution and residual stresses after gas quenching of the tool are presented.