An image forming apparatus comprising: a plurality of first image carriers (104a, 106a, 108a, 110a); a toner image forming unit (102, 104c, 106c, 108c, 110c) which exposes the plurality of first image carriers to form latent images and develops the latent images on the plurality of first image carriers with toner of different colors to form images of the respective colors; a second image carrier which is driven at a predetermined speed and to which the image of each of the colors formed on one of the plurality of first image carriers by the toner image forming unit is transferred in an aligned and overlapped manner; a secondary transfer unit (118, 118a, 118b) which transfers the images of the respective colors, which has been transferred on the second image carrier in an overlap manner, to a transfer material to carry out image formation; a test pattern generation unit which generates a test pattern string which includes one or a plurality of test pattern images and which is formed by the plurality of first image carriers and transferred to the second image carrier; a sensor (115a, 115b, 115c) which detects the test pattern string transferred to the second image carrier; and a correction value calculation unit which calculates a correction value used to correct an image formation condition in the toner image forming unit on the basis of a result of detecting the test pattern string by the detection unit, characterized in that the test pattern generation unit generates the test pattern string such that the length of the test pattern string in a sub scanning direction satisfies the following condition: L ≤ P − Q 1 + Q 2 × V wherein V is the speed, at which the second image carrier is driven Q 1 is a time obtained by subtracting a total time of a time for which the test pattern string is conveyed from a position, at which the plurality of first image carriers is exposed, to the sensor by the second image carrier Q 2 is a time from when the test pattern string is detected by the sensor until the correction value calculated by the correction value calculation unit is reflected in the image formation by the toner image forming unit P is a time from a timing of starting to write the test pattern string to the first image carriers to a timing of starting to write an image in which the correction value should be reflected. a plurality of first image carriers (104a, 106a, 108a, 110a); a toner image forming unit (102, 104c, 106c, 108c, 110c) which exposes the plurality of first image carriers to form latent images and develops the latent images on the plurality of first image carriers with toner of different colors to form images of the respective colors; a second image carrier which is driven at a predetermined speed and to which the image of each of the colors formed on one of the plurality of first image carriers by the toner image forming unit is transferred in an aligned and overlapped manner; a secondary transfer unit (118, 118a, 118b) which transfers the images of the respective colors, which has been transferred on the second image carrier in an overlap manner, to a transfer material to carry out image formation; a test pattern generation unit which generates a test pattern string which includes one or a plurality of test pattern images and which is formed by the plurality of first image carriers and transferred to the second image carrier; a sensor (115a, 115b, 115c) which detects the test pattern string transferred to the second image carrier; and a correction value calculation unit which calculates a correction value used to correct an image formation condition in the toner image forming unit on the basis of a result of detecting the test pattern string by the detection unit, characterized in that the test pattern generation unit generates the test pattern string such that the length of the test pattern string in a sub scanning direction satisfies the following condition: L ≤ P − Q 1 + Q 2 × V wherein V is the speed, at which the second image carrier is driven Q 1 is a time obtained by subtracting a total time of a time for which the test pattern string is conveyed from a position, at which the plurality of first image carriers is exposed, to the sensor by the second image carrier Q 2 is a time from when the test pattern string is detected by the sensor until the correction value calculated by the correction value calculation unit is reflected in the image formation by the toner image forming unit P is a time from a timing of starting to write the test pattern string to the first image carriers to a timing of starting to write an image in which the correction value should be reflected. V is the speed, at which the second image carrier is driven Q 1 is a time obtained by subtracting a total time of a time for which the test pattern string is conveyed from a position, at which the plurality of first image carriers is exposed, to the sensor by the second image carrier Q 2 is a time from when the test pattern string is detected by the sensor until the correction value calculated by the correction value calculation unit is reflected in the image formation by the toner image forming unit P is a time from a timing of starting to write the test pattern string to the first image carriers to a timing of starting to write an image in which the correction value should be reflected.