{
  "id": "length-converter",
  "version": "144c3440a331",
  "status": "published",
  "name": "Length Converter",
  "question": "Length calculator: convert any unit",
  "summary": "Converts a length between millimeters, centimeters, meters, kilometers, inches, feet, yards, miles, nautical miles, and more, with feet and inches.",
  "category": "convert",
  "subcategory": "length",
  "url": "https://www.acalculator.org/convert/length",
  "markdown": "https://www.acalculator.org/convert/length.md",
  "kind": "function",
  "method": "converted = length × (meters per \"From\" unit) ÷ (meters per \"To\" unit)",
  "assumptions": [
    "Meters per unit are the exact definitions in NIST SP 811: 1 in = 0.0254 m, 1 ft = 12 in, 1 yd = 3 ft, 1 mi = 5,280 ft, 1 nautical mile = 1,852 m, 1 mil = 0.001 in.",
    "The arithmetic is exact on the decimal you type; each answer is rounded once, and the page shows at most 6 decimal places.",
    "Feet and inches round the inches half up to 0.01 in; inches that round to 12 count as one more foot."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "amount": {
        "title": "Length",
        "description": "The length to convert, in the \"From\" unit.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "from": {
        "title": "From",
        "description": "The unit the length is in.",
        "type": "string",
        "enum": [
          "nm",
          "um",
          "mm",
          "cm",
          "m",
          "km",
          "mil",
          "in",
          "ft",
          "yd",
          "mi",
          "nmi"
        ]
      },
      "to": {
        "title": "To",
        "description": "The unit to convert the length to.",
        "type": "string",
        "enum": [
          "nm",
          "um",
          "mm",
          "cm",
          "m",
          "km",
          "mil",
          "in",
          "ft",
          "yd",
          "mi",
          "nmi"
        ]
      }
    }
  },
  "outputs": {
    "result": {
      "label": "Converted length",
      "description": "The length in the \"To\" unit.",
      "format": "number"
    },
    "meters": {
      "label": "Meters (m)",
      "description": "The length in meters.",
      "format": "number"
    },
    "centimeters": {
      "label": "Centimeters (cm)",
      "description": "The length in centimeters.",
      "format": "number"
    },
    "kilometers": {
      "label": "Kilometers (km)",
      "description": "The length in kilometers.",
      "format": "number"
    },
    "inches": {
      "label": "Inches (in)",
      "description": "The length in inches.",
      "format": "number"
    },
    "feet": {
      "label": "Feet (ft)",
      "description": "The length in feet.",
      "format": "number"
    },
    "miles": {
      "label": "Miles (mi)",
      "description": "The length in miles.",
      "format": "number"
    },
    "feetInches": {
      "label": "Feet and inches",
      "description": "Whole feet and the inches left over, to 0.01 in.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": "ft",
      "to": "m",
      "amount": 10
    },
    "outputs": {
      "result": 3.048,
      "meters": 3.048,
      "centimeters": 304.8,
      "kilometers": 0.003048,
      "inches": 120,
      "feet": 10,
      "miles": 0.001893939393939394,
      "feetInches": "10 ft 0 in"
    },
    "text": "10 feet (ft) = 3.048 meters (m)."
  },
  "examples": [
    {
      "given": {
        "amount": 10,
        "from": "ft",
        "to": "m"
      },
      "expect": {
        "result": 3.048,
        "inches": 120,
        "feetInches": "10 ft 0 in"
      },
      "source": "NIST SP 811 (2008), Appendix B.8: 1 ft = 0.3048 m exactly; 10 × 0.3048 = 3.048; hand calculation in content.mdx"
    },
    {
      "given": {
        "amount": 1,
        "from": "m",
        "to": "in"
      },
      "expect": {
        "result": 39.37007874015748,
        "feet": 3.2808398950131235,
        "feetInches": "3 ft 3.37 in"
      },
      "source": "NIST SP 811 (2008), Appendix B.8: 1 in = 0.0254 m exactly; 1 ÷ 0.0254 = 39.370078…; hand calculation in content.mdx"
    },
    {
      "given": {
        "amount": 5,
        "from": "km",
        "to": "mi"
      },
      "expect": {
        "result": 3.1068559611866697,
        "meters": 5000
      },
      "source": "NIST SP 811 (2008), Appendix B.8: 1 mi = 1,609.344 m exactly; 5,000 ÷ 1,609.344; hand calculation in content.mdx"
    },
    {
      "given": {
        "amount": 1,
        "from": "nmi",
        "to": "ft"
      },
      "expect": {
        "result": 6076.115485564304,
        "meters": 1852
      },
      "source": "NIST SP 811 (2008), Appendix B.8: 1 nautical mile = 1,852 m exactly; 1,852 ÷ 0.3048; hand calculation in content.mdx"
    },
    {
      "given": {
        "amount": 178,
        "from": "cm",
        "to": "ft"
      },
      "expect": {
        "result": 5.83989501312336,
        "feetInches": "5 ft 10.08 in"
      },
      "source": "NIST SP 811 (2008), Appendix B.8: 178 ÷ 2.54 = 70.0787… in = 5 ft 10.08 in; hand calculation in content.mdx"
    }
  ],
  "sources": [
    "NIST SP 811 (2008), Guide for the Use of the International System of Units, Appendix B.8 (foot, inch, mil, mile, nautical mile, yard), retrieved 2026-10-01. https://www.nist.gov/pml/special-publication-811"
  ],
  "related": [
    "inches-to-cm",
    "cm-to-inches",
    "inches-to-feet",
    "unit-converter",
    "temperature-converter"
  ],
  "changelog": []
}
