A motor controller comprising: a control signal output device that outputs a motor control signal; and a drive circuit that outputs three-phase electric power for drive based on the motor control signal, wherein the drive circuit includes switching arms (18u, 18v, 18w), in each of which a pair of switching devices (18a - 18f) each turned on and off according to the motor control signal are connected in series, the switching arms (18u, 18v, 18w) being connected to each other in parallel, corresponding to respective phases, the switching arms (18u, 18v, 18w) have, on a lower potential side thereof, electric current sensors (21u, 21v, 21w) that detect phase current values of the respective phases corresponding to the respective switching arms (18u, 18v, 18w), and the control signal output device generates the motor control signal by performing electric current feedback control based on phase current values of the respective phases that are detected at a timing at which all the switching devices on the lower potential side in the switching arms (18u, 18v, 18w) are turned on, wherein, when an on time of any one of the switching devices on the lower potential side becomes shorter than a detection time required to detect the electric current value, the control signal output device performs the electric current feedback control by estimating the phase current value of an electric current undetectable phase based on the phase current values of the two phases other than the electric current undetectable phase, characterized in that, when the control signal output device estimates the phase current value of the electric current undetectable phase based on the phase current values of the two phases other than the electric current undetectable phase, the control signal output device outputs the motor control signal, by which a switching state of the switching arm of the electric current undetectable phase is maintained and the power loss caused by a switching operation of the switching devices in the two phases other than the electric current undetectable phase is compensated for, wherein the control signal output device calculates voltage command values of the respective phases by performing the electric current feedback control based on the detected phase current values of the respective phases and generates the motor control signal based on DUTY command values corresponding to the voltage command values, wherein, when the control signal output device estimates the phase current value of the electric current undetectable phase based on the phase current values of the two phases other than the electric current undetectable phase, the control signal output device raises the DUTY command values of the respective phases to a higher potential side so that the DUTY command value of the electric current undetectable phase becomes a value such that the switching device of the electric current undetectable phase on the higher potential side is maintained in an on state to maintain the switching state of the switching arm of the electric current undetectable phase, and, in order to compensate for a power loss caused by the switching operation of the switching devices in the two phases other than the electric current undetectable phase, the control signal output device calculates an equivalent resistance corresponding to the power loss and voltage drop values of the two phases based on the phase current values of the two phases other than the electric current undetectable phase and adds correction values corresponding to the voltage drop values to the DUTY command values of the two phases other than the electric current undetectable phase. a control signal output device that outputs a motor control signal; and a drive circuit that outputs three-phase electric power for drive based on the motor control signal, wherein