A conveying distance control device, comprising: a conveying roller conveying a recording medium; a first detecting unit detecting rotational positions of the conveying roller; a line sensor sequentially detecting marks arranged on a test chart being conveyed by the conveying roller; and a control unit; obtaining conveying distance errors indicating differences between the corrected conveying distances and a theoretical conveying distance of the marks in association with the rotational positions of the conveying roller, calculating a correction value for correcting a conveying distance of the conveying roller based on relationships between the conveying distance errors and the rotational positions of the conveying roller, and controlling the conveying distance of the conveying roller based on the calculated correction value, characterized in that the conveying distance control device further comprises: a calculation unit calculating a skew angle between a line passing through positions of a first mark and a second mark of the marks and a conveying direction of the conveying roller based on positional information of the marks detected by the line sensor; obtaining corrected conveying distances by removing errors caused by the skew angle from actual conveying distances of the marks detected by the line sensor, wherein the positional information of each of the marks includes first positional information indicating a position in a direction orthogonal to the conveying direction of the conveying roller and second positional information indicating a position in the conveying direction. a conveying roller conveying a recording medium; a first detecting unit detecting rotational positions of the conveying roller; a line sensor sequentially detecting marks arranged on a test chart being conveyed by the conveying roller; and a control unit; obtaining conveying distance errors indicating differences between the corrected conveying distances and a theoretical conveying distance of the marks in association with the rotational positions of the conveying roller, calculating a correction value for correcting a conveying distance of the conveying roller based on relationships between the conveying distance errors and the rotational positions of the conveying roller, and controlling the conveying distance of the conveying roller based on the calculated correction value, characterized in that the conveying distance control device further comprises: a calculation unit calculating a skew angle between a line passing through positions of a first mark and a second mark of the marks and a conveying direction of the conveying roller based on positional information of the marks detected by the line sensor; obtaining corrected conveying distances by removing errors caused by the skew angle from actual conveying distances of the marks detected by the line sensor, wherein the positional information of each of the marks includes first positional information indicating a position in a direction orthogonal to the conveying direction of the conveying roller and second positional information indicating a position in the conveying direction. a calculation unit calculating a skew angle between a line passing through positions of a first mark and a second mark of the marks and a conveying direction of the conveying roller based on positional information of the marks detected by the line sensor; obtaining corrected conveying distances by removing errors caused by the skew angle from actual conveying distances of the marks detected by the line sensor, wherein the positional information of each of the marks includes first positional information indicating a position in a direction orthogonal to the conveying direction of the conveying roller and second positional information indicating a position in the conveying direction.