In order to solve the problem that the flatness error contour curve of the guideway mounting surface on machine tools can not be intuitive description, a novel method is proposed in this paper. The principle is to divide the measured surface with a certain length into several short surfaces with overlapping region, and the segmented surfaces are measured respectively, then the flatness error contours of the segmented surfaces can be obtained, finally, the segmented flatness error contours are spliced together to reconstruct the flatness error contour of the entire surface. On this basis, the detection instrument is designed, the detection principle is given, the benchmark plate is customized to identify the starting position and ending position of measurement, the reference surface and the measured surface are measured respectively in combination with the detection instrument and the benchmark plate. Then, an algorithm is developed to convert the distance difference between the reference surface and the measured surface into the flatness error contours of segmented surfaces. Next, using the geometric relationship between overlapping region of segmented flatness error contours, an algorithm is studied which can splice these segmented flatness error contours and reconstruct the flatness error contour of the entire surface. Meanwhile, mathematical models of the algorithms are established, and the measurement experiment is carried out. The results demonstrate that this method can reconstruct the flatness error contour of long surface accurately. INDEX TERMS Flatness detection, machine tool, detection instrument, flatness error contour reconstruction, contour splicing.