This paper deals with the effect of welding conditions on the residual stress distribution produced in solid and hollow cylinders by use of finite difference method for obtaining the thermal elastoplastic stresses. The important parameters of residual stress distribution were derived with the similar law of heat flow theory. The figure representing the relation between the parameter and the residual stress distribution was obtained. It appears that the temperature dependence of Young's modulus and the coefficient of linear expansion had no influence on the residual stress distribution. The water cooling conditions exerted the influence on the residual stress of the weld metal.