Method for correcting the position and deviation of a syringe needle in amachine for automaticallypreparing intravenous medication, the machine comprising an automaticactuator, together with a controlsystem, in which are placed the syringe and a one-dimensional position sensorcomprising a measuringplane, the correction method comprising the steps in which the position sensorobtains positioncoordinates of a first and a second point of the needle, and steps ofcorrecting the position and deviationerror of the needle, by the control system of the automatic actuator.