A method of selecting alignment marks, to be detected, from a plurality of
alignment marks formed on a substrate includes the step of calculating a
deviation between a distance of a designed position of an alignment mark
from a reference position and a reference value, with respect to each of
the plurality of alignment marks. The alignment marks, to be detected,
are selected based on the deviations.