A system and method for calibrating a sensor. The method may include, withoutlimitation, compiling an array of data relating to the sensor adjusting asensor parameter a first time based on data in the array adjusting a curverepresenting the sensor output based on data in the array and adjusting thesensor parameter a second time based on data in the array. The sensor may bean in vivo glucose sensor and the sensor parameter adjusted may be a current.The array may include historical as well as recent data, such as, for example,blood glucose readings and sensor electrode readings.