If I have seen further it is by standing on ye sholders of Giants.Isaac Newton, in a letter to Robert Hooke (15 February 1676)
This is an adaptation of a Desmos calculator by Isaac DeWitt ♥ that uses temperature (°F), humidity (%), and pressure (inHg) to compute oxygen (O2) concentration $c_{\text{O}_2}$ in mol/m3. A molar concentration of about 8-9 indicates normal/ideal air, with 5-8 indicating somewhat low, and <5 as poor/dangerous; >10 indicates enriched air.
Margins of error corresponding to various O2 molarity ranges.
Equation derived from the ideal gas law ($P V = n R T$), rearranged to isolate total molar concentration, and then multiplied by the mole fraction of O2. Result in mol/m3; estimated 99.7% accuracy.
Mole fraction of O2 in dry air x_O2 = 0.2095 mol/m3 represents the percent fraction of air that contains O2 and is taken to be relatively constant at about 21%.
Universal gas constant R = 8.314462618 J/mol/K connects energy content to temperature.
Water vapor partial pressure in pascal (Pa) P_H2O = phi * P_sat(T) represents how much of the total pressure comes from water vapor. Water vapor cannot hold O2, so it is subtracted from the total pressure: P - P_H2O.
Calculated using the Clausius-Clapeyron relation, saturation vapor pressure P_sat = 610.94 * math.exp( 17.625 * (T - 273.15) / (T - 30.11) ) gives the amount of pressure (in Pa) exerted by water vapor in the air at a given temperature T in kelvin.
Trivia
Assuming average pressure and temperature (1 atm and 59 °F or 15 °C), water vapor pressure can make up as much as ~1.7% of total pressure!
1 atm (101,325 Pa) is equivalent to exactly 29.9246898996 inHg.
The ratio $c_{\text{O}_2} / x_{\text{O}_2}$ represents the maximum amount of O2 the air can hold at current TPH.
Water vapor density derived from the ideal gas law is $\rho_{\text{H}_2 \text{O}} = 18.015 P_{\text{H}_2 \text{O}} / R T$ in g/m3, where 18.015 is the molar mass of water in grams.
Assuming standard pressure $P$ in pascal, temperature as a function of relative humidity is $T(\text{RH}) = \frac{a - b \ln (c P / \text{RH})}{d - \ln (c P / \text{RH})}$, where $a$ = 4717 K, $b$ = 35.85 K, $c$ = 0.02835 Pa-1, and $d$ = 17.27 to four significant figures. This formula gives the temperature in kelvin at which the molarity (mol/m3) for O2 and H2O in air will be equal; for °F, simply convert: $\left( T(\text{RH}) - 273.15 \right) \frac{9}{5} + 32$.