An engine controller used for an engine, the engine including an air flow meter that detects an intake air flow rate in an intake passage, the engine controller operating an actuator (15, 18, 19A, 21) installed in the engine, thereby controlling operation of the engine, and the engine controller being configured to execute: a first calculation process that calculates an intake air amount introduced into a cylinder of the engine, the first calculation process detecting the intake air amount based on a detection result of the air flow meter; a second calculation process that calculates the intake air amount based on at least one of a detected value of an intake pipe pressure and a throttle opening degree, without using the detection result of the air flow meter; a determination process that determines whether an intake air pulsation is great based on the intake air flow rate detected by the air flow meter, the determination process determining that the intake air pulsation is great if it is confirmed that a difference between an average flow rate (GAVE) and a minimum flow rate (GMIN) is great, the average flow rate (GAVE) being an average value of the intake air flow rate within a period of the intake air pulsation, and the minimum flow rate (GMIN) being a minimum value of the intake air flow rate within the period; and a calculation method switching process, wherein when the determination process does not determine that the intake air pulsation is great, the calculation method switching process selects a calculated value of the intake air amount that is obtained by the first calculation process as an intake air amount calculated value used to determine an operation amount of the actuator (15, 18, 19A, 21), and when the determination process determines that the intake air pulsation is great, the calculation method switching process selects a calculated value of the intake air amount that is obtained by the second calculation process as the intake air amount calculated value used to determine the operation amount of the actuator (15, 18, 19A, 21), wherein the determination process confirms that the difference between the average flow rate (GAVE) and the minimum flow rate (GMIN) is great if a difference obtained by subtracting an instantaneous value of the intake air flow rate detected by the air flow meter from the average flow rate (GAVE1) is great (S150: YES), wherein the instantaneous value is obtained within the period of intake air pulsation. a first calculation process that calculates an intake air amount introduced into a cylinder of the engine, the first calculation process detecting the intake air amount based on a detection result of the air flow meter; a second calculation process that calculates the intake air amount based on at least one of a detected value of an intake pipe pressure and a throttle opening degree, without using the detection result of the air flow meter; a determination process that determines whether an intake air pulsation is great based on the intake air flow rate detected by the air flow meter, the determination process determining that the intake air pulsation is great if it is confirmed that a difference between an average flow rate (GAVE) and a minimum flow rate (GMIN) is great, the average flow rate (GAVE) being an average value of the intake air flow rate within a period of the intake air pulsation, and the minimum flow rate (GMIN) being a minimum value of the intake air flow rate within the period; and a calculation method switching process, wherein when the determination process does not determine that the intake air pulsation is great, the calculation method switching process selects a calculated value of the intake air amount that is obtained by the first calculation process as an intake air amount calculated value used to determine an operation amount of the actuator (15, 18, 19A, 21), and when the determination process determines that the intake air pulsation is great, the calculation method switching process selects a calculated value of the intake air amount that is obtained by the second calculation process as the intake air amount calculated value used to determine the operation amount of the actuator (15, 18, 19A, 21), wherein the determination process confirms that the difference between the average flow rate (GAVE) and the minimum flow rate (GMIN) is great if a difference obtained by subtracting an instantaneous value of the intake air flow rate detected by the air flow meter from the average flow rate (GAVE1) is great (S150: YES),