Converts a pressure between Pa, kPa, bar, atm, psi, mmHg, and inHg using exact NIST SP 811 pascal-equivalents.
Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.
Try it
Inputs
value (number, from_unit, required) : The pressure to convert
from_unit (string, required) one of: Pa, kPa, bar, atm, psi, mmHg, inHg : Unit of the input value
to_unit (string, required) one of: Pa, kPa, bar, atm, psi, mmHg, inHg : Unit to convert into
Outputs
result (to_unit): The converted pressure
Steps
Look up the exact pascal-equivalent of from_unit and of to_unit.
Convert the input to pascals: pa = value * pa_per(from_unit).
Convert pascals to the target unit: result = pa / pa_per(to_unit).
Round result to 6 significant figures.
Constants
Pa = 1 Pa (source: Guide for the Use of the International System of Units (SI))
kPa = 1000 Pa (source: Guide for the Use of the International System of Units (SI))
bar = 100000 Pa (source: Guide for the Use of the International System of Units (SI))
atm = 101325 Pa (source: Guide for the Use of the International System of Units (SI))
psi = 6894.757293168361 Pa (source: Guide for the Use of the International System of Units (SI))
mmHg = 133.322387415 Pa (source: Guide for the Use of the International System of Units (SI))
inHg = 3386.388640341 Pa (source: Guide for the Use of the International System of Units (SI))
Sources
Guide for the Use of the International System of Units (SI) (National Institute of Standards and Technology, 2026-09-30T19:29:48Z) - bar and standard atmosphere (atm) are exact by definition; psi is derived exactly from the pound-force and the square inch; mmHg and inHg use the conventional mercury density 13,595.1 kg/m3 at standard gravity 9.80665 m/s2.