Displacement sensor for contactlessly measuring a position of a magnet relative to a reference point, which comprises: the magnet which can be displaced along a movement axis; a plurality of magnetic field sensors (201, 202), in particular a plurality of 3D Hall sensors or a plurality of linear Hall sensors, which are arranged in series and which are arranged parallel with the movement axis; and a calculation unit for forming a position signal which indicates the position of the magnet relative to the reference point; wherein each magnetic field sensor (201, 202) having a zero point (211, 212) and a displacement measurement range and being constructed in such a manner that it outputs an output signal (206, 207) which indicates a position of the magnet relative to the zero point of the magnetic field sensor and the precision with which the output signal indicates the position of the magnet decreases with increasing distance of the magnet from the zero point; wherein the plurality of magnetic field sensors (201, 202) arranged in series being arranged in such a manner that the displacement measurement ranges of adjacent magnetic field sensors overlap in an overlap range; and wherein the calculation unit being constructed in such a manner that, if the position of the magnet is not contained in an overlap range, it forms the position signal on the basis of the output signal which is output by the magnetic field sensor, in the displacement measurement range of which the magnet is located; characterized in that the calculation unit being further constructed in such a manner that, if the position of the magnet is contained in an overlap range, it forms the position signal on the basis of output signals which are output by the magnetic field sensors (201, 202) whose displacement measurement ranges overlap in the overlap range; and the overlap range between two displacement measurement ranges of adjacent magnetic field sensors (201, 202) is selected in such a manner that the total error of the position signal formed by the calculation unit in that overlap range is smaller than a maximum tolerable error. the magnet which can be displaced along a movement axis; a plurality of magnetic field sensors (201, 202), in particular a plurality of 3D Hall sensors or a plurality of linear Hall sensors, which are arranged in series and which are arranged parallel with the movement axis; and a calculation unit for forming a position signal which indicates the position of the magnet relative to the reference point; wherein each magnetic field sensor (201, 202) having a zero point (211, 212) and a displacement measurement range and being constructed in such a manner that it outputs an output signal (206, 207) which indicates a position of the magnet relative to the zero point of the magnetic field sensor and the precision with which the output signal indicates the position of the magnet decreases with increasing distance of the magnet from the zero point; wherein the plurality of magnetic field sensors (201, 202) arranged in series being arranged in such a manner that the displacement measurement ranges of adjacent magnetic field sensors overlap in an overlap range; and wherein the calculation unit being constructed in such a manner that, if the position of the magnet is not contained in an overlap range, it forms the position signal on the basis of the output signal which is output by the magnetic field sensor, in the displacement measurement range of which the magnet is located; the calculation unit being further constructed in such a manner that, if the position of the magnet is contained in an overlap range, it forms the position signal on the basis of output signals which are output by the magnetic field sensors (201, 202) whose displacement measurement ranges overlap in the overlap range; and the overlap range between two displacement measurement ranges of adjacent magnetic field sensors (201, 202) is selected in such a manner that the total error of the position signal formed by the calculation unit in that overlap range is smaller than a maximum tolerable error.