An image forming apparatus for forming an image on a sheet conveyed on a conveying path, comprising: an exposure means configured to expose an image carrier (11Y, 11M, 11C, 11K) to write the image on the image carrier (11Y, 11M, 11C, 11K); a pair of rollers configured to convey the sheet with the sheet nipped by the pair of the rollers and to shift the sheet conveyed to a width direction which is perpendicular to the conveying direction of the sheet; a detection means (140, 141) configured to detect a side edge of the sheet conveyed to detect the side edge position in the width direction; a skew correction means (110, 120) for correcting a skew of the sheet conveyed on the conveying path and a control means, wherein the control means is further configured to: determine for a first sheet in an image forming job an image writing position by the exposure means in a main scanning direction which is perpendicular to a moving direction of the image carrier (11Y, 11M, 11C, 11K), based on a first detection result for the first sheet by the detection means (140, 141), determine a shift amount of the pair of the rollers for a second sheet, based on the image writing position determined for the first sheet and a second detection result of the detection means for the second sheet which follows the first sheet; control a shift operation of the pair of the rollers based on the determined shift amount, and control the image writing position so that, even if the side edge position of the second sheet detected by the detection means (140, 141) differs from the side edge position of the first sheet, the image writing position for the second sheet is identical to the writing position for the first sheet. an exposure means configured to expose an image carrier (11Y, 11M, 11C, 11K) to write the image on the image carrier (11Y, 11M, 11C, 11K); a pair of rollers configured to convey the sheet with the sheet nipped by the pair of the rollers and to shift the sheet conveyed to a width direction which is perpendicular to the conveying direction of the sheet; a detection means (140, 141) configured to detect a side edge of the sheet conveyed to detect the side edge position in the width direction; a skew correction means (110, 120) for correcting a skew of the sheet conveyed on the conveying path and a control means, wherein the control means is further configured to: determine for a first sheet in an image forming job an image writing position by the exposure means in a main scanning direction which is perpendicular to a moving direction of the image carrier (11Y, 11M, 11C, 11K), based on a first detection result for the first sheet by the detection means (140, 141), determine a shift amount of the pair of the rollers for a second sheet, based on the image writing position determined for the first sheet and a second detection result of the detection means for the second sheet which follows the first sheet; control a shift operation of the pair of the rollers based on the determined shift amount, and control the image writing position so that, even if the side edge position of the second sheet detected by the detection means (140, 141) differs from the side edge position of the first sheet, the image writing position for the second sheet is identical to the writing position for the first sheet. determine for a first sheet in an image forming job an image writing position by the exposure means in a main scanning direction which is perpendicular to a moving direction of the image carrier (11Y, 11M, 11C, 11K), based on a first detection result for the first sheet by the detection means (140, 141), determine a shift amount of the pair of the rollers for a second sheet, based on the image writing position determined for the first sheet and a second detection result of the detection means for the second sheet which follows the first sheet; control a shift operation of the pair of the rollers based on the determined shift amount, and control the image writing position so that, even if the side edge position of the second sheet detected by the detection means (140, 141) differs from the side edge position of the first sheet, the image writing position for the second sheet is identical to the writing position for the first sheet.