The temperature drift is an important factor to effect the measurement precision of the ultrasonic flowmeter.This paper puts forward a model of maths which has not an effect on the temperature drift,and it makes the relative hardware simple.The method in this paper is used by the ultrasonic flowmeter and a very good effect has been obtained.