The invention provides an electrically operated valve which can more accurately detect a position of a valve body. An electrically operated valve is provided with a valve shaft, a valve body, a rotor member which is movable together with the valve shaft in a parallel direction to a first direction, a stator member which applies a turning force to the rotor member, a permanent magnet member which turns together with the rotor member, an angle sensor which detects an angle of rotation of the permanent magnet, and a guide member which guides a relative movement of the rotor member or the valve shaft in relation to the permanent magnet member. A distance between the permanent magnet and the angle sensor is fixed when the permanent magnet member turns.