{
  "id": "air-density",
  "version": "6c44f368ff72",
  "status": "published",
  "name": "Air Density Calculator",
  "question": "What is the air density?",
  "summary": "Air density calculator: the density of dry or humid air from the temperature, the air pressure and the relative humidity or dew point, in kg/m³ and lb/ft³, with the vapour and dry-air pressures.",
  "category": "physics",
  "subcategory": "weather",
  "url": "https://www.acalculator.org/physics/air-density-calculator",
  "markdown": "https://www.acalculator.org/physics/air-density-calculator.md",
  "kind": "function",
  "method": "p_sat(t) = 610.78 × exp(17.27 t ÷ (t + 237.3)) Pa (t in °C); p_v = RH × p_sat(T), or p_sat(dew point), or 0; p_d = p − p_v; ρ = p_d ÷ (287.058 × T) + p_v ÷ (461.495 × T), T in kelvins.",
  "assumptions": [
    "Moist air is a mix of ideal gases: dry air and water vapour.",
    "The pressure is the actual air pressure where the air is, not an altimeter setting reduced to sea level."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "t": {
        "title": "Air temperature",
        "description": "The temperature of the air.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "temperature",
        "minimum": 193.14999999999998,
        "maximum": 373.15
      },
      "p": {
        "title": "Air pressure",
        "description": "The actual (station) air pressure, not the sea-level altimeter setting.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "pressure",
        "minimum": 1000,
        "maximum": 200000
      },
      "hum": {
        "title": "Humidity",
        "description": "Give the humidity as relative humidity or a dew point, or treat the air as dry.",
        "type": "string",
        "enum": [
          "rh",
          "dew",
          "dry"
        ]
      },
      "rh": {
        "title": "Relative humidity",
        "description": "The relative humidity, from 0% to 100%.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "td": {
        "title": "Dew point",
        "description": "The dew point of the air; it cannot be above the air temperature.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "temperature",
        "minimum": 193.14999999999998,
        "maximum": 373.15
      }
    }
  },
  "outputs": {
    "density": {
      "label": "Air density (kg/m³)",
      "description": "ρ = p_d ÷ (R_d T) + p_v ÷ (R_v T), in kilograms per cubic metre.",
      "format": "number"
    },
    "lbft3": {
      "label": "Air density (lb/ft³)",
      "description": "The air density in pounds per cubic foot.",
      "format": "number"
    },
    "ratio": {
      "label": "Of standard sea-level air (%)",
      "description": "The density as a percentage of 1.225 kg/m³, the standard sea-level value.",
      "format": "number"
    },
    "dry": {
      "label": "Dry air at the same T and p (kg/m³)",
      "description": "p ÷ (R_d T): the density if the air held no water vapour.",
      "format": "number"
    },
    "vapour": {
      "label": "Vapour pressure (hPa)",
      "description": "The partial pressure of water vapour, p_v.",
      "format": "number"
    },
    "dryPressure": {
      "label": "Dry-air pressure (hPa)",
      "description": "p_d = p − p_v.",
      "format": "number"
    },
    "saturation": {
      "label": "Saturation vapour pressure (hPa)",
      "description": "The Tetens saturation vapour pressure at the air temperature.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "t": "15 °C",
      "p": "1013.25 hPa",
      "hum": "rh",
      "rh": 50,
      "td": "10 °C"
    },
    "outputs": {
      "density": 1.2210818325640933,
      "lbft3": 0.07622964850355762,
      "ratio": 99.68014959706883,
      "dry": 1.2249781262066513,
      "vapour": 8.526451961785128,
      "dryPressure": 1004.723548038215,
      "saturation": 17.052903923570256
    },
    "text": "The air density is 1.2211 kg/m³ (0.07623 lb/ft³)."
  },
  "examples": [
    {
      "given": {
        "t": 288.15,
        "p": 101325,
        "hum": "dry"
      },
      "expect": {
        "density": 1.2249781262066513
      },
      "source": "Wikipedia, Density of air (ρ = p_d ÷ (R_d T) + p_v ÷ (R_v T); R_d = 287.058, R_v = 461.495 J/(kg·K); Tetens p_sat = 0.61078 exp(17.27 (T − 273.15) ÷ (T − 35.85)) kPa), https://en.wikipedia.org/wiki/Density_of_air (retrieved 2026-10-05); hand calculation in content.mdx: 101,325 ÷ (287.058 × 288.15) = 1.22498 kg/m³ (close to the ISA sea-level 1.225)",
      "tolerance": 1e-12
    },
    {
      "given": {
        "t": 303.15,
        "p": 101325,
        "hum": "rh",
        "rh": 100
      },
      "expect": {
        "saturation": 42.42926124081255,
        "density": 1.1459363079429115
      },
      "source": "Wikipedia, Density of air (ρ = p_d ÷ (R_d T) + p_v ÷ (R_v T); R_d = 287.058, R_v = 461.495 J/(kg·K); Tetens p_sat = 0.61078 exp(17.27 (T − 273.15) ÷ (T − 35.85)) kPa), https://en.wikipedia.org/wiki/Density_of_air (retrieved 2026-10-05); hand calculation in content.mdx: p_sat = 610.78 × exp(17.27 × 30 ÷ 267.3) = 4,242.93 Pa; ρ = 97,082.07 ÷ (287.058 × 303.15) + 4,242.93 ÷ (461.495 × 303.15) = 1.14594 kg/m³",
      "tolerance": 1e-12
    },
    {
      "given": {
        "t": 293.15,
        "p": 90000,
        "hum": "dew",
        "td": 283.15
      },
      "expect": {
        "vapour": 12.279224110021373,
        "density": 1.0639898614995758
      },
      "source": "Wikipedia, Density of air (ρ = p_d ÷ (R_d T) + p_v ÷ (R_v T); R_d = 287.058, R_v = 461.495 J/(kg·K); Tetens p_sat = 0.61078 exp(17.27 (T − 273.15) ÷ (T − 35.85)) kPa), https://en.wikipedia.org/wiki/Density_of_air (retrieved 2026-10-05); hand calculation in content.mdx: p_v = 610.78 × exp(172.7 ÷ 247.3) = 1,227.92 Pa; ρ = 88,772.08 ÷ (287.058 × 293.15) + 1,227.92 ÷ (461.495 × 293.15) = 1.06399 kg/m³",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "Wikipedia, Density of air: ρ = p_d ÷ (R_d T) + p_v ÷ (R_v T), R_d = 287.058 and R_v = 461.495 J/(kg·K), and the Tetens saturation vapour pressure, retrieved 2026-10-05. https://en.wikipedia.org/wiki/Density_of_air",
    "NIST Special Publication 811 (2008), Appendix B.8: 1 lb/ft³ = 16.018 46 kg/m³, 1 inHg = 3,386.389 Pa, retrieved 2026-10-05. https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "density-altitude",
    "psychrometric",
    "dew-point"
  ],
  "changelog": []
}
