Measure the torque wrench length from the center of the hex drive to the center of the handle. This is dimension A.
Measure the length of the extension from the center of its hex, or jaws, to the center of the torque wrench's square drive. We'll call this dimension B.
Next we need to know two things: First is the desired torque we'd like to apply to the fastener—we'll call this T. Next we need to know what the torque wrench should be reading when the fastener is at the correct torque—this we'll call CT or corrected torque.