1. A pattern measuring apparatus comprising: an electron irradiating unit for radiating an electron beam onto a sample while scanning; an image data acquiring unit for acquiring an image of a pattern on the basis of an amount of electrons generated from the sample where the pattern is formed, by the radiation of the electron beam; a measurement region setting unit for setting paired measurement regions each including a pattern edge in the image of the pattern; and a controlling unit for calculating a distance between pattern edges in the paired measurement regions by detecting a shape of the pattern edge in each measurement region, respectively, wherein the control unit detects a flat portion in an edge profile of the pattern within each measurement region, the edge profile representing the pattern edge with position coordinates of each of measurement points arranged at predetermined intervals, and defines an average position of the flat portion as a position of the pattern edge in each measurement region.