{
  "id": "density",
  "version": "41113b7c4ff9",
  "status": "published",
  "name": "Density Calculator",
  "question": "What is the density?",
  "summary": "Computes density from mass and volume (ρ = m ÷ V), or the mass or volume from the other two, in metric or US units.",
  "category": "physics",
  "subcategory": "mechanics",
  "url": "https://www.acalculator.org/physics/density-calculator",
  "markdown": "https://www.acalculator.org/physics/density-calculator.md",
  "kind": "formulas",
  "method": "ρ = m ÷ V; m = ρ × V; V = m ÷ ρ.",
  "assumptions": [
    "The density is the average over the whole object: mass divided by the total volume it takes up.",
    "Units are converted exactly: 1 lb = 0.45359237 kg, 1 ft³ = 0.028316846592 m³, 1 L = 0.001 m³ (NIST SP 811)."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "m": {
        "title": "Mass",
        "description": "The mass of the object or sample.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "mass",
        "exclusiveMinimum": 0
      },
      "v": {
        "title": "Volume",
        "description": "The volume the object or sample takes up.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "volume",
        "exclusiveMinimum": 0
      },
      "rho": {
        "title": "Density",
        "description": "The density: mass per unit of volume.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "density",
        "exclusiveMinimum": 0
      }
    }
  },
  "solve": {
    "fillAny": 2,
    "variables": [
      "m",
      "v",
      "rho"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "mass": {
      "label": "Mass",
      "description": "The mass of the object or sample.",
      "format": "quantity"
    },
    "volume": {
      "label": "Volume",
      "description": "The volume the object or sample takes up.",
      "format": "quantity"
    },
    "density": {
      "label": "Density",
      "description": "The density: mass per unit of volume.",
      "format": "quantity",
      "unit": "lb-ft3"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "m": 10,
      "v": 0.004
    },
    "outputs": {
      "density": 2500
    },
    "text": "A mass of 10 kg in a volume of 0.1413 ft³ has a density of 156.07 lb/ft³."
  },
  "examples": [
    {
      "given": {
        "m": 10,
        "v": 0.004
      },
      "expect": {
        "rho": 2500
      },
      "source": "hand calculation in content.mdx: 10 kg ÷ 0.004 m³ = 2,500 kg/m³ = 2.5 g/cm³",
      "tolerance": 1e-12
    },
    {
      "given": {
        "rho": 19300,
        "v": 0.000001
      },
      "expect": {
        "m": 0.0193
      },
      "source": "hand calculation in content.mdx: 19,300 kg/m³ × 1e-6 m³ = 0.0193 kg = 19.3 g",
      "tolerance": 1e-12
    },
    {
      "given": {
        "m": 28.304163888,
        "rho": 999.5521145351128
      },
      "expect": {
        "v": 0.028316846592
      },
      "source": "hand calculation in content.mdx: 62.4 lb ÷ 62.4 lb/ft³ = 1 ft³ = 0.028316846592 m³ (NIST SP 811)",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "NIST Special Publication 811 (2008), Guide for the Use of the International System of Units, section 8.6.5 (mass density) and Appendix B.8 (1 lb = 0.45359237 kg, 1 ft³ = 0.028316846592 m³, 1 gal = 3.785411784 L). https://www.nist.gov/pml/special-publication-811",
    "BIPM, The International System of Units (SI Brochure), 9th edition (2019), Table 5: mass density in kg/m³. https://www.bipm.org/en/publications/si-brochure"
  ],
  "related": [
    "molarity",
    "speed"
  ],
  "changelog": []
}
