Biological and chemical sensor systems have many potentially transformative applications including health care, environmental monitoring, and biological or chemical threat detection. A major impediment in the widespread use of low-cost sensors, such as ChemFETs (Chemically sensitive Field-Effect Transistors), is the degradation in accuracy due to drift which occurs immediately after deployment. This paper presents a fully automated soft-calibration technique that extends the lifetime of sensors by compensating drift. The proposed methodology is applied to pH sensors, which can be manufactured for less than 10 cents. Experimental results show that we can achieve very accurate results even if the sensor output has drifted by more than 600%. The proposed technique has been shown to extend the usable time of the ISFET sensor from mere minutes to 8 hours.