{
  "schemaVersion": 1,
  "slug": "cord-of-wood-calculator",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "633c810b66edf97ffbb0c72daf39674456c0bf30fcce43c6ce39c46466182993",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/cord-of-wood-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": "Cords = L×H×D ÷ 128; Face cords = L×H×D ÷ (32×log length in ft)",
    "vars": [
      [
        "L",
        "stack length in ft"
      ],
      [
        "H",
        "stack height in ft"
      ],
      [
        "D",
        "stack depth in ft"
      ],
      [
        "a",
        "air gaps in %"
      ],
      [
        "Cords",
        "full cords"
      ],
      [
        "V_solid",
        "solid wood volume in ft³"
      ],
      [
        "logLength",
        "log length entered in inches"
      ]
    ],
    "note": "A full cord is 128 stacked ft³. Face cord volume uses a standard 8 ft × 4 ft face and the entered log cut length in inches; local face-cord definitions vary. Solid volume is estimated from the entered air-gap share. Weight and heat outputs are omitted because wood species and moisture strongly change them."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "NIST Handbook 130 — Firewood volume and cord definition",
        "url": "https://www.nist.gov/publications/nist-handbook-130-uniform-laws-and-regulations-areas-legal-metrology-and-fuel-quality-6"
      }
    ],
    "referenceRole": "definition",
    "implementationHash": "633c810b66edf97ffbb0c72daf39674456c0bf30fcce43c6ce39c46466182993",
    "basis": "Cords = L×H×D ÷ 128; Face cords = L×H×D ÷ (32×log length in ft)",
    "limitations": "The references explain definitions and methods; any extra preset must be checked against the assumptions on this page."
  },
  "contract": {
    "compute": "const volume=length*height*depth;const cords=volume/128;const logLengthFt=Number(logLength)/12;const faceVolume=4*8*logLengthFt;if(![length,height,depth,logLength,pricePerCord,airGaps].map(Number).every(Number.isFinite)||length<=0||height<=0||depth<=0||logLength<=0||pricePerCord<0||airGaps<0||airGaps>60)return{cubicFeet:null,cords:null,faceCords:null,solidVolume:null,cost:null,__error:'inputError'};const solidVolume=volume*(1-airGaps/100);return{cubicFeet:volume,cords,faceCords:faceVolume>0?volume/faceVolume:null,solidVolume,cost:cords*pricePerCord};",
    "inputs": [
      {
        "name": "length",
        "type": "number",
        "default": 8,
        "min": 0.1,
        "max": 200,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "height",
        "type": "number",
        "default": 4,
        "min": 0.1,
        "max": 30,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "depth",
        "type": "number",
        "default": 4,
        "min": 0.1,
        "max": 30,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "logLength",
        "type": "number",
        "default": 16,
        "min": 6,
        "max": 48,
        "step": 1,
        "slider": true
      },
      {
        "name": "pricePerCord",
        "type": "number",
        "default": 350,
        "min": 0,
        "max": 10000,
        "step": 1
      },
      {
        "name": "airGaps",
        "type": "number",
        "default": 25,
        "min": 0,
        "max": 60,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "cubicFeet",
        "precision": 1,
        "unit": "cu ft"
      },
      {
        "name": "cords",
        "precision": 3,
        "unit": "cords"
      },
      {
        "name": "faceCords",
        "precision": 2,
        "unit": "face cords"
      },
      {
        "name": "solidVolume",
        "precision": 1,
        "unit": "cu ft"
      },
      {
        "name": "cost",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
