Coordinate measuring machines are widely used for technological control of geometric parameters of the surface of various parts in many branches of industrial production. For coordinate measurements of high-precision surfaces, instrumental sources of error can be minimized if the axes of the controlled object are located on the same axis of the reference scale of the comparator or parallel to it. However, in all schemes of construction of coordinate measuring machines, the Abbe principle is violated, which leads to the appearance of a measurement error, which, moreover, increases with the increase in the overall dimensions of the coordinate machine. It is determined that the total error can be determined taking into account two factors: the maximum allowable error calculated without taking into account the temperature variations of the measured object itself; the temperature change of the measured object. It is shown that the resulting error of coordinate measuring machines can be investigated on the basis of the optimization problem of calculating the optimal form of the function of the temperature dependence of the object on time. It is shown that the resulting error integrated in time will reach a minimum value if the temperature dependence functions of the measured object T(t) and the coefficient of thermal expansion α(t) change synchronously in time. Therefore, in order to minimize the error of coordinate measuring machines from changes in time of such indicators as T and α must occur synchronously, i.e. their change in time must satisfy the corresponding certain condition. To quantify the gain in optimizing measurements, we will conduct a model study. To estimate the gain in reducing the error, two model functions have been compiled, the integrals of which, according to a certain condition, must be equal to the integral of the calculated coupling function. It is shown that according to the calculation, the lowest estimate of the reduction of the measurement error with the proposed optimization will be 4.5 %.