A method to determine the spring constant of a rectangular atomic force microscope cantilever is proposed that relies solely on the measurement of the resonant frequency and quality factor of the cantilever in fluid (typically air), and knowledge of its plan view dimensions. This method gives very good accuracy and improves upon the previous formulation by Sader [Rev. Sci. Instrum. 66, 3789 (1995)] which, unlike the present method, requires knowledge of both the cantilever density and thickness. (C) 1999 American Institute of Physics. [S0034-6748(99)04210-0].