1. A shape measuring method for measuring a shape of a surface to be measured which is formed based on a design shape having multiple periodical design level differences, by using a probe to scan, the shape measuring method comprising: a measuring step of scanning the surface to be measured with the probe to obtain multiple measuring points; a level difference specifying step of specifying multiple level-difference regions having multiple level differences formed on the surface to be measured and a height of each of the multiple level differences from the multiple measuring points, wherein the surface to be measured includes no-level-difference regions on both sides of at least one level-difference region, forming a pair of no-level-difference regions associated with the level-difference region, each member of the pair being located on a different side of the interposed level-difference region interposed between the two members of the associated pair; a target data generating step of moving multiple measuring points measuring a first member of the pair by the height of the level difference of the associated interposed level-difference region to adjust the heights of the multiple measuring points of the first member of the pair to the heights of the multiple measuring points measuring a second member of the pair, to thereby obtain fitting target data including multiple measuring points corresponding to the no-level difference regions after the movement of the multiple measuring points; a reference shape obtaining step of obtaining a reference shape without the multiple design level differences from the design shape; and a fitting step of performing fitting between the fitting target data and the reference shape, wherein the shape of the surface to be measured is measured by determining a residual between the fitting target data and the reference shape after the fitting.