Sensor drift from slowly changing environmental conditions and other instabilities can greatly degrade a chemical sensor\u27s performance, resulting in poor identification and analyte quantification. In the present work, estimation theory (i.e., various forms of the Kalman filter) is used for online compensation of baseline drift in the response of chemical sensors. Two different cases, which depend on the knowledge of the characteristics of the sensor system, are studied. First, an unknown input is considered, which represents the practical case of analyte detection and quantification. Then, the more general case, in which the sensor parameters and the input are both unknown, is studied. The techniques are applied to simulated sensor data, for which the true baseline and response are known, and to actual liquid-phase SH-SAW sensor data measured during the detection of organophosphates. It is shown that the technique is capable of estimating the baseline signal and recovering the true sensor signal due only to the presence of the analyte. This is true even when the baseline drift changes rate or direction during the detection process or when the analyte is not completely flushed from the system