{
  "schemaVersion": 1,
  "slug": "torque-calculator",
  "category": "conversion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "bb34d7e16308a1881ea011fa1d3dc18e89ef286602af47397b8678d3becd1304",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/torque-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "R = V × F[from] ÷ F[to]",
    "vars": [
      [
        "V",
        "Value"
      ],
      [
        "from",
        "Source unit"
      ],
      [
        "to",
        "Target unit"
      ],
      [
        "F",
        "Factor to N·m"
      ]
    ],
    "note": "F (→ N·m): nm 1, kgfm 9.80665, lbfft 1.3558179483314, lbfin 0.1129848290276167, ozfin 0.00706155181422579."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-04",
    "sources": [
      {
        "name": "NIST SP 811 — Conversion factors by quantity",
        "url": "https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors/nist-guide-si-appendix-b9"
      }
    ],
    "basis": "Convert torque via newton-metres, not energy despite the shared dimensions.",
    "limitations": "Only the displayed unit definitions are converted; rounding and measurement uncertainty are separate.",
    "implementationHash": "bb34d7e16308a1881ea011fa1d3dc18e89ef286602af47397b8678d3becd1304",
    "domain": "conversion"
  },
  "contract": {
    "compute": "const units={\"nm\":\"N·m\",\"kgfm\":\"kgf·m\",\"lbfft\":\"lbf·ft\",\"lbfin\":\"lbf·in\",\"ozfin\":\"ozf·in\"}, factors={\"nm\":1,\"kgfm\":9.80665,\"lbfft\":1.3558179483314,\"lbfin\":0.1129848290276167,\"ozfin\":0.00706155181422579}; if(!Number.isFinite(value)||value<-1000000000000||value>1000000000000||!Object.prototype.hasOwnProperty.call(units,from)||!Object.prototype.hasOwnProperty.call(units,to))return {\"result\":null,\"nm\":null,\"lbfft\":null,\"lbfin\":null,\"__error\":\"inputError\"}; const out=(function(){const F={nm:1,kgfm:9.80665,lbfft:1.3558179483314,lbfin:0.1129848290276167,ozfin:0.00706155181422579}; const nm=value*F[from]; return { result: nm/F[to], nm, lbfft: nm/1.3558179483314, lbfin: nm/0.1129848290276167 };})(); if(out.__error)return {...{\"result\":null,\"nm\":null,\"lbfft\":null,\"lbfin\":null},...out}; out.__resultUnit=units[to]; out.__unitRatio=factors[to]/factors[from]; return out;",
    "inputs": [
      {
        "name": "value",
        "type": "number",
        "default": 1,
        "min": -1000000000000,
        "max": 1000000000000,
        "step": 0.0001,
        "requiredValue": true,
        "strictRange": true
      },
      {
        "name": "from",
        "type": "select",
        "default": "nm",
        "options": [
          {
            "value": "nm"
          },
          {
            "value": "kgfm"
          },
          {
            "value": "lbfft"
          },
          {
            "value": "lbfin"
          },
          {
            "value": "ozfin"
          }
        ]
      },
      {
        "name": "to",
        "type": "select",
        "default": "lbfft",
        "options": [
          {
            "value": "lbfft"
          },
          {
            "value": "nm"
          },
          {
            "value": "kgfm"
          },
          {
            "value": "lbfin"
          },
          {
            "value": "ozfin"
          }
        ]
      },
      {
        "name": "precision",
        "type": "select",
        "default": 4,
        "options": [
          {
            "value": 0
          },
          {
            "value": 2
          },
          {
            "value": 4
          },
          {
            "value": 6
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "result",
        "precision": 4,
        "unit": "",
        "precisionField": "precision",
        "unitField": "__resultUnit",
        "trimTrailingZeros": true,
        "notation": "auto"
      },
      {
        "name": "nm",
        "precision": 4,
        "unit": "N·m",
        "showWhen": {
          "to": [
            "kgfm",
            "lbfft",
            "lbfin",
            "ozfin"
          ]
        },
        "notation": "auto"
      },
      {
        "name": "lbfft",
        "precision": 4,
        "unit": "lbf·ft",
        "showWhen": {
          "to": [
            "nm",
            "kgfm",
            "lbfin",
            "ozfin"
          ]
        },
        "notation": "auto"
      },
      {
        "name": "lbfin",
        "precision": 3,
        "unit": "lbf·in",
        "showWhen": {
          "to": [
            "nm",
            "kgfm",
            "lbfft",
            "ozfin"
          ]
        },
        "notation": "auto"
      }
    ],
    "interpret": null
  }
}
