Optical linear encoder error is of a great concern for its wide applications. Temperature plays an important role in the realistic environment error factors, and influences the encoder's accuracy. In this study, an incremental optical linear encoder error model is built and estimated by a prior analysis, error processing of least‐square fitting, empirical mode decomposition and cross‐correlation methods. The errors of the different temperatures can be used for error separation during the cross‐correlation calculation. The experimental measurement with different temperatures is carried out, and analysed by the authors' model. Finally, an 'ad hoc' compensation formula is obtained and demonstrated. [ABSTRACT FROM AUTHOR]