Systems and methods are disclosed for non-invasively measuring blood glucose levels in a biological sample based on spectral data. A variety of techniques are disclosed for improving signal-to-noise ratio in the acquisition of spectral data and calculating attenuance of light attributable to blood in a sample. Disclosed techniques include (1) using a standard deviation operation in conjunction with the logarithm function, (2) using a normalization factor, (3) using a ratio factor, (4) accounting for the effect of temperature on various system components such as resistors, and (5) accounting for dark current in a light detector by performing a calibration.