There is provided an image forming apparatus which can control reciprocation of a carriage and paper feed in a highly accurate manner and form an image of high quality even when paper skews or paper of a different type from that of the paper set is supplied. An ink jet printer (1) provided with a motion sensor (70) in a carriage (31) determines the type of paper (P) by using a paper position signal output by the motion sensor (70) and changes printing conditions in accordance with the type of paper. Also, the ink jet printer (1) calculates a moving amount of the carriage (31), a feed amount and a deviation amount of the paper (P), and controls the reciprocation of the carriage (31) and the feeding of the paper (P) based on calculated values.