This paper proposes a new model to compensate for errors of a five-axis machine tool. A matrix with error components, that is, an error matrix, is separated from the error synthesis model of a five-axis machine tool. Based on the kinematics and inversion of the error matrix which can be obtained not by using a numerical method, an error compensation model is established and used to calculate compensation values of joint variables. The proposed compensation model does not need numerical methods to find the compensation values from the error compensation model, which includes nonlinear equations. An experiment using a double ball-bar is implemented to verify the proposed model.