Elevated body temperature (fever) can be a common symptom of a medical condition, such as a viral or bacterial infection, including SARS-CoV-2 or influenza. Non-contact infrared thermometers are able to measure forehead temperature in a timely manner and were used to perform a fast fever screening in a population. However, forehead temperature measurements differ greatly from basal body temperatures, and are the target of massive perturbations from the environment. Here we gathered a dataset of N=18024 measurements using the same precision infrared sensor in different locations while tracking both outside temperature, room temperature, time of measurement, and identity. Herein, we propose a method able to extract and remove the influence of external perturbations, and set the threshold for fever detection to 37.38 °C, after calibration and temperature correction. This method can help manufacturers and decision-makers to build and use more accurate tools so as to maximize both sensitivity and specificity of the screening protocol.