{
  "id": "height-comparison",
  "version": "d374bc3eff1e",
  "status": "published",
  "name": "Height Comparison Calculator",
  "question": "How big is the height difference?",
  "summary": "Compares two heights in feet and inches or centimetres: the height difference, who is taller, and how many percent taller or shorter, drawn side by side.",
  "category": "everyday-life",
  "subcategory": "fun",
  "url": "https://www.acalculator.org/everyday-life/height-comparison-calculator",
  "markdown": "https://www.acalculator.org/everyday-life/height-comparison-calculator.md",
  "kind": "function",
  "method": "Difference = taller − shorter. Percent taller = difference ÷ shorter × 100. Percent shorter = difference ÷ taller × 100. Ratio = A ÷ B.",
  "assumptions": [
    "Each height is from 1 cm to 3 m (about 0.39 in to 9 ft 10.1 in), typed in feet and inches, inches, centimetres or metres.",
    "Units convert exactly: 1 in = 2.54 cm, 1 ft = 12 in."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "a": {
        "title": "Height of person A",
        "description": "The first height, without shoes.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.01,
        "maximum": 3
      },
      "b": {
        "title": "Height of person B",
        "description": "The second height, without shoes.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "minimum": 0.01,
        "maximum": 3
      }
    }
  },
  "outputs": {
    "difference": {
      "label": "Height difference",
      "description": "The taller height minus the shorter one.",
      "format": "quantity",
      "unit": "in"
    },
    "differenceCm": {
      "label": "Difference in centimetres",
      "description": "The same difference in centimetres.",
      "format": "quantity",
      "unit": "cm"
    },
    "taller": {
      "label": "Who is taller",
      "description": "Which of the two heights is greater.",
      "format": "text"
    },
    "percentTaller": {
      "label": "Taller one is taller by",
      "description": "The difference as a percent of the shorter height: (taller − shorter) ÷ shorter × 100.",
      "format": "percent"
    },
    "percentShorter": {
      "label": "Shorter one is shorter by",
      "description": "The difference as a percent of the taller height: (taller − shorter) ÷ taller × 100.",
      "format": "percent"
    },
    "ratio": {
      "label": "A ÷ B",
      "description": "Height A divided by height B.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "a": 1.778,
      "b": 1.6256
    },
    "outputs": {
      "difference": 0.1524000000000001,
      "differenceCm": 0.1524000000000001,
      "taller": "Person A is taller",
      "percentTaller": 9.375000000000005,
      "percentShorter": 8.571428571428577,
      "ratio": 1.09375
    },
    "text": "The height difference between 5 ft 10 in and 5 ft 4 in is 6 in (15.2 cm); Person A is taller."
  },
  "examples": [
    {
      "given": {
        "a": 1.778,
        "b": 1.6256
      },
      "expect": {
        "difference": 0.1524000000000001,
        "taller": "Person A is taller",
        "percentTaller": 9.375000000000005,
        "percentShorter": 8.571428571428577,
        "ratio": 1.09375
      },
      "source": "hand calculation in content.mdx: 70 − 64 = 6 in; 6 ÷ 64 = 9.375%; 6 ÷ 70 = 8.571%; NIST SP 811 (2008), Appendix B: 1 in = 2.54 cm exactly, https://www.nist.gov/pml/special-publication-811"
    },
    {
      "given": {
        "a": 1.6,
        "b": 1.85
      },
      "expect": {
        "difference": 0.25,
        "taller": "Person B is taller",
        "percentTaller": 15.625,
        "percentShorter": 13.513513513513512,
        "ratio": 0.8648648648648649
      },
      "source": "hand calculation in content.mdx: 185 − 160 = 25 cm; 25 ÷ 160 = 15.625%; 25 ÷ 185 = 13.51%; NIST SP 811 (2008), Appendix B: 1 in = 2.54 cm exactly, https://www.nist.gov/pml/special-publication-811"
    },
    {
      "given": {
        "a": 1.8288,
        "b": 1.8288
      },
      "expect": {
        "difference": 0,
        "taller": "Both are the same height",
        "percentTaller": 0,
        "ratio": 1
      },
      "source": "hand calculation in content.mdx: 72 × 2.54 = 182.88 cm, so the heights are equal; NIST SP 811 (2008), Appendix B: 1 in = 2.54 cm exactly, https://www.nist.gov/pml/special-publication-811"
    }
  ],
  "sources": [
    "NIST Special Publication 811 (2008), Guide for the Use of the International System of Units, Appendix B: 1 in = 2.54 cm exactly, 1 ft = 12 in. Retrieved 2026-10-02. https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "height",
    "ideal-weight",
    "bmi"
  ],
  "changelog": []
}
