A torque wrench is a tool used to apply precisely a specific torque to a fastener such as a nut or bolt. It is usually in the form of a socket wrench with special internal mechanisms. It was invented by Conrad Bahr in 1918 while working for the New York City Water Department. It was designed to prevent overtightening bolts on water main and steam pipe repairs underground.
A torque wrench is used where the tightness of screws and bolts is crucial. It allows the operator to measure the torque applied to the fastener so it can be matched to the specifications for a particular application. This permits proper tension and loading of all parts. A torque wrench measures torque as a proxy for bolt tension. The technique suffers from inaccuracy due to inconsistent or uncalibrated friction between the fastener and its mating hole. Measuring bolt tension (indirectly via bolt stretch) is actually what is desired, but often torque is the only practical measurement which can be made.
Torque screwdrivers and torque wrenches have similar purposes and mechanisms.