{
 "schema": 1,
 "id": "unit-conversions",
 "title": "Unit conversions",
 "description": "The exact factors behind feet to metres, feet to inches, cubic yards to cubic metres, pounds to kilograms and °F to °C, with pinned vectors.",
 "url": "https://craftquantities.com/formulas/unit-conversions/",
 "json": "https://craftquantities.com/formulas/unit-conversions.json",
 "publisher": "Craft Quantities",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "licenseName": "CC BY 4.0",
 "note": "These are quantity equations, not design checks. Nothing here sizes a member or confirms that a structure is safe; that is for the engineer or building official responsible for the work.",
 "expressionSyntax": {
  "operators": [
   "+",
   "-",
   "*",
   "/",
   "^"
  ],
  "functions": {
   "sqrt": "square root",
   "ceil": "round up to the next whole number",
   "floor": "round down to the whole number below",
   "round": "round to the nearest whole number",
   "max": "the largest of its arguments",
   "atan_deg": "arctangent, in degrees"
  },
  "constants": {
   "pi": "π"
  }
 },
 "formulas": [
  {
   "id": "feet-to-metres",
   "name": "Feet to metres",
   "gives": "A length in metres from feet.",
   "equation": "y = 0.3048 × x",
   "expression": "0.3048 * x",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><mi>y</mi><mo>=</mo><mrow><mn>0.3048</mn><mo>&#215;</mo><mi>x</mi></mrow></mrow></math>",
   "output": {
    "id": "y",
    "symbol": "y",
    "meaning": "Length in metres",
    "unit": {
     "metric": "m",
     "imperial": "m"
    }
   },
   "inputs": [
    {
     "id": "x",
     "symbol": "x",
     "meaning": "Length in feet",
     "unit": {
      "metric": "ft",
      "imperial": "ft"
     }
    }
   ],
   "calculators": [
    {
     "slug": "feet-to-meters-calculator",
     "title": "Feet to Metres Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/feet-to-meters-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "feet-to-meters-calculator",
     "testCase": "20 ft converts correctly",
     "inputs": {
      "x": 20
     },
     "output": 6.096,
     "calculatorOutput": {
      "value": 6.096,
      "unit": "m",
      "from": "result"
     },
     "pinned": {
      "expected": 6.096,
      "toleranceDecimalPlaces": 6
     }
    },
    {
     "calculator": "feet-to-meters-calculator",
     "testCase": "Ten times the input",
     "inputs": {
      "x": 200
     },
     "output": 60.96,
     "calculatorOutput": {
      "value": 60.96,
      "unit": "m",
      "from": "result"
     },
     "pinned": {
      "expected": 60.96,
      "toleranceDecimalPlaces": 6
     }
    }
   ]
  },
  {
   "id": "feet-to-inches",
   "name": "Feet to inches",
   "gives": "A length in inches from feet.",
   "equation": "y = 12 × x",
   "expression": "12 * x",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><mi>y</mi><mo>=</mo><mrow><mn>12</mn><mo>&#215;</mo><mi>x</mi></mrow></mrow></math>",
   "output": {
    "id": "y",
    "symbol": "y",
    "meaning": "Length in inches",
    "unit": {
     "metric": "in",
     "imperial": "in"
    }
   },
   "inputs": [
    {
     "id": "x",
     "symbol": "x",
     "meaning": "Length in feet",
     "unit": {
      "metric": "ft",
      "imperial": "ft"
     }
    }
   ],
   "calculators": [
    {
     "slug": "feet-to-inches-calculator",
     "title": "Feet to Inches Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/feet-to-inches-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "feet-to-inches-calculator",
     "testCase": "8 feet is 96 inches",
     "inputs": {
      "x": 8
     },
     "output": 96,
     "calculatorOutput": {
      "value": 96,
      "unit": "in",
      "from": "result"
     },
     "pinned": {
      "expected": 96,
      "toleranceDecimalPlaces": 8
     }
    },
    {
     "calculator": "feet-to-inches-calculator",
     "testCase": "1 foot is 12 inches",
     "inputs": {
      "x": 1
     },
     "output": 12,
     "calculatorOutput": {
      "value": 12,
      "unit": "in",
      "from": "result"
     },
     "pinned": {
      "expected": 12,
      "toleranceDecimalPlaces": 8
     }
    },
    {
     "calculator": "feet-to-inches-calculator",
     "testCase": "Half a foot is 6 inches",
     "inputs": {
      "x": 0.5
     },
     "output": 6,
     "calculatorOutput": {
      "value": 6,
      "unit": "in",
      "from": "result"
     },
     "pinned": {
      "expected": 6,
      "toleranceDecimalPlaces": 8
     }
    },
    {
     "calculator": "feet-to-inches-calculator",
     "testCase": "100 feet is 1200 inches",
     "inputs": {
      "x": 100
     },
     "output": 1200,
     "calculatorOutput": {
      "value": 1200,
      "unit": "in",
      "from": "result"
     },
     "pinned": {
      "expected": 1200,
      "toleranceDecimalPlaces": 6
     }
    }
   ]
  },
  {
   "id": "cubic-yards-to-cubic-metres",
   "name": "Cubic yards to cubic metres",
   "gives": "A volume in cubic metres from cubic yards.",
   "equation": "y = 0.764554857984 × x",
   "expression": "0.764554857984 * x",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><mi>y</mi><mo>=</mo><mrow><mn>0.764554857984</mn><mo>&#215;</mo><mi>x</mi></mrow></mrow></math>",
   "output": {
    "id": "y",
    "symbol": "y",
    "meaning": "Volume in cubic metres",
    "unit": {
     "metric": "m³",
     "imperial": "m³"
    }
   },
   "inputs": [
    {
     "id": "x",
     "symbol": "x",
     "meaning": "Volume in cubic yards",
     "unit": {
      "metric": "yd³",
      "imperial": "yd³"
     }
    }
   ],
   "calculators": [
    {
     "slug": "cubic-yards-to-cubic-meters-calculator",
     "title": "Cubic Yards to Cubic Metres Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/cubic-yards-to-cubic-meters-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "cubic-yards-to-cubic-meters-calculator",
     "testCase": "10 yd³ converts correctly",
     "inputs": {
      "x": 10
     },
     "output": 7.64554857984,
     "calculatorOutput": {
      "value": 7.64554857984,
      "unit": "m³",
      "from": "result"
     },
     "pinned": {
      "expected": 7.64554857984,
      "toleranceDecimalPlaces": 6
     }
    },
    {
     "calculator": "cubic-yards-to-cubic-meters-calculator",
     "testCase": "Ten times the input",
     "inputs": {
      "x": 100
     },
     "output": 76.4554857984,
     "calculatorOutput": {
      "value": 76.4554857984,
      "unit": "m³",
      "from": "result"
     },
     "pinned": {
      "expected": 76.4554857984,
      "toleranceDecimalPlaces": 6
     }
    }
   ]
  },
  {
   "id": "pounds-to-kilograms",
   "name": "Pounds to kilograms",
   "gives": "A mass in kilograms from pounds.",
   "equation": "y = 0.45359237 × x",
   "expression": "0.45359237 * x",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><mi>y</mi><mo>=</mo><mrow><mn>0.45359237</mn><mo>&#215;</mo><mi>x</mi></mrow></mrow></math>",
   "output": {
    "id": "y",
    "symbol": "y",
    "meaning": "Mass in kilograms",
    "unit": {
     "metric": "kg",
     "imperial": "kg"
    }
   },
   "inputs": [
    {
     "id": "x",
     "symbol": "x",
     "meaning": "Mass in pounds",
     "unit": {
      "metric": "lb",
      "imperial": "lb"
     }
    }
   ],
   "calculators": [
    {
     "slug": "pounds-to-kilograms-calculator",
     "title": "Pounds to Kilograms Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/pounds-to-kilograms-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "pounds-to-kilograms-calculator",
     "testCase": "100 lb converts correctly",
     "inputs": {
      "x": 100
     },
     "output": 45.359237,
     "calculatorOutput": {
      "value": 45.359237,
      "unit": "kg",
      "from": "result"
     },
     "pinned": {
      "expected": 45.359237,
      "toleranceDecimalPlaces": 6
     }
    },
    {
     "calculator": "pounds-to-kilograms-calculator",
     "testCase": "Ten times the input",
     "inputs": {
      "x": 1000
     },
     "output": 453.59237,
     "calculatorOutput": {
      "value": 453.59237,
      "unit": "kg",
      "from": "result"
     },
     "pinned": {
      "expected": 453.59237,
      "toleranceDecimalPlaces": 6
     }
    }
   ]
  },
  {
   "id": "fahrenheit-to-celsius",
   "name": "Fahrenheit to Celsius",
   "gives": "A temperature in degrees Celsius from degrees Fahrenheit.",
   "equation": "T_C = (T_F − 32) × (5 / 9)",
   "expression": "(F - 32) * (5 / 9)",
   "mathml": "<math xmlns=\"http://www.w3.org/1998/Math/MathML\" display=\"block\"><mrow><msub><mi>T</mi><mi>C</mi></msub><mo>=</mo><mrow><mrow><mo>(</mo><mrow><msub><mi>T</mi><mi>F</mi></msub><mo>&#8722;</mo><mn>32</mn></mrow><mo>)</mo></mrow><mo>&#215;</mo><mfrac><mrow><mn>5</mn></mrow><mrow><mn>9</mn></mrow></mfrac></mrow></mrow></math>",
   "output": {
    "id": "C",
    "symbol": "T_C",
    "meaning": "Temperature, °C",
    "unit": {
     "metric": "°C",
     "imperial": "°C"
    }
   },
   "inputs": [
    {
     "id": "F",
     "symbol": "T_F",
     "meaning": "Temperature, °F",
     "unit": {
      "metric": "°F",
      "imperial": "°F"
     }
    }
   ],
   "calculators": [
    {
     "slug": "fahrenheit-to-celsius-calculator",
     "title": "Fahrenheit to Celsius Calculator",
     "url": "https://craftquantities.com/calculators/measurements-conversions/fahrenheit-to-celsius-calculator/",
     "reproduces": "result"
    }
   ],
   "testVectors": [
    {
     "calculator": "fahrenheit-to-celsius-calculator",
     "testCase": "70 °F converts correctly",
     "inputs": {
      "F": 70
     },
     "output": 21.1111111111,
     "calculatorOutput": {
      "value": 21.1111111111,
      "unit": "°C",
      "from": "result"
     },
     "pinned": {
      "expected": 21.11111111111111,
      "toleranceDecimalPlaces": 6
     }
    },
    {
     "calculator": "fahrenheit-to-celsius-calculator",
     "testCase": "Ten times the input",
     "inputs": {
      "F": 700
     },
     "output": 371.111111111,
     "calculatorOutput": {
      "value": 371.111111111,
      "unit": "°C",
      "from": "result"
     },
     "pinned": {
      "expected": 371.1111111111111,
      "toleranceDecimalPlaces": 6
     }
    }
   ]
  }
 ],
 "sources": [
  {
   "label": "1 ft = 12 in = 304.8 mm = 0.3048 m exactly",
   "citedBy": [
    "feet-to-meters-calculator"
   ]
  },
  {
   "label": "12 inches to the foot — NIST Handbook 44, Appendix C (units of length)",
   "citedBy": [
    "feet-to-inches-calculator"
   ]
  },
  {
   "label": "International yard and pound agreement, 1959 — the foot is exactly 0.3048 m",
   "citedBy": [
    "feet-to-inches-calculator"
   ]
  },
  {
   "label": "1 yd = 0.9144 m exactly, so 1 yd³ = 0.9144³ = 0.764554857984 m³",
   "citedBy": [
    "cubic-yards-to-cubic-meters-calculator"
   ]
  },
  {
   "label": "International yard and pound agreement (1959): 1 lb = 0.45359237 kg exactly",
   "citedBy": [
    "pounds-to-kilograms-calculator"
   ]
  },
  {
   "label": "Celsius = (Fahrenheit - 32) x 5/9; the scales share a value at -40 degrees",
   "citedBy": [
    "fahrenheit-to-celsius-calculator"
   ]
  }
 ]
}
