A noninvasive optical sensor for analyzing a level of a substance in a subject by illuminating a sclera may include at least one light source, at least one detector, and a processor. The at least one light source may direct incident light to illuminate a region of the sclera of an eye of the subject. The at least one detector may receive light, in response to the incident light, from the sclera or from inside the eye proximal to the illuminated region of the sclera. The processor may be configured to compute a ratio of an intensity of the received light from the at least one detector to a reference value and to estimate a level of a substance in the subject from the computed ratio.