This touches on instrument theory.

Besides just the ideal gas law in a nonideal world.

Let's assume a perfect instrument.

With a sensor for a target gas for instance that puts out 0 to 10 volts over a range of 0 to 10000 reference ppm, if the response over that range were perfectly linear, and all replacement sensors perfectly identical, then no mathematical device correction would need to be made. This is the most fundamental analog heart of the device.

So what is calibration? It compensates for imperfection.

Based on a detector (sensor) which is sensitive to the number of molecules it is exposed to at the time, this number of molecules will be mathematically converted to a concentration level in PPM, in the case of gas phase that is PPM by volume. IOW for every million molecules you breath in, how many are CO2?

Counting molecules are us.

If you used an analog dial meter to show you the real-time votage output from the sensor, all you had to do was remember that 1 volt equals 1000 PPM, and you know when the needle points to 0.400 volts that means it's 400 PPM. At this point you still have a completely analog instrument. The analog circuitry is doing the math for you, and the math is very simple because the device is so perfect.

Even the dial-indicating voltmeter is perfect, otherwise there would be a need for it's own mechanical correction like turning the little screw(s) to adjust the needle.

When you replace the analog voltmeter with a digital voltmeter instead, it's still the same analog instrument at the heart, so no difference yet except you can probably read 0.400 volts more repeatably on the numerical display rather than the analog dial. Unless you had a very large diameter dial. And you would still need the voltmeter itself calibrated to make sure the numbers were true voltage otherwise the PPM shown would not be right. This can be a little more complex, and more subject to error, than turning a little screw on an analog meter but it accomplishes the same thing. Digital voltmeters usually had more than just one screw to adjust. And many more (cheap) electronic components inside subject to drift compared to the few mechanical changes capable of occurring over time in the analog meter.

So digital voltmeters themselves can be very flexible in their features, often analog meters would simply have a custom-printed scale to readout directly in desired units.

Either way with a perfect voltmeter the perfect sensor still isn't good enough simply because of the task at hand.

When the air is thinner for any reason whether due to temperature or pressure (altitude), there will naturally be fewer molecules of CO2 detected by the sensor even though it's the exact same reference air sample with the exact same PPM. But the meter would then show an unrealistically low reading.

So in order for it to be "reference PPM", you would calibrate under "standard conditions" of temperature & pressure.

Then as conditions change across the working ranges of temperature & pressure, compensations need to be made so the recorded value remains realistic in PPM.

The basic equation is PV = nRT where the pressure times the volume equals the number of molecules times a constant times the temperature. The pressure is relative to absolute vacuum and the temperature relative to absolute zero.

With our perfect voltage output we have turned the voltage into a unitless number which we can directly interpret in PPM. And for gases PPM is n/V, or molecules per (million molecule) volume.

Rearranging to P/RT = n/V, we see that for n/V to remain constant, P/RT must remain unity as P & T change, since R is a constant.

We already knew intuitively that pressure & temperature are inversely related, so the simply perfect analog instrument operator could simply make a few calculations from their voltmeter reading, depending on the temperature in their lab and the barometric reading on their barometer. Then they could always record the the real CO2 concentration even though the meter reading was only perfect under standard conditions.

A more advanced analog instrument would instead self-correct its voltmeter readings so when each part of the instrument is fully calibrated, it always showed true PPM regardless of temperature or pressure changes. By adding a temperature and pressure sensor to the circuit the operator would no longer need to take their own T & P readings in the lab. The voltages (according to their slopes) from these additional sensors would then affect the main gas sensor voltage to result in the corrected reading. In a less-than-perfect world each of these sensors also need their own calibration to known reference values under ideal conditions, and to compensate for the variability of electrical component performance of not just the sensors themselves. So there would be a number of variable resistor calibration adjustments on the circuit board, some being knobs on a control panel, others miniature setscrews inside for factory adjustment not routinely needed.

Alternatively without a controlled environment for calibration, at least use well documented ambient temperature and pressure. Calculated compensations then are not based degrees F or C, nor PSIG, instead you use absolute temperature in degrees K, and pressure in PSIA. These are the mathematical variables that can be completely eliminated from the equation if the actual "standard" controlled environment is available.

And that's for the analog instrument to do all the math itself.

These same 3 analog sensors (and voltmeter) with all their component variability and interactive imperfections can have all this support circuitry to allow full (sometimes tedious) analog calibration like this, or forget about having any analog circuitry doing any math and just convert each sensor's raw analog output to digital and have software do the math (and calibration) and display from there.

This moves the tediousness to the data system electronics instead of the instrument electronics.

Or anything in between these two extremes.

Regardless, you only get results as good as your dedication to the electronic tediousness, you just have to put it in the right place either way.