An X-ray inspection apparatus for capturing multiple sets of image data for an inspection object (S) while a position of the inspection object (S) is being changed relative to an X-ray source and an X-ray camera , and reconstructing three-dimensional data for the inspection object (S) using the image data, the apparatus comprising: a stage configured to move at least one of the inspection object (S), the X-ray source , and the X-ray camera by driving a motor ; a position detection unit configured to periodically, at time intervals, obtain a position detection value of the motor , and store the position detection value in association with time; an imaging timing obtaining unit configured to store, in association with time, an imaging timing at which imaging is performed by the X-ray camera; an imaging position calculation unit configured to calculate relative positions of the inspection object (S), and the X-ray source and the X-ray camera corresponding to the imaging timing using the position detection value of the motor obtained at the imaging timing; and a reconstruction unit configured to perform a reconstruction process using image data captured by the X-ray camera and the relative positions in the image data at the imaging timing, characterized in that the position detection unit is configured to periodically, at time intervals, obtain the position detection value of the motor from an encoder included in the motor and store the position detection value in association with time, the time intervals for obtaining the position detection value are determined such that during each imaging performed by the X-ray camera , multiple position detection values are being obtained, and the imaging position calculation unit is configured to calculate the relative positions of the inspection object (S), and the X-ray source and the X-ray camera corresponding to the imaging timing using an average of the multiple position detection values of the motor obtained during the respective imaging. a stage configured to move at least one of the inspection object (S), the X-ray source , and the X-ray camera by driving a motor ; a position detection unit configured to periodically, at time intervals, obtain a position detection value of the motor , and store the position detection value in association with time; an imaging timing obtaining unit configured to store, in association with time, an imaging timing at which imaging is performed by the X-ray camera; an imaging position calculation unit configured to calculate relative positions of the inspection object (S), and the X-ray source and the X-ray camera corresponding to the imaging timing using the position detection value of the motor obtained at the imaging timing; and a reconstruction unit configured to perform a reconstruction process using image data captured by the X-ray camera and the relative positions in the image data at the imaging timing, the position detection unit is configured to periodically, at time intervals, obtain the position detection value of the motor from an encoder included in the motor and store the position detection value in association with time, the time intervals for obtaining the position detection value are determined such that during each imaging performed by the X-ray camera , multiple position detection values are being obtained, and the imaging position calculation unit is configured to calculate the relative positions of the inspection object (S), and the X-ray source and the X-ray camera corresponding to the imaging timing using an average of the multiple position detection values of the motor obtained during the respective imaging. <EOS>