A motor control device, configured to control a motor, comprising: a power converter, configured to apply a voltage to the motor according to a voltage command input to the power converter; a current controller, configured to calculate the voltage command input to the power converter using a detection result of a current value of a drive current of the motor so that a current value specified by a current command input to the current controller coincides with the current value of the drive current of the motor; a current command generation unit, configured to specify a frequency for motor constant calculation on the basis of an electrical time constant of the motor, generates a sine wave of the frequency for motor constant calculation, and inputs the sine wave to the current controller as the current command; and a motor constant calculation unit, configured to obtain a frequency response in which the voltage command and the current value of the drive current of the motor are an input and an output, respectively, while the sine wave is input to the current controller by the current command generation unit as the current command, and calculates resistance and inductance of the motor from the obtained frequency response, wherein the current command generation unit is further configured to determine whether or not a present frequency band of a current control loop is equal to or higher than the frequency for motor constant calculation, to cause the frequency band of the current control loop including the power converter and the current controller to be lower than the frequency for motor constant calculation when the present frequency band of the current control loop is determined to be equal to or higher than the frequency for motor constant calculation, and then to generate the sine wave of the frequency for motor constant calculation, and to input the sine wave to the current controller as the current command. a power converter, configured to apply a voltage to the motor according to a voltage command input to the power converter; a current controller, configured to calculate the voltage command input to the power converter using a detection result of a current value of a drive current of the motor so that a current value specified by a current command input to the current controller coincides with the current value of the drive current of the motor; a current command generation unit, configured to specify a frequency for motor constant calculation on the basis of an electrical time constant of the motor, generates a sine wave of the frequency for motor constant calculation, and inputs the sine wave to the current controller as the current command; and a motor constant calculation unit, configured to obtain a frequency response in which the voltage command and the current value of the drive current of the motor are an input and an output, respectively, while the sine wave is input to the current controller by the current command generation unit as the current command, and calculates resistance and inductance of the motor from the obtained frequency response, wherein the current command generation unit is further configured to determine whether or not a present frequency band of a current control loop is equal to or higher than the frequency for motor constant calculation, to cause the frequency band of the current control loop including the power converter and the current controller to be lower than the frequency for motor constant calculation when the present frequency band of the current control loop is determined to be equal to or higher than the frequency for motor constant calculation, and then to generate the sine wave of the frequency for motor constant calculation, and to input the sine wave to the current controller as the current command.