Pressure converter: hPa to inHg and the METAR Q and A groups
One inch of mercury equals 33.8639 hectopascals, so 29.92 inHg is 1013.2 hPa. The METAR writes the same setting as Q followed by whole hectopascals, or A followed by hundredths of an inch with no decimal point. A pressure lower than standard raises the pressure altitude, by about 27 feet per hectopascal in the calculator and 29.5 feet by the 1,000 feet per inch rule.
Key points
- 1 inHg = 33.8639 hPa and 1 mmHg = 1.333224 hPa, the factors used by the calculator.
- Standard sea level pressure is 1013.25 hPa, which is 29.92 inHg, the value pilots set to read pressure altitude.
- Q1013 and A2992 describe almost the same pressure, but converting 1013 hPa back gives A2991 because both are rounded down.
- The calculator accepts a Q or A group typed in the value box and converts it directly.
- The pressure altitude line applies the AIM rule of 1,000 ft per inHg, about 29.5 ft per hPa, to the difference from 1013.25 hPa.

What the converter does
The converter takes one pressure and returns it in three units, plus the METAR groups that would carry it. The input can be a number in hectopascals, inches of mercury or millimetres of mercury, chosen in the unit selector. It can also be a METAR group typed directly in the value box, such as Q1013 or A2992: when the text matches a letter A or Q followed by four digits, the page reads it as a group whatever unit is selected.
The page returns five lines:
- the pressure in hectopascals, with one decimal;
- the pressure in inches of mercury, with two decimals;
- the pressure in millimetres of mercury, with one decimal;
- the METAR groups, written
Qplus the whole hectopascals andAplus the hundredths of an inch; - the difference from standard pressure, in hectopascals and as a rough number of feet of pressure altitude.
Everything runs in the browser. Internally the page converts any input to hectopascals first and then derives the other values from that figure.
The conversion factors
The code uses two constants: 33.8639 hectopascals per inch of mercury and 1.333224 hectopascals per millimetre of mercury. Inches of mercury are converted by multiplying by 33.8639, and the reverse by dividing by it.
NIST Special Publication 811, the US guide to SI units, lists the inch of mercury in two forms, because mercury density depends on temperature. At 32 F the conversion is 3.38638 kilopascals, and at 60 F it is 3.386389 kilopascals. The calculator's 33.8639 hPa is the 60 F value rounded. The 32 F value would give 33.8638 hPa, a difference in the fifth significant digit that never changes a METAR value. For the millimetre of mercury, NIST gives the conventional value of 133.322 4 pascals, which is the 1.333224 hPa in the code. A millibar is the same as a hectopascal, so the old unit needs no factor.
Some worked conversions, rounded as the page does:
| inHg | hPa | mmHg | METAR groups |
|---|---|---|---|
| 29.53 | 1000.0 | 750.1 | Q1000 / A2953 |
| 29.92 | 1013.2 | 760.0 | Q1013 / A2992 |
| 30.12 | 1020.0 | 765.0 | Q1019 / A3012 |
| 30.42 | 1030.1 | 772.7 | Q1030 / A3042 |
The 30.12 row shows how the two groups round. The pressure is 1019.98 hPa, which the page displays as 1020.0 but codes as Q1019, because the Q group drops the fraction.
Standard pressure and the two groups
The FAA Aviation Weather Handbook states that in the standard atmosphere sea level pressure is 29.92 inHg (1,013.2 mb), and its table of standard values gives 1013.25 hPa and 29.92 inches of mercury. The page uses 1013.25 hPa as its reference. In inches that is 29.921 inHg, so the usual 29.92 is a rounded version of the same standard.
The METAR pressure group is the last group of the main part of the report. ICAO countries write Q and four digits in hectopascals, and the US and Canada write A and four digits in hundredths of an inch. The details of the group, including QFE and QNH, are covered on the QNH and altimeter setting page. The page converts between the two in either direction, which is useful when a report from one country must be compared with an aircraft instrument or a chart from another.
Rounding: why Q1013 and A2992 are not an exact pair
The calculator writes the Q group with the whole hectopascals, dropping the fraction. WMO-No. 782 says the QNH is rounded down to the nearest whole hectopascal, so the rule agrees with that approach: 995.6 hPa is Q0995.
The A group is rounded down to the hundredth of an inch. The Federal Meteorological Handbook No. 1 (section 11.5.1) says a pressure value is rounded down to the next reportable value, and its example turns 29.248 inHg into 29.24 inHg. The page follows that rule, so 29.248 inHg shows as A2924.
This explains an apparent paradox. 29.92 inHg gives 1013.2 hPa and Q1013. Starting from Q1013 and converting back gives 29.914 inHg, shown as A2991. The two reports of the same weather would differ by one unit in the last digit, and neither is wrong.
The pressure altitude line
The last output line compares the pressure with 1013.25 hPa. For a pressure of 1003.25 hPa the page prints a difference of -10.0 hPa and about 295 ft of pressure altitude. The formula converts the difference to inches of mercury and multiplies it by 1,000 ft per inch.
The sign follows from the definition. The FAA Aviation Weather Handbook defines pressure altitude as the altitude above mean sea level shown by an altimeter set to 29.92 inHg. In the standard atmosphere pressure falls with height, so a lower pressure at the field corresponds to a higher altitude in that atmosphere. A pressure below 1013.25 hPa therefore gives a positive number of feet, meaning the pressure altitude is above the field elevation.
The rule comes from the Aeronautical Information Manual: an inch of mercury error in the altimeter setting equals 1,000 feet of altitude. Since 1 inHg is 33.8639 hPa, the rule is about 29.5 ft per hPa. It is a rule of thumb that holds near sea level and weakens with altitude, because pressure changes less per foot higher up.
The line is not a pressure altitude calculation for an airport. A full computation adds the field elevation, as the density altitude page does with the FAA rule of 1,000 ft per inHg. See the density altitude calculator for that step.
Worked example
A METAR contains the pressure group A3012 at an airfield with a field elevation of 1,000 ft. Typed into the value box, the group converts to 30.12 inHg, 1020.0 hPa and 765.0 mmHg. The difference from standard is +6.7 hPa, which the page translates to about -199 ft of pressure altitude, because the pressure is above standard.
The inch rule gives the same direction. Pressure altitude equals field elevation plus (29.92 minus the altimeter setting) x 1,000 ft, which is 1,000 + (29.92 - 30.12) x 1,000 = 800 ft. The calculator's -199 ft added to the 1,000 ft elevation gives 801 ft. The 1 ft gap comes only from the reference: the page uses 1013.25 hPa, which is 29.921 inHg rather than 29.92.
A schematic report
METAR LXXX 191250Z 27008KT 9999 SCT040 18/09 Q1020
METAR KXXX 191253Z 27008KT 10SM SCT040 18/09 A3012
Both lines are schematic and describe nearly the same pressure. The first reads QNH 1020 hPa, and the second reads an altimeter setting of 30.12 inHg, which converts to 1020.0 hPa. Typing Q1020 into the converter gives 30.12 inHg and A3012, so a pilot moving between the two systems can check the numbers directly.
In real reports
The pressure group is part of the main body of a METAR, and its first letter tells the unit: Q for hectopascals, A for inches of mercury. The comparison of the conventions is on the US and ICAO differences page, and the split between units by country is listed on the units page. The sea level pressure in the remarks section is a different value from the altimeter setting, explained on the sea level pressure page.
Method and limits
The factors 33.8639 and 1.333224 are in the calculator code and match the NIST SP 811 values for mercury at 60 F and the conventional millimetre of mercury; the 32 F inch of mercury would give 33.8638 and is left as a note. The standard value of 1013.25 hPa and 29.92 inHg is from the FAA Aviation Weather Handbook. The Q rounding rule is from WMO-No. 782, the FMH-1 rule is from section 11.5.1, and the 1,000 ft per inch rule is from the Aeronautical Information Manual. The A group of the calculator follows the FMH-1 round-down rule, and the pressure altitude line uses the AIM rule. The METAR lines are schematic. The converter is not a substitute for the QNH given by air traffic services and must not be used to set an altimeter in flight.
Source code of this tool (MIT)
// Tafrob calculators - pure functions, MIT licence (c) Tafrob.
// Every formula is documented on the tool page with its source.
const rad = (d: number) => (d * Math.PI) / 180;
/** Wind components on a runway. dir/heading in degrees (same reference: both true or both magnetic). */
export function windComponents(windDir: number, speed: number, runwayHeading: number) {
const angle = ((windDir - runwayHeading + 540) % 360) - 180; // -180..180, + = from the right
const cross = speed * Math.sin(rad(angle));
const head = speed * Math.cos(rad(angle));
return { angle, cross, head }; // cross > 0: from the right; head < 0: tailwind
}
/** Saturation vapour pressure (hPa), Magnus formula with Alduchov & Eskridge (1996) coefficients. */
export const satVap = (tC: number) => 6.1094 * Math.exp((17.625 * tC) / (tC + 243.04));
/** Relative humidity (%) from temperature and dew point (deg C). */
export const relHumidity = (tC: number, tdC: number) => (100 * satVap(tdC)) / satVap(tC);
/** Dew point (deg C) from temperature (deg C) and relative humidity (%). */
export function dewPoint(tC: number, rh: number) {
const g = Math.log(rh / 100) + (17.625 * tC) / (243.04 + tC);
return (243.04 * g) / (17.625 - g);
}
/** Convective cloud base estimate above ground (ft) from the temperature/dew point spread (deg C). */
export const cloudBaseFt = (tC: number, tdC: number) => ((tC - tdC) / 2.5) * 1000;
/** Pressure altitude (ft) from field elevation (ft) and altimeter setting (inHg). FAA rule: 1,000 ft per inHg. */
export const pressureAltitude = (elevFt: number, altInHg: number) => elevFt + (29.92 - altInHg) * 1000;
/** ISA temperature (deg C) at a pressure altitude (ft). */
export const isaTemp = (paFt: number) => 15 - (1.98 * paFt) / 1000;
/** Station pressure (inHg) from altimeter setting (inHg) and elevation (m), NWS formula. */
export const stationPressure = (altInHg: number, elevM: number) => altInHg * Math.pow((288 - 0.0065 * elevM) / 288, 5.2561);
/**
* Density altitude (ft), NWS method (WFO El Paso): station pressure and virtual temperature (humidity included).
* e = 6.11 * 10^(7.5 * Td / (237.3 + Td)) hPa; DA = 145366 * (1 - (17.326 * P / Tv)^0.235), P in inHg, Tv in degrees Rankine.
* Same constants as the NWS page, so results can be checked against it (a dry ISA sea level case gives about 18 ft, not 0).
*/
export function densityAltitude(elevFt: number, altInHg: number, tC: number, tdC?: number) {
const p = stationPressure(altInHg, elevFt * 0.3048); // inHg
const pHpa = p * 33.8639;
const e = tdC === undefined ? 0 : 6.11 * Math.pow(10, (7.5 * tdC) / (237.3 + tdC)); // NWS vapour pressure
const tK = tC + 273.15;
const tvK = tK / (1 - (e / pHpa) * (1 - 0.622));
const tvR = tvK * 1.8;
const da = 145366 * (1 - Math.pow((17.326 * p) / tvR, 0.235));
const pa = pressureAltitude(elevFt, altInHg);
const thumb = pa + 120 * (tC - isaTemp(pa)); // rule of thumb: 120 ft per deg C above ISA
return { da, pa, thumb, isa: isaTemp(pa), stationInHg: p };
}
/** Pressure conversions. */
export const HPA_PER_INHG = 33.8639;
export const HPA_PER_MMHG = 1.333224;
export const hpaToInhg = (h: number) => h / HPA_PER_INHG;
export const inhgToHpa = (i: number) => i * HPA_PER_INHG;
/** METAR A group: hundredths of inHg rounded down (FMH-1 11.5.1); the epsilon absorbs float error (29.92 -> 2991.9999...). */
export const aGroup = (hpa: number) => 'A' + String(Math.floor(hpaToInhg(hpa) * 100 + 1e-6)).padStart(4, '0');
/** Pressure altitude offset (ft) from 1013.25 hPa with the AIM rule of 1,000 ft per inHg (about 29.5 ft per hPa). */
export const pressureOffsetFt = (hpa: number) => ((1013.25 - hpa) / HPA_PER_INHG) * 1000;
export type Category = 'VFR' | 'MVFR' | 'IFR' | 'LIFR';
/** US flight category (NWS / Aviation Weather Center definitions). ceiling in ft AGL (Infinity if none), visibility in statute miles. */
export function flightCategory(ceilingFt: number, visSm: number): { cat: Category; byCeiling: Category; byVis: Category } {
const c: Category = ceilingFt < 500 ? 'LIFR' : ceilingFt < 1000 ? 'IFR' : ceilingFt <= 3000 ? 'MVFR' : 'VFR';
const v: Category = visSm < 1 ? 'LIFR' : visSm < 3 ? 'IFR' : visSm <= 5 ? 'MVFR' : 'VFR';
const rank: Category[] = ['LIFR', 'IFR', 'MVFR', 'VFR'];
const cat = rank[Math.min(rank.indexOf(c), rank.indexOf(v))];
return { cat, byCeiling: c, byVis: v };
}
/** Speed conversions (from knots). */
export const KT = { mps: 0.514444, kmh: 1.852, mph: 1.150779 };
/** Interpret a METAR/TAF day-time group DDHHMMZ relative to a reference date (UTC). */
export function dayTimeGroup(group: string, ref = new Date()) {
const m = group.trim().toUpperCase().match(/^(\d{2})(\d{2})(\d{2})Z?$/);
if (!m) return null;
const [d, h, mi] = [Number(m[1]), Number(m[2]), Number(m[3])];
if (d < 1 || d > 31 || h > 23 || mi > 59) return null;
// Choose the month that puts the date closest to the reference date.
let best: Date | null = null;
for (const off of [-1, 0, 1]) {
const c = new Date(Date.UTC(ref.getUTCFullYear(), ref.getUTCMonth() + off, d, h, mi));
if (c.getUTCDate() !== d) continue;
if (!best || Math.abs(+c - +ref) < Math.abs(+best - +ref)) best = c;
}
return best;
}
Training and reference only. For flight planning, always use official briefing sources (your national weather service, AIS or approved provider).
Frequently asked questions
How do you convert hPa to inHg?
Divide the pressure in hectopascals by 33.8639. For 1013 hPa the result is 29.914 inHg, which a METAR writes as A2991. In the other direction, multiply inches of mercury by 33.8639, so 29.92 inHg gives 1013.2 hPa. The same figure is the millibar value, since 1 hPa equals 1 mb.
What does A2992 mean in a METAR?
The letter A marks the altimeter setting in inches of mercury, and the four digits are hundredths of an inch with the decimal point left out. A2992 is 29.92 inHg, the standard sea level pressure. A3012 would be 30.12 inHg, which is about 1020 hPa.
Why does A2992 not convert back to exactly Q1013?
The two groups are separate roundings. The FAA Aviation Weather Handbook lists 1013.2 hPa for 29.92 inHg. A Q group drops the fraction, so 1013.2 becomes Q1013, but 1013 hPa is 29.914 inHg, which becomes A2991. The two groups can differ by one unit in the last digit.
How much does altitude change per hectopascal?
It depends on the height. The Aeronautical Information Manual states that an altimeter setting error of one inch of mercury equals 1,000 feet, which is about 29.5 feet per hectopascal. The calculator uses that rule.
Can this page be used to set an altimeter?
No. The page converts numbers and gives a rough pressure altitude difference. An altimeter must be set from the current reported QNH or altimeter setting of the area, using the units the aircraft instrument shows, and flight decisions rely on official sources only.
Sources
- Federal Aviation Administration (2024). Aviation Weather Handbook (FAA-H-8083-28A)
- National Institute of Standards and Technology (1995). Guide for the Use of the International System of Units (NIST Special Publication 811)
- Office of the Federal Coordinator for Meteorology (2019). Federal Meteorological Handbook No. 1 (FCM-H1-2019)
- World Meteorological Organization (2025). Aerodrome Reports and Forecasts, A Users' Handbook to the Codes (WMO-No. 782)
- Federal Aviation Administration. Aeronautical Information Manual, chapter 7, section 2