An electric compressor comprising: a compressor that can be a constituent of an air conditioner; a motor for driving the compressor; and a control device that is configured to control an operation of the motor, wherein the control device includes: DC input current measuring means for measuring a DC current to a three-phase PWM inverter that is configured to drive the motor by inputting DC, and to estimate a current supplied to the motor from a measurement result of the DC input current measuring means to control the motor, a motor current detection unit that is connected to the DC input current measuring means and is configured to calculate each of three-phase currents in the motor; a three-phase voltage command calculation unit that is configured to calculate a three-phase voltage command provided to the motor from the three-phase currents calculated by the motor current detection unit; and a three-phase PWM waveform creation unit that has a carrier wave generation unit characterised in that the carrier wave generation unit is configured to generate three carrier waves having an order at a certain time interval Ts, and to generate a control signal for the three-phase PWM inverter by level comparison between three-phase voltage reference signals of a U phase, a V phase and a W phase that constitute the three-phase voltage command calculated by the three-phase voltage command calculation unit and the carrier waves generated by the carrier wave generation unit, and that the DC input current measuring means is configured to detect the DC current with a sampling time of the certain time interval Ts or more for two phases among the U phase, the V phase and the W phase when the three carrier waves rise and/or when the three carrier waves fall. a compressor that can be a constituent of an air conditioner; a motor for driving the compressor; and a control device that is configured to control an operation of the motor, wherein the control device includes: DC input current measuring means for measuring a DC current to a three-phase PWM inverter that is configured to drive the motor by inputting DC, and to estimate a current supplied to the motor from a measurement result of the DC input current measuring means to control the motor, a motor current detection unit that is connected to the DC input current measuring means and is configured to calculate each of three-phase currents in the motor; a three-phase voltage command calculation unit that is configured to calculate a three-phase voltage command provided to the motor from the three-phase currents calculated by the motor current detection unit; and a three-phase PWM waveform creation unit that has a carrier wave generation unit characterised in that the carrier wave generation unit is configured to generate three carrier waves having an order at a certain time interval Ts, and to generate a control signal for the three-phase PWM inverter by level comparison between three-phase voltage reference signals of a U phase, a V phase and a W phase that constitute the three-phase voltage command calculated by the three-phase voltage command calculation unit and the carrier waves generated by the carrier wave generation unit, and that the DC input current measuring means is configured to detect the DC current with a sampling time of the certain time interval Ts or more for two phases among the U phase, the V phase and the W phase when the three carrier waves rise and/or when the three carrier waves fall. DC input current measuring means for measuring a DC current to a three-phase PWM inverter that is configured to drive the motor by inputting DC, and to estimate a current supplied to the motor from a measurement result of the DC input current measuring means to control the motor, a motor current detection unit that is connected to the DC input current measuring means and is configured to calculate each of three-phase currents in the motor; a three-phase voltage command calculation unit that is configured to calculate a three-phase voltage command provided to the motor from the three-phase currents calculated by the motor current detection unit; and a three-phase PWM waveform creation unit that has a carrier wave generation unit characterised in that the carrier wave generation unit is configured to generate three carrier waves having an order at a certain time interval Ts, and to generate a control signal for the three-phase PWM inverter by level comparison between three-phase voltage reference signals of a U phase, a V phase and a W phase that constitute the three-phase voltage command calculated by the three-phase voltage command calculation unit and the carrier waves generated by the carrier wave generation unit, and that the DC input current measuring means is configured to detect the DC current with a sampling time of the certain time interval Ts or more for two phases among the U phase, the V phase and the W phase when the three carrier waves rise and/or when the three carrier waves fall.