An electric power control method that controls electric power supplied to a motor, the electric power control method comprising: - a current measuring step of measuring a current supplied to the motor at timing at which a carrier wave becomes a maximum or a minimum; - a calculating step of calculating a duty command value according to the measured current in the current measuring step and a request torque to the motor; - an operating step of comparing a part of the carrier wave during which the carrier wave monotonously changes from one of the maximum value and the minimum value to the other with the duty command value in magnitude, the operating step performing a switching operation of switching elements (Tr) according to a result of the comparison; - a determining step of determining whether to change an operation period within which the operating step is performed so as to be longer than one cycle of the carrier wave by adding an intermediate period or not; - a first step of reducing the number of switching operations of the switching elements (Tr) in a first half cycle of the carrier wave starting from a start timing of the operation period after the change during which the carrier wave monotonously changes when the change of the operation period is determined in the determining step; - a comparing step of changing a slope of the carrier wave in the intermediate period between the first half cycle of the carrier wave and a last half cycle of the carrier wave in the operation period after the change to compare the carrier wave with the duty command value in the magnitude, the comparing step performing the switching operation of the switching elements (Tr) according to a result of the comparison; and - a second step of reducing the number of switching operations of the switching elements (Tr) in the last half cycle of the carrier wave, characterized in that wherein - the first step of reducing the number of switching operations sets one of the maximum value and the minimum value of the carrier wave to the duty command value according to whether the slope of the carrier wave in the intermediate period is positive or negative, and - the second step of reducing the number of switching operations sets the other to the duty command value. - a current measuring step of measuring a current supplied to the motor at timing at which a carrier wave becomes a maximum or a minimum; - a calculating step of calculating a duty command value according to the measured current in the current measuring step and a request torque to the motor; - an operating step of comparing a part of the carrier wave during which the carrier wave monotonously changes from one of the maximum value and the minimum value to the other with the duty command value in magnitude, the operating step performing a switching operation of switching elements (Tr) according to a result of the comparison; - a determining step of determining whether to change an operation period within which the operating step is performed so as to be longer than one cycle of the carrier wave by adding an intermediate period or not; - a first step of reducing the number of switching operations of the switching elements (Tr) in a first half cycle of the carrier wave starting from a start timing of the operation period after the change during which the carrier wave monotonously changes when the change of the operation period is determined in the determining step; - a comparing step of changing a slope of the carrier wave in the intermediate period between the first half cycle of the carrier wave and a last half cycle of the carrier wave in the operation period after the change to compare the carrier wave with the duty command value in the magnitude, the comparing step performing the switching operation of the switching elements (Tr) according to a result of the comparison; and - a second step of reducing the number of switching operations of the switching elements (Tr) in the last half cycle of the carrier wave, characterized in that wherein - the first step of reducing the number of switching operations sets one of the maximum value and the minimum value of the carrier wave to the duty command value according to whether the slope of the carrier wave in the intermediate period is positive or negative, and - the second step of reducing the number of switching operations sets the other to the duty command value.