{
  "version": "v1",
  "source": "https://craftquantities.com",
  "licence": "CC BY 4.0",
  "licenceUrl": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "Craft Quantities — craftquantities.com",
  "documentation": "https://craftquantities.com/api/",
  "versioning": "Fields are added, never removed or repurposed, within a version. A breaking change becomes /api/v2/ and v1 keeps being built.",
  "slug": "air-density-calculator",
  "category": "plumbing-hvac",
  "title": "Air Density Calculator (Temperature, Elevation and Humidity)",
  "description": "The density of air from its temperature, the site elevation and the relative humidity, with the station pressure, the dry-air figure and the dew point.",
  "url": "https://craftquantities.com/calculators/plumbing-hvac/air-density-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/air-density-calculator.json",
  "inputCount": 3,
  "testCaseCount": 3,
  "sourceCount": 3,
  "lastVerified": "2026-11-28",
  "citation": {
    "author": "Craft Quantities",
    "title": "Air Density Calculator (Temperature, Elevation and Humidity)",
    "version": "1.0.0",
    "sourcesChecked": "2026-11-28",
    "url": "https://craftquantities.com/calculators/plumbing-hvac/air-density-calculator/",
    "accessDate": null,
    "accessDateNote": "Add the date you retrieved this. It is deliberately absent: a static file cannot know when you read it, and the build date would be wrong.",
    "permanentVersionedUrl": null,
    "permanentVersionedUrlNote": "Not offered. This site keeps no archive of previous builds, so any such URL would resolve to the current page or to nothing. The version and sourcesChecked fields identify the calculation instead.",
    "formats": {
      "plain": "Craft Quantities. Air Density Calculator (Temperature, Elevation and Humidity). Version 1.0.0. Sources checked 2026-11-28. https://craftquantities.com/calculators/plumbing-hvac/air-density-calculator/",
      "apa": "Craft Quantities. (2026). Air Density Calculator (Temperature, Elevation and Humidity) (Version 1.0.0) [Web calculator]. Retrieved from https://craftquantities.com/calculators/plumbing-hvac/air-density-calculator/",
      "harvard": "Craft Quantities (2026) Air Density Calculator (Temperature, Elevation and Humidity) (Version 1.0.0). Available at: https://craftquantities.com/calculators/plumbing-hvac/air-density-calculator/",
      "bibtex": "@misc{craftquantities-calculators-plumbing-hvac-air-density-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Air Density Calculator (Temperature, Elevation and Humidity)},\n  version      = {1.0.0},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/plumbing-hvac/air-density-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "airTemperature",
      "label": "Air Temperature",
      "type": "number",
      "dimension": "temperature",
      "defaultValue": 20,
      "min": -40,
      "max": 60,
      "step": 0.5,
      "help": "The dry-bulb temperature of the air, in the shade."
    },
    {
      "id": "elevation",
      "label": "Elevation Above Sea Level",
      "type": "number",
      "dimension": "length",
      "defaultValue": 0,
      "min": -400,
      "max": 5000,
      "step": 10,
      "help": "The site's height above mean sea level."
    },
    {
      "id": "relativeHumidity",
      "label": "Relative Humidity (%)",
      "type": "number",
      "defaultValue": 50,
      "min": 0,
      "max": 100,
      "step": 1,
      "help": "The hygrometer's reading, taken with the temperature."
    }
  ],
  "sources": [
    {
      "label": "U.S. Standard Atmosphere, 1976 (NOAA-S/T 76-1562, NASA-TM-X-74335), NOAA, NASA and the US Air Force, October 1976: the atmosphere whose sea-level state and pressure-height law give the station pressure for an elevation",
      "url": "https://ntrs.nasa.gov/citations/19770009539"
    },
    {
      "label": "ASHRAE Handbook — Fundamentals, chapter 1, Psychrometrics: the ideal-gas moist-air equations (humidity ratio, specific volume, density) and the Hyland–Wexler saturation pressure over water and over ice"
    },
    {
      "label": "PsychroLib (MIT licence), SI test suite: standard atmospheric pressure 101,325 Pa at 0 m, 95,461 Pa at 500 m and 89,875 Pa at 1,000 m, checked against Table 1 of ch. 1 of the 2017 ASHRAE Handbook — Fundamentals; saturation vapour pressure 3,169.7 Pa at 25 °C",
      "url": "https://github.com/psychrometrics/psychrolib/blob/master/tests/test_psychrolib_si.py"
    }
  ],
  "testCases": [
    {
      "name": "Dry air at 20 °C at sea level: about 1.204 kg/m³",
      "inputs": {
        "airTemperature": 20,
        "elevation": 0,
        "relativeHumidity": 0
      },
      "expected": 1.2041,
      "toleranceDecimalPlaces": 3,
      "unit": "kg/m³",
      "confidence": "high",
      "steps": [
        {
          "label": "Station pressure",
          "value": 101.325,
          "unit": "kPa"
        },
        {
          "label": "Dry-air density at the same temperature and pressure",
          "value": 1.2041518757371168,
          "unit": "kg/m³"
        },
        {
          "label": "Density ratio to the standard sea level",
          "value": 98.29818003952106,
          "unit": "%"
        },
        {
          "label": "Humidity ratio",
          "value": 0,
          "unit": "g/kg"
        }
      ],
      "basis": "cited",
      "sourceIndex": 1
    },
    {
      "name": "Dry air at 59 °F (15 °C) at sea level: the standard 1.225 kg/m³ (0.0765 lb/ft³)",
      "inputs": {
        "airTemperature": 15,
        "elevation": 0,
        "relativeHumidity": 0
      },
      "expected": 1.225,
      "toleranceDecimalPlaces": 3,
      "unit": "kg/m³",
      "confidence": "high",
      "steps": [
        {
          "label": "Station pressure",
          "value": 101.325,
          "unit": "kPa"
        },
        {
          "label": "Dry-air density at the same temperature and pressure",
          "value": 1.2250464076777225,
          "unit": "kg/m³"
        },
        {
          "label": "Density ratio to the standard sea level",
          "value": 100.00385729163837,
          "unit": "%"
        },
        {
          "label": "Humidity ratio",
          "value": 0,
          "unit": "g/kg"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "Dry air at 41 °F (5 °C) at 5,000 ft (1,524 m)",
      "inputs": {
        "airTemperature": 5,
        "elevation": 1524,
        "relativeHumidity": 0
      },
      "expected": 1.056,
      "toleranceDecimalPlaces": 3,
      "unit": "kg/m³",
      "confidence": "high",
      "steps": [
        {
          "label": "Station pressure",
          "value": 84.31105669977579,
          "unit": "kPa"
        },
        {
          "label": "Dry-air density at the same temperature and pressure",
          "value": 1.0559905235209845,
          "unit": "kg/m³"
        },
        {
          "label": "Density ratio to the standard sea level",
          "value": 86.20336744279196,
          "unit": "%"
        },
        {
          "label": "Humidity ratio",
          "value": 0,
          "unit": "g/kg"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    }
  ]
}
