A construction machine comprising: an engine; a generator driven by the engine; a capacitor storing power generated by the generator; an electric or electronic facility driven or controlled by power supplied from the capacitor; and a controller performing automatic stop control to stop the engine in a case where a preset automatic stop condition is satisfied, the construction machine characterized in that the controller controlling power supplied from the capacitor to the electric or electronic facility, estimating a charge amount by which the capacitor is charged by the generator while the engine is in operation, estimating an electric discharge amount corresponding to power supplied from the capacitor to the electric or electronic facility while the engine is stopped under the automatic stop control, and stopping supply of power from the capacitor to the electric or electronic facility in a case where the engine is stopped under the automatic stop control and the electric discharge amount is determined to be larger than the charge amount, wherein the controller estimates the charge amount by which the capacitor is charged by the generator on a basis of a preset constant indicating a relationship between an operation time of the engine and the charge amount of the capacitor, and estimates the electric discharge amount corresponding to power supplied from the capacitor to the electric or electronic facility on a basis of a preset constant indicating a relationship between a stop time of the engine under the automatic stop control and the electric discharge amount of the electric or electronic facility. an engine; a generator driven by the engine; a capacitor storing power generated by the generator; an electric or electronic facility driven or controlled by power supplied from the capacitor; and a controller performing automatic stop control to stop the engine in a case where a preset automatic stop condition is satisfied, the construction machine characterized in that the controller controlling power supplied from the capacitor to the electric or electronic facility, estimating a charge amount by which the capacitor is charged by the generator while the engine is in operation, estimating an electric discharge amount corresponding to power supplied from the capacitor to the electric or electronic facility while the engine is stopped under the automatic stop control, and stopping supply of power from the capacitor to the electric or electronic facility in a case where the engine is stopped under the automatic stop control and the electric discharge amount is determined to be larger than the charge amount, wherein the controller estimates the charge amount by which the capacitor is charged by the generator on a basis of a preset constant indicating a relationship between an operation time of the engine and the charge amount of the capacitor, and estimates the electric discharge amount corresponding to power supplied from the capacitor to the electric or electronic facility on a basis of a preset constant indicating a relationship between a stop time of the engine under the automatic stop control and the electric discharge amount of the electric or electronic facility.