The octane rating is a number that determines how well the air-fuel mixture can resist spontaneous ignition caused by excessive heat outside the regular combustion stroke, which is known as engine knocking.