Air quality directly affects the health of humans. The health implications of poor air quality are recognized by professionals and the public alike and these concerns have driven both the proliferation of formal sensor networks, but also low-cost sensors which can be used in the home. The advancement of technology in recent years has also led to the rapid development of low-cost sensors. Given that citizens are concerned about the air quality of the environment in which they live, they are turning to the supply of low-cost sensors, as they are affordable. The question of the reliability of measurements from low-cost sensors remains an area of research. In this research work, the optimization of ozone (O3) and nitrogen dioxide (NO2) measurements of low-cost electrochemical air quality sensors is investigated by applying nonlinear regression, using a second-order polynomial equation as a correction factor. The proposed correction method is implementable in IoT devices, as it does not require high computational resources. The results show that the measurements are susceptible to correction, with the effect that the corrected values are close to the actual values obtained by the reference instruments of the Department of Environmental Pollution Control Project of Athens (PERPA), a service of the Greek Ministry of the Environment and Energy.