Calibration of the torsional spring constant of atomic force microscopy cantilevers is fundamental to a range of applications, from nanoscale friction and lubrication measurements to the characterization of micro-electromechanical systems and the response of biomolecules to external stimuli. Existing calibration methods are either time consuming and destructive (ex situ static approaches), or rely on models using the frequency and quality factor (Q-factor) of the cantilever torsional resonance as input parameters (in situ dynamical approaches). While in situ approaches are usually preferred for their easy implementation and preservation of the cantilever, their dependence on the torsional resonance Q-factor renders calibration in highly viscous environments challenging. This is problematic, for example, in many nanoscale tribological applications. Here, we propose a calibration method that does not depend on the cantilever torsional Q-factor and show how the cantilever deflection can be converted into a lateral force. The method is tested with six cantilevers of different shapes and material composition and in six fluid media. The derived spring constants are compared with predictions from existing methods, demonstrating a higher precision, in particular, for highly viscous liquids.