A method for error compensation in a measurement of an electric motor's rotor position in a power steering system of a motor vehicle, wherein the electric motor generates a torque for assisting steering of the motor vehicle and wherein stray magnetic fields of electric motor currents affect the measurement of the rotor position with a rotor position sensor , which works based on a magnetic principle, with the following steps: - Measuring the rotor position (φ1) with the rotor position sensor , - Determining a target motor torque (T d ) based on signals representative of at least the vehicle velocity (v) and the torque (T TS ) applied to a steering wheel , - Transferring the target motor torque (T d ) into target voltages (U1), - Transforming the target voltages (U1) into a current vector (I1=(Iq,Id)) in the rotating reference frame (d-q) fixed to the rotor of the electric motor , - Transforming the currents (I1) into motor currents expressed in a coordinate system fixed to the stator of the electric motor characterized in that the method further involves the steps: - Calculating at least two compensation values (Comp XB ,Comp XA ) based on the current vector (I1) or a current vector (I1') which is transformed from motor currents into a coordinate system fixed to the rotor , the rotor position (φ1) and hardware dependent parameters, wherein the at least two compensation values (Comp XB ,Comp XA ) account for errors in the rotor position measurement due to stray magnetic fields of motor currents, - Calculating a compensated rotor position signal (16',φ2) by subtracting the at least two compensation values (Comp XB , Comp XA ) of the measured rotor position (φ1), and - Transferring the compensated rotor position signal (16',φ2) as part of a feed-back loop to the target motor torque (T d ) determination, wherein the at least two compensation values (Comp XB ,Comp XA ) are each given for a respective XB and XA harmonic by a trigonometric function of the rotor position (φ1), wherein an amplitude is dependent on the length of the current vector (I1), a phase shift is dependent on the angle of the current vector (I1) and the periodic length is proportional to the number XB, XA of the respective harmonic, and wherein the harmonic XA= P+1 and the harmonic XB= P-1, wherein P is the number of motor pole pairs of the electric motor . - Measuring the rotor position (φ1) with the rotor position sensor , - Determining a target motor torque (T d ) based on signals representative of at least the vehicle velocity (v) and the torque (T TS ) applied to a steering wheel , - Transferring the target motor torque (T d ) into target voltages (U1), - Transforming the target voltages (U1) into a current vector (I1=(Iq,Id)) in the rotating reference frame (d-q) fixed to the rotor of the electric motor , - Transforming the currents (I1) into motor currents expressed in a coordinate system fixed to the stator of the electric motor - Calculating at least two compensation values (Comp XB ,Comp XA ) based on the current vector (I1) or a current vector (I1') which is transformed from motor currents into a coordinate system fixed to the rotor , the rotor position (φ1) and hardware dependent parameters, wherein the at least two compensation values (Comp XB ,Comp XA ) account for errors in the rotor position measurement due to stray magnetic fields of motor currents, - Calculating a compensated rotor position signal (16',φ2) by subtracting the at least two compensation values (Comp XB , Comp XA ) of the measured rotor position (φ1), and - Transferring the compensated rotor position signal (16',φ2) as part of a feed-back loop to the target motor torque (T d ) determination, <EOS>