An image forming apparatus includes plural image forming sections for
forming toner images of different colors. A patch toner image forming
section forms patch toner images side-by-side onto a moving transfer body
by using the image forming sections. A spread clock signal output section
spreads a clock signal having a predetermined standard frequency at a
predetermined spreading ratio and outputs the clock signal. A patch toner
image intervals calculating section calculates intervals between the
patch toner images on the transfer body based on the number of clock
signals outputted from the spread clock signal output section and the
standard frequency. A calculation result correcting section counts spread
clock signals outputted during a time interval from the spread clock
signal output section, and corrects a calculation result given by the
patch toner image intervals calculating section based on the result of
the counting.