1. A method of calculating a surface shape of a target surface, comprising the steps of: defining, as a measurement target region, each of a plurality of regions on the target surface in which adjacent regions overlap each other, and causing an image sensor to detect an interference pattern formed by measurement light reflected by the measurement target region and reference light reflected by a reference surface so as to measure heights of the target surface at a plurality of positions in the measurement target region, thereby obtaining data that give the heights at the plurality of positions in each of the plurality of regions; dividing a result obtained by adding, for the plurality of positions, the data that are obtained in the step of obtaining the data and give the heights at the plurality of positions in each of the plurality of regions by the number of the plurality of regions, thereby generating average data that averages the data that give the heights at the plurality of positions in each of the plurality of regions; removing, for each of the plurality of regions, the average data generated in the step of generating the average data from the data that are obtained in the step of obtaining the data and give the heights at the plurality of positions in each of the plurality of regions, thereby generating correction data for each of the plurality of regions; and combining the correction data for the plurality of regions generated in the step of generating the correction data, thereby obtaining the surface shape of the target surface.