A resonator in the form of a cylindrical body is immersed in a fluid to be measured and excited by a piezoelectric transducer in the vicinity of its natural frequency. The vibration frequency is stabilized by a feedback loop. In that feedback loop a phase shift is introduced which can be switched between to discrete values. The resulting difference in frequency of oscillation of the resonator is proportional to the damping ratio of the resonator and is, therefore, a measure for the viscosity of the fluid. The natural frequency of the piezoelectric transducer is substantially higher than the natural frequency of the resonator, and the oscillation of the resonator is mechanically isolated from the housing by an inertial mass - spring arrangement with low natural frequency.