A machine tool for machining a hole of a desired size in a workpiece, comprising: a body portion; a workpiece holder for holding the workpiece, supported on the body portion; a main shaft which holds a tool; a spindle unit including a spindle which holds the main shaft rotatably on the axis of rotation, and a housing which covers the periphery of the spindle; a shaft-tilting translational drive unit for holding the spindle unit in such a manner as to be capable of changing the inclination of the main shaft, held by the spindle unit, with respect to the workpiece, and for moving the spindle unit relative to the body portion; a sensor mount secured to the housing and extending from the housing such that it partly surrounds the periphery of the main shaft; a sensor group consisting of sensors held by the sensor mount and each capable of measuring the distance from a measurement target; and a control section which, based on the results of measurement by the sensor group, is configured to control the shaft-tilting translational drive unit so as to correct the inclination of the main shaft with respect to the workpiece; wherein: the control section is configured to control the shaft-tilting translational drive unit to feed the main shaft together with the sensor group in the axial direction of said axis of rotation so that the control section can insert the sensor group into a hole provided in the workpiece or a hole provided in a reference-hole plate mounted to a main shaft-facing surface of the workpiece; and the sensor group, when inserted into the hole provided in the workpiece, is configured to measure the distances from a wall surface that defines the hole provided in the workpiece, or when inserted into the hole provided in the reference-hole plate, to measure the distances from a wall surface that defines the hole provided in the reference-hole plate. a body portion; a workpiece holder for holding the workpiece, supported on the body portion; a main shaft which holds a tool; a spindle unit including a spindle which holds the main shaft rotatably on the axis of rotation, and a housing which covers the periphery of the spindle; a shaft-tilting translational drive unit for holding the spindle unit in such a manner as to be capable of changing the inclination of the main shaft, held by the spindle unit, with respect to the workpiece, and for moving the spindle unit relative to the body portion; a sensor mount secured to the housing and extending from the housing such that it partly surrounds the periphery of the main shaft; a sensor group consisting of sensors held by the sensor mount and each capable of measuring the distance from a measurement target; and a control section which, based on the results of measurement by the sensor group, is configured to control the shaft-tilting translational drive unit so as to correct the inclination of the main shaft with respect to the workpiece; wherein: the control section is configured to control the shaft-tilting translational drive unit to feed the main shaft together with the sensor group in the axial direction of said axis of rotation so that the control section can insert the sensor group into a hole provided in the workpiece or a hole provided in a reference-hole plate mounted to a main shaft-facing surface of the workpiece; and the sensor group, when inserted into the hole provided in the workpiece, is configured to measure the distances from a wall surface that defines the hole provided in the workpiece, or when inserted into the hole provided in the reference-hole plate, to measure the distances from a wall surface that defines the hole provided in the reference-hole plate. the control section is configured to control the shaft-tilting translational drive unit to feed the main shaft together with the sensor group in the axial direction of said axis of rotation so that the control section can insert the sensor group into a hole provided in the workpiece or a hole provided in a reference-hole plate mounted to a main shaft-facing surface of the workpiece; and the sensor group, when inserted into the hole provided in the workpiece, is configured to measure the distances from a wall surface that defines the hole provided in the workpiece, or when inserted into the hole provided in the reference-hole plate, to measure the distances from a wall surface that defines the hole provided in the reference-hole plate.