A method for calibrating a distance determining device for determining a distance between an optical system and an object. The method includes providing a detecting system having marking elements and a measuring camera. Using the distance determining device, a light structure is projected onto a carrier that provides a calibration pattern. The measuring camera detects the marking elements or the calibration pattern to determine the spatial position of the optical system. Coordinates of a calibration pattern in a coordinate system associated with the measuring camera are determined. An image of the calibration pattern and the light structure is created using a camera of the optical system. Coordinates of an image of a calibration pattern and the light structure in a coordinate system associated with the camera image plane are determined. The distance determining device is calibrated using the determined coordinates and the determined spatial position of the optical system.