The photodiode sensitivity in the atomic force microscope is calibrated by relating the voltage noise to the thermal fluctuations of the cantilever angle. The method accounts for the ratio of the thermal fluctuations measured in the fundamental vibration mode to the total, and also for the tilt and extended tip of the cantilever. The method is noncontact and is suitable for soft or deformable surfaces where the constant compliance method cannot be used. For hard surfaces, the method can also be used to calibrate the cantilever spring constant.