A programmable calibration circuit for sensors is proposed in this paper. It carries out gain and offset compensation by adding or subtracting appropriate correction factors to the transfer function of each sensor. Digital programmability makes it possible to automate calibration, paving the way for batch calibration. The circuit was designed for a specific sensor structure, a MIM-ISFET, which was modeled in HSpice. The proposed scheme reduces the offset and gain error due to process variations of both the sensor and the readout circuit. Offset error is reduced from 123 to 20 mV and gain error is reduced from 10.6 to 6.4 mV/pH. Relative error is reduced in the whole sensing range from 13 to 4 %. The circuit was designed in a 0.18 μm standard CMOS process, occupies an area of 115 × 100 μm2 and consumes 2.3 mW.