Abstract Sensors calibration plays a crucial role in controlling systems and achieving fault-tolerant control by ensuring accuracy, performance, safety, energy efficiency, and compliance with standards. It is an essential to maintain the reliability and effectiveness of modern control systems across various applications. In this paper, we represent a new algorithm that processes a set of raw data collected by a sensor to find the mapping function that relates the raw data to the real value of the measured signal by the sensor. Working on sensors with an unknown mapping function, unknown parameters, or with external disturbances, that affects their behaviour, represents a problem; moreover, it takes a lot of time and effort to calibrate the sensor before each use. Several techniques were used to overcome these aspects mostly by recording the output of the sensor for different input values that change manually, to calibrate the sensor. However, the represented technique in this paper can easily provide us with the input/output model of a specific sensor by doing only one experiment; it also improves the accuracy of the measurements as it is a self-calibrating technique that reduces the nonlinearity and noise problems to deliver a better estimation of the measured signal, which is validated in this paper experimentally using a low-cost current sensor by comparing the obtained results from this algorithm with the results using the extracted input/output model illustrated in the datasheet. Furthermore, if the sensor is pretty poor, and if the application requires more precision, the provided estimation by the mapping function can be mixed with other sensor/s readings using sensor fusion algorithms to find a more precise value of the input. The represented algorithm can also perform self-calibration while evaluating the functionality of the application and the variations of the temperature and other external disturbances that affect the sensor.