Understanding and control of thermal history of heat-treated components are very important in heat treating process. A computer program was developed for prediction of thermal history in quenching process with various cooling media and agitation conditions. Computer simulation of heat flow in quenching treatment of spur gear of SCM 22 H was carried out by two and three dimensional finite difference method. Distributions of microstructure and hardness in heat-treated spur gear were predicted by computer simulation, and the results showed a good agreement with the experiments. It was concluded that the