Quenching is a complex thermo-mechano-metallurgical problem. Unexplored or without an optimized cooling strategy, a quenching process can end up with high residual stresses and distortion. This paper presents the mathematical formulation of the physics behind the quenching process, the numerical technique and optimization of the cooling strategies for the selected geometries. The finite element method (FEM) is used to solve the coupled partial differential equations in the framework of an isothermal-staggered approach. The solid-solid phase transformations are modeled using a linear iso-kinetic law with Schiel's additivity rule and Koistinen-Marburger (KM) law. The thermoplastic material model is formulated on the basis of J2-plasticity theory with a temperature and phase fraction-dependent yield limit together with the appropriate mixture rule. The coupling effects such as phase transformation enthalpy, transformation-induced plasticity and dissipation are considered. The local heat transfer coefficient (HTC) during the quenching process plays a crucial role for the evolution of the distortion and residual stresses. It is demonstrated that with an enhanced quenching at the mass lumped regions, the distortion can be reduced. It is always possible to find an HTC profile which eliminates the distortion completely on the expense of an increased residual stress state. Therefore, an optimum quenching strategy has to be found to reduce the distortion and the residual stresses simultaneously. It is shown that with an enhanced quenching at the mass lumped regions and with a reduced quenching at the edges and corners, stresses and distortion can be minimized simultaneously. Examples are given for different kinds of metals and geometries such as long profiles (L and T) and disk with a hole.