1. A pattern dimension measuring apparatus comprising: a unit for irradiating an electron beam onto a sample in a scanning manner; a unit for acquiring image data of a pattern according to the quantity of electrons emitted, by irradiation of the electron beam, from a surface of the sample where the pattern is formed; an area measuring unit for dividing the pattern into a plurality of partial patterns, calculating the areas of the partial patterns, and calculating the area of the pattern by summing up the areas of the partial patterns; a line profile creating unit for creating a line profile to represent a luminance signal on a predetermined line out of the image data; and a differential profile creating unit for creating a differential profile by differentiating the line profile, wherein, when the pattern is a rectangular pattern surrounded by opposed first and second edges, the area measuring unit divides the rectangular pattern into rectangular partial patterns by sectioning the opposed first edges into parts of a predetermined length; calculates the distance between the opposed first edges for each of the rectangular partial patterns, by use of the line profile and the differential profile on a line being parallel to the opposed second edges and intersecting the opposed first edges; calculates the area of each of the rectangular partial patterns by multiplying the predetermined length and the distance; and calculates the area of the rectangular pattern by summing up the areas of the rectangular partial patterns.