Abstract. This paper focuses on analyzing and discussing thermal errors at CNC milling machines. The thermal affection makes the deformation of machine tools and is the main problem of accuracy error over than 65%. Effectively improving or controlling thermal errors is helpful for the accuracy of machine. The key point of this paper is the position of tool center point. Firstly, 14 pieces of temperature sensors are used for checking the real field of temperature, and then four sensors with better linearity are chosen for real situations. The test bar and 5 pieces of noncontact sensors are utilized for clearly getting the displacement of the tool center point and head during the process. Based on the theory of MRA (Multiple Regression Analysis), the external zero-point is shifted to build the mathematical module. The database is input to the control board and the PLC is used for real-time compensation for machining. Finally, two work pieces (one compensated and one non-compensated) are tested and compensated one presents better precision.