Device for contactless determination of a position of a pedal in a vehicle, featuring at least one magnet and a sensor, wherein - the magnet generates a magnetic field that changes with the position of the pedal and that can be detected by the sensor, the sensor features an output for providing at least one sensor signal, wherein - the device features a processing aid, - the processing aid features inputs for reading in the at least one sensor signal and outputs for outputting an output signal, - a first and a second position range (13, 14) is defined, wherein each position range (13, 14) comprises positions of the magnet to the sensor, - the processing aid generates from the at least one sensor signal an output signal, wherein the output signal in the first position range receives values that are clearly allocated to a position of the magnet relative to the sensor, and in the second position range receives a constant value that is independent of the position of the magnet relative to the sensor, characterized in that - the sensor records at least two spatial components of the magnetic field, - the sensor makes it possible to determine a gradient from each of the at least two spatial components of the magnetic field and to calculate from the gradients a position signal and/or a signal strength, wherein the position signal and/or the signal strength can be made available as sensor signals at the output and be transferred to the processing aid, a) the processing aid generates the output signal, where at a signal strength of less than a first stored threshold value, a constant value is output as the output signal and otherwise the position signal is output as the output signal, or b) the processing aid generates the output signal according to a case differentiation, wherein at a position signal of greater than a second stored threshold value or at a signal strength of less than a third stored threshold value a constant value is output as the output signal and otherwise the position signal is output as the output signal. - the magnet generates a magnetic field that changes with the position of the pedal and that can be detected by the sensor, the sensor features an output for providing at least one sensor signal, wherein - the device features a processing aid, - the processing aid features inputs for reading in the at least one sensor signal and outputs for outputting an output signal, - a first and a second position range (13, 14) is defined, wherein each position range (13, 14) comprises positions of the magnet to the sensor, - the processing aid generates from the at least one sensor signal an output signal, wherein the output signal in the first position range receives values that are clearly allocated to a position of the magnet relative to the sensor, and in the second position range receives a constant value that is independent of the position of the magnet relative to the sensor, characterized in that - the sensor records at least two spatial components of the magnetic field, - the sensor makes it possible to determine a gradient from each of the at least two spatial components of the magnetic field and to calculate from the gradients a position signal and/or a signal strength, wherein the position signal and/or the signal strength can be made available as sensor signals at the output and be transferred to the processing aid, a) the processing aid generates the output signal, where at a signal strength of less than a first stored threshold value, a constant value is output as the output signal and otherwise the position signal is output as the output signal, or b) the processing aid generates the output signal according to a case differentiation, wherein at a position signal of greater than a second stored threshold value or at a signal strength of less than a third stored threshold value a constant value is output as the output signal and otherwise the position signal is output as the output signal. a) the processing aid generates the output signal, where at a signal strength of less than a first stored threshold value, a constant value is output as the output signal and otherwise the position signal is output as the output signal, or b) the processing aid generates the output signal according to a case differentiation, wherein at a position signal of greater than a second stored threshold value or at a signal strength of less than a third stored threshold value a constant value is output as the output signal and otherwise the position signal is output as the output signal.