All different types of engines used throughout history are presented and different typologies are discussed. A typology based on the working principle of the machine  is established as the basis for this work. Then a thorough mechanical analysis of the counterweight trebuchet is presented. Each factor, like dimensions of different parts, mass of the counterweight and of the missile, sling length and axle height, is discussed separately and its contribution to the range of the machine is assessed. A formula is given to define the maximum theoretical range of a trebuchet: