Taking your example, if the offset is 4", your torque is refactored by 1.33 (4" = ~.33ft) so for instance the 30 ft-lb setting would refactor to 30 x 1.33 = 39.9 ft-lb of torque. So to get~50 lbs of torque, 50 ÷ 1.33 = ~37.6 so if you set your torque wrench for 38 lbs you'll get 50.54 ft-lbs of final torque.
You don't have to calculate the length of your torque wrench in at all. If it's reading accurately at the drive, you simply add in the additional torque of the offset.