An eye-mountable device includes an electrochemical sensor embedded in a polymeric material configured for mounting to a surface of an eye. The electrochemical sensor includes a working electrode, a reference electrode, and a reagent that selectively reacts with an analyte to generate a sensor measurement related to a concentration of the analyte in a fluid to which the eye-mountable device is exposed. A calibration-solution measurement is obtained while the eye-mountable device is exposed to a calibration solution. A calibration value is determined based on at least the calibration-solution measurement and an analyte concentration of the calibration solution. A tear-film measurement is obtained while the eye-mountable device is mounted to an eye so as to be exposed to tear film. The analyte concentration of the tear film is determined based on at least the tear-film measurement and the calibration value.