An inverter comprising: a power rectifier arranged to rectify AC power from an AC power supply and to convert it into DC power, a power inverter arranged to convert the DC power into variable voltage variable frequency AC power, a current detector arranged to detect an electric current of an AC motor that is speed-controlled with the AC power output from the power inverter, and a control unit arranged to control the power rectifier and the power inverter in accordance with the electric current detected by the current detector, characterized in that: the control unit has an adding/subtracting unit that is arranged electronically to: when the AC motor is in an overload operation, perform addition with a weighted value according to the electric current detected by the current detector in the overload operation of the AC motor; and when the AC motor is not in an overload operation, perform subtraction, from an integrated value that was obtained by addition when the AC motor was in the overload operation, with a weighted value commensurate with the current squared times time of the electric current detected by the current detector when the AC motor was in the overload operation, and the control unit further has an electronic heat time limit unit that stops the AC motor when the AC motor is in the overload operation on the basis of the integrated value in the adding/subtracting unit and a previously set electronic heat time limit characteristic. a power rectifier arranged to rectify AC power from an AC power supply and to convert it into DC power, a power inverter arranged to convert the DC power into variable voltage variable frequency AC power, a current detector arranged to detect an electric current of an AC motor that is speed-controlled with the AC power output from the power inverter, and a control unit arranged to control the power rectifier and the power inverter in accordance with the electric current detected by the current detector, characterized in that: the control unit has an adding/subtracting unit that is arranged electronically to: when the AC motor is in an overload operation, perform addition with a weighted value according to the electric current detected by the current detector in the overload operation of the AC motor; and when the AC motor is not in an overload operation, perform subtraction, from an integrated value that was obtained by addition when the AC motor was in the overload operation, with a weighted value commensurate with the current squared times time of the electric current detected by the current detector when the AC motor was in the overload operation, and the control unit further has an electronic heat time limit unit that stops the AC motor when the AC motor is in the overload operation on the basis of the integrated value in the adding/subtracting unit and a previously set electronic heat time limit characteristic. the control unit has an adding/subtracting unit that is arranged electronically to: when the AC motor is in an overload operation, perform addition with a weighted value according to the electric current detected by the current detector in the overload operation of the AC motor; and when the AC motor is not in an overload operation, perform subtraction, from an integrated value that was obtained by addition when the AC motor was in the overload operation, with a weighted value commensurate with the current squared times time of the electric current detected by the current detector when the AC motor was in the overload operation, and when the AC motor is in an overload operation, perform addition with a weighted value according to the electric current detected by the current detector in the overload operation of the AC motor; and when the AC motor is not in an overload operation, perform subtraction, from an integrated value that was obtained by addition when the AC motor was in the overload operation, with a weighted value commensurate with the current squared times time of the electric current detected by the current detector when the AC motor was in the overload operation, and the control unit further has an electronic heat time limit unit that stops the AC motor when the AC motor is in the overload operation on the basis of the integrated value in the adding/subtracting unit and a previously set electronic heat time limit characteristic.