Method for determining an angle difference (PhiOffs_opt) between a zero position of a rotor position sensor of an electric machine and an orientation of the permanent magnets of the electric machine, wherein the electric machine is controlled by means of a field-oriented control with a current controller and the rotor of the electric machine rotates, comprising the steps of: specifying a first d setpoint current value (ld_soll_1) not equal to zero amperes as a reference variable of the current controller and specifying a first q setpoint current value (lq_soll_1) as a reference variable of the current controller; determining a first d setpoint voltage (Ud_soll_1) and a first q setpoint voltage (Uq_soll_1) as resulting manipulated variables of the current controller; specifying a second d setpoint current value (ld_soll_2) as a reference variable of the current controller, wherein the second d setpoint current value (ld_soll_2) corresponds to the value of the first d setpoint current value (Id_soll_1) with complementary signs, and specifying a second q setpoint current value (lq_soll_2) as a reference variable of the current controller, wherein the second q setpoint current value (lq_soll_2) corresponds to the value of the first q setpoint current value (lq_soll_1) with complementary signs; determining a second d setpoint voltage (Ud_soll_2) and a second q setpoint voltage (Uq_soll_2) as resulting manipulated variables of the current controller; determining an angle error (PhiErr_opt) depending on the determined first d setpoint voltage (Ud_soll_1), the first q setpoint voltage (Uq_soll_1), the second d setpoint voltage (Ud_soll_2) and the second q setpoint voltage (Uq_soll_2); determining the angle difference (PhiOffs_opt) depending on the angle error (PhiErr_opt). wherein the electric machine is controlled by means of a field-oriented control with a current controller and the rotor of the electric machine rotates, comprising the steps of: specifying a first d setpoint current value (ld_soll_1) not equal to zero amperes as a reference variable of the current controller and specifying a first q setpoint current value (lq_soll_1) as a reference variable of the current controller; determining a first d setpoint voltage (Ud_soll_1) and a first q setpoint voltage (Uq_soll_1) as resulting manipulated variables of the current controller; specifying a second d setpoint current value (ld_soll_2) as a reference variable of the current controller, wherein the second d setpoint current value (ld_soll_2) corresponds to the value of the first d setpoint current value (Id_soll_1) with complementary signs, and specifying a second q setpoint current value (lq_soll_2) as a reference variable of the current controller, wherein the second q setpoint current value (lq_soll_2) corresponds to the value of the first q setpoint current value (lq_soll_1) with complementary signs; determining a second d setpoint voltage (Ud_soll_2) and a second q setpoint voltage (Uq_soll_2) as resulting manipulated variables of the current controller; determining an angle error (PhiErr_opt) depending on the determined first d setpoint voltage (Ud_soll_1), the first q setpoint voltage (Uq_soll_1), the second d setpoint voltage (Ud_soll_2) and the second q setpoint voltage (Uq_soll_2); determining the angle difference (PhiOffs_opt) depending on the angle error (PhiErr_opt). specifying a first d setpoint current value (ld_soll_1) not equal to zero amperes as a reference variable of the current controller and specifying a first q setpoint current value (lq_soll_1) as a reference variable of the current controller; determining a first d setpoint voltage (Ud_soll_1) and a first q setpoint voltage (Uq_soll_1) as resulting manipulated variables of the current controller; specifying a second d setpoint current value (ld_soll_2) as a reference variable of the current controller, wherein the second d setpoint current value (ld_soll_2) corresponds to the value of the first d setpoint current value (Id_soll_1) with complementary signs, and specifying a second q setpoint current value (lq_soll_2) as a reference variable of the current controller, wherein the second q setpoint current value (lq_soll_2) corresponds to the value of the first q setpoint current value (lq_soll_1) with complementary signs; determining a second d setpoint voltage (Ud_soll_2) and a second q setpoint voltage (Uq_soll_2) as resulting manipulated variables of the current controller; determining an angle error (PhiErr_opt) depending on the determined first d setpoint voltage (Ud_soll_1), the first q setpoint voltage (Uq_soll_1), the second d setpoint voltage (Ud_soll_2) and the second q setpoint voltage (Uq_soll_2); determining the angle difference (PhiOffs_opt) depending on the angle error (PhiErr_opt).