A method of aligning that aligns a measurement point group and a design point group by an arithmetic processing unit, the measurement point group including a plurality of measurement points obtained by measuring a workpiece by a measuring instrument, and the design point group including a plurality of design points specified by design data of the workpiece, the method comprising: selecting a partial point group from the measurement point group; performing an alignment processing of the partial point group and the design point group to calculate a shift parameter; shifting the measurement point group using the shift parameter; and performing an alignment processing of the measurement point group after shifting and the design point group, characterized in that the method further comprises: during the alignment processing of the measurement point group after shifting and the design point group, setting grid points in a space including the measurement point group and executing a grid-point-conversion processing for replacing each of the measurement points of the measurement point group after shifting with one of the grid points nearest to the measurement point; obtaining from within the design point group a nearest point to each of the grid-point-converted points, the grid-point-converted points being the measurement points replaced by the grid points; and setting the nearest point as an initial value used in shortest distance calculation during the alignment processing of the measurement point group after shifting and the design point group. selecting a partial point group from the measurement point group; performing an alignment processing of the partial point group and the design point group to calculate a shift parameter; shifting the measurement point group using the shift parameter; and performing an alignment processing of the measurement point group after shifting and the design point group, characterized in that the method further comprises: during the alignment processing of the measurement point group after shifting and the design point group, setting grid points in a space including the measurement point group and executing a grid-point-conversion processing for replacing each of the measurement points of the measurement point group after shifting with one of the grid points nearest to the measurement point; obtaining from within the design point group a nearest point to each of the grid-point-converted points, the grid-point-converted points being the measurement points replaced by the grid points; and setting the nearest point as an initial value used in shortest distance calculation during the alignment processing of the measurement point group after shifting and the design point group. during the alignment processing of the measurement point group after shifting and the design point group, setting grid points in a space including the measurement point group and executing a grid-point-conversion processing for replacing each of the measurement points of the measurement point group after shifting with one of the grid points nearest to the measurement point; obtaining from within the design point group a nearest point to each of the grid-point-converted points, the grid-point-converted points being the measurement points replaced by the grid points; and setting the nearest point as an initial value used in shortest distance calculation during the alignment processing of the measurement point group after shifting and the design point group.