An image forming apparatus for easily detecting occurrence of positional
deviation and magnification deviation among images, even when the
deviations are small. Reference patches, which are rectangular areas, in
which a longitudinal direction is a sub-scanning direction, painted in
magenta, are formed on paper using a first image forming device. A target
patch constituted by rectangular unit patches arranged in the
sub-scanning direction is formed on the left side of the reference patch.
Another target patch constituted by rectangular unit patches arranged in
the sub-scanning direction is formed on the right side of the reference
patch. The more downward each of the unit patches are positioned at, the
more to the right the unit patches are shifted.