An air conditioner comprising: an outdoor unit having a compressor for compressing a refrigerant; at least one indoor unit; a storage configured to store a control algorithm previously learned to control of a component included in the air conditioner; and a controller, wherein the controller is configured to: in response to the air conditioner being set to a first mode, control either or both of an outdoor unit and at least one indoor unit, regardless of a control algorithm; based on first data acquired while the first mode is set, train a power quantity learning model related to an actual power quantity consumed by the air conditioner while the first mode is set; in response to the air conditioner being set to a second mode, control either or both of the outdoor unit and the at least one indoor unit based on the control algorithm; and calculate an estimated power quantity corresponding to the second mode based on the second data acquired while the second mode is set and the power quantity learning model, and an actual power quantity consumed by the air conditioner while the second mode is set, characterized in that the controller is configured to: in response to the air conditioner being set to the first mode, acquire the first data for a predetermined time; calculate an estimated power quantity corresponding to the first mode, by using the first data acquired for the predetermined time and the power quantity learning model; and when a difference between the estimated power quantity corresponding to the first mode and an actual power quantity consumed by the air conditioner for the predetermined time is equal to or greater than a present reference, train the power quantity learning model based on the first data acquired for the predetermined time. an outdoor unit having a compressor for compressing a refrigerant; at least one indoor unit; a storage configured to store a control algorithm previously learned to control of a component included in the air conditioner; and a controller, wherein the controller is configured to: in response to the air conditioner being set to a first mode, control either or both of an outdoor unit and at least one indoor unit, regardless of a control algorithm; based on first data acquired while the first mode is set, train a power quantity learning model related to an actual power quantity consumed by the air conditioner while the first mode is set; in response to the air conditioner being set to a second mode, control either or both of the outdoor unit and the at least one indoor unit based on the control algorithm; and calculate an estimated power quantity corresponding to the second mode based on the second data acquired while the second mode is set and the power quantity learning model, and an actual power quantity consumed by the air conditioner while the second mode is set, in response to the air conditioner being set to a first mode, control either or both of an outdoor unit and at least one indoor unit, regardless of a control algorithm; based on first data acquired while the first mode is set, train a power quantity learning model related to an actual power quantity consumed by the air conditioner while the first mode is set; in response to the air conditioner being set to a second mode, control either or both of the outdoor unit and the at least one indoor unit based on the control algorithm; and calculate an estimated power quantity corresponding to the second mode based on the second data acquired while the second mode is set and the power quantity learning model, and an actual power quantity consumed by the air conditioner while the second mode is set, characterized in that the controller is configured to: in response to the air conditioner being set to the first mode, acquire the first data for a predetermined time; calculate an estimated power quantity corresponding to the first mode, by using the first data acquired for the predetermined time and the power quantity learning model; and when a difference between the estimated power quantity corresponding to the first mode and an actual power quantity consumed by the air conditioner for the predetermined time is equal to or greater than a present reference, train the power quantity learning model based on the first data acquired for the predetermined time. in response to the air conditioner being set to the first mode, acquire the first data for a predetermined time; calculate an estimated power quantity corresponding to the first mode, by using the first data acquired for the predetermined time and the power quantity learning model; and when a difference between the estimated power quantity corresponding to the first mode and an actual power quantity consumed by the air conditioner for the predetermined time is equal to or greater than a present reference, train the power quantity learning model based on the first data acquired for the predetermined time.