In an image forming apparatus for forming a color image by superposing
component color images, a control device obtains position data
representing a forming position of each of plural registration mark
images for the component color images with respect to a positional
reference value arbitrarily determined, divides the position data into
each of a unit reference range representing a range in which one mark
image is formed, converts the position data divided for each unit
reference range into those based on respective reference values
representing the front edge of the unit reference ranges, extracts the
position data representing ranges common to the mutually overlapping
ranges each of which is represented by a couple of position data
corresponding to the rising and falling edges of a passage timing pulse
as read position data of the mark image of the component color, and
calculates the amounts of positional deviations of the component color
images from one another on the basis of the position data extracted.