An engine controller comprising: a memory means for storing a loss torque characteristic of an engine as a learning value; and a present crank angle and present engine speed computing means; a loss torque learning means (40, S100) for updating the learning value (Tloss) which comprises: a computing means for computing a presently loss torque characteristic (Tgg) based on the present computed crank angle and the present computed engine speed; a smoothing means for smoothing the presently loss torque characteristic (Tgg); a first learning means for updating the learning value (Tloss) based on the learning value (Tloss) stored in the memory means and the presently computed smoothed loss torque characteristic (Tg); a storing means for storing the updated learning value (Tloss) in the memory means; the engine controller being characterized in that the computing means is further computing a presently loss torque (Tlossg) based on the present computed crank angle and the present computed engine speed and in that the loss torque learning means (40, S100) further comprises: a second learning means for updating the learning value based on the presently computed loss torque (Tlossg); and a switching means for switching between the first learning means and the second learning means in order to update the learning value. a memory means for storing a loss torque characteristic of an engine as a learning value; and a present crank angle and present engine speed computing means; a loss torque learning means (40, S100) for updating the learning value (Tloss) which comprises: a computing means for computing a presently loss torque characteristic (Tgg) based on the present computed crank angle and the present computed engine speed; a smoothing means for smoothing the presently loss torque characteristic (Tgg); a first learning means for updating the learning value (Tloss) based on the learning value (Tloss) stored in the memory means and the presently computed smoothed loss torque characteristic (Tg); a storing means for storing the updated learning value (Tloss) in the memory means; the engine controller being characterized in that the computing means is further computing a presently loss torque (Tlossg) based on the present computed crank angle and the present computed engine speed and in that the loss torque learning means (40, S100) further comprises: a second learning means for updating the learning value based on the presently computed loss torque (Tlossg); and a switching means for switching between the first learning means and the second learning means in order to update the learning value. a computing means for computing a presently loss torque characteristic (Tgg) based on the present computed crank angle and the present computed engine speed; a smoothing means for smoothing the presently loss torque characteristic (Tgg); a first learning means for updating the learning value (Tloss) based on the learning value (Tloss) stored in the memory means and the presently computed smoothed loss torque characteristic (Tg); a storing means for storing the updated learning value (Tloss) in the memory means; the engine controller being characterized in that the computing means is further computing a presently loss torque (Tlossg) based on the present computed crank angle and the present computed engine speed and in that the loss torque learning means (40, S100) further comprises: a second learning means for updating the learning value based on the presently computed loss torque (Tlossg); and a switching means for switching between the first learning means and the second learning means in order to update the learning value. a second learning means for updating the learning value based on the presently computed loss torque (Tlossg); and a switching means for switching between the first learning means and the second learning means in order to update the learning value.