A lathe comprising: a first headstock provided with a first spindle for holding a workpiece (W0, W1, W2), a second headstock provided with a second spindle which can receive the workpiece (W0, W1, W2) from the first spindle in a position facing the first spindle, a first tool post which holds a plurality of first tools for machining the workpiece (W0, W1, W2) when protruding from the first spindle, a second tool post which holds a second tool for machining the workpiece (W0, W1, W2) when held by the second spindle, a supporting bed whose side facing the second spindle movably supports the first tool post and unmovably supports the second tool post, the side being in a position in front of the first spindle and behind the front end (Wla) of the workpiece (W0, W1, W2) protruding from the first spindle; a first tool post driving unit which can move the first tool post in a first axis direction perpendicular to an axis of the first spindle, wherein the first axis direction is a horizontal direction, and a second headstock driving unit which can move the second headstock in a second axis direction perpendicular to the axis of the first spindle and oblique to the first axis direction, wherein the plurality of first tools are arranged in the first axis direction, and the second tool post holding the second tool is in a position not overlapping the plurality of first tools in a third axis direction perpendicular to the axis of the first spindle and perpendicular to the first axis direction and in a position that the second tool and part of the second tool post on an extension of the second tool overlap the plurality of first tools in a direction of the axis of the first spindle, wherein the third axis direction is a vertical direction. a first headstock provided with a first spindle for holding a workpiece (W0, W1, W2), a second headstock provided with a second spindle which can receive the workpiece (W0, W1, W2) from the first spindle in a position facing the first spindle, a first tool post which holds a plurality of first tools for machining the workpiece (W0, W1, W2) when protruding from the first spindle, a second tool post which holds a second tool for machining the workpiece (W0, W1, W2) when held by the second spindle, a supporting bed whose side facing the second spindle movably supports the first tool post and unmovably supports the second tool post, the side being in a position in front of the first spindle and behind the front end (Wla) of the workpiece (W0, W1, W2) protruding from the first spindle; a first tool post driving unit which can move the first tool post in a first axis direction perpendicular to an axis of the first spindle, wherein the first axis direction is a horizontal direction, and a second headstock driving unit which can move the second headstock in a second axis direction perpendicular to the axis of the first spindle and oblique to the first axis direction, wherein the plurality of first tools are arranged in the first axis direction, and the second tool post holding the second tool is in a position not overlapping the plurality of first tools in a third axis direction perpendicular to the axis of the first spindle and perpendicular to the first axis direction and in a position that the second tool and part of the second tool post on an extension of the second tool overlap the plurality of first tools in a direction of the axis of the first spindle, wherein the third axis direction is a vertical direction.