{
  "schemaVersion": 1,
  "slug": "tree-age-calculator",
  "category": "gardening",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "f0d7f2bf4f42b28542053d7174fe08a0936f8acd335026ff710af51ef5f89ec9",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/tree-age-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": "A = C ÷ π × g × c",
    "vars": [
      [
        "A",
        "Estimated age (years)"
      ],
      [
        "C",
        "Trunk circumference (in)"
      ],
      [
        "g",
        "Species growth factor"
      ],
      [
        "c",
        "Condition factor"
      ]
    ],
    "note": "The 2–7 species factors and 0.85/1/1.25 condition multipliers are illustrative heuristics, not measured growth rates for an individual tree. The 0.75A–1.3A range is also heuristic. Enter circumference in the unit selected above; the calculation converts centimetres to inches."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-18",
    "sources": [
      {
        "name": "University of Illinois Extension — Old Trees",
        "url": "https://extension.illinois.edu/blogs/naturalist-notebook/2020-02-28-old-trees"
      }
    ],
    "implementationHash": "f0d7f2bf4f42b28542053d7174fe08a0936f8acd335026ff710af51ef5f89ec9",
    "basis": "Divide circumference in inches by π to find trunk diameter. Multiply diameter by the species factor and the condition multiplier: age = diameter × g × c. The combined factor shown in the results is g × c, not g alone. This model uses species factors of 2–7 and condition multipliers of 0.85, 1 or 1.25; these are illustrative presets rather than measured growth rates for the individual tree. The range is 0.75 to 1.3 times the estimate, rounded to years. It is not a confidence interval. For a 150 cm oak trunk with average conditions, the estimate is about 75 years and the illustrative range is 56–98 years. Results depend on the presets and cannot determine an exact planting date.",
    "limitations": "Measure around the trunk at chest height, using the selected cm or inch unit. This model converts circumference to diameter and applies fixed species and condition factors. Both the age and the displayed range are illustrative estimates, not a measured age or a statistical confidence interval."
  },
  "contract": {
    "compute": "const G = { oak:4, maple:5, pine:5, birch:5, willow:2, ash:4, elm:4, apple:7, unknown:5 }; const C = { good:0.85, average:1, poor:1.25 }; if(!Number.isFinite(circumference)||circumference<1||circumference>1500||!['cm','in'].includes(measureUnit)||!Object.prototype.hasOwnProperty.call(G,species)||!Object.prototype.hasOwnProperty.call(C,condition))return{diameter:null,growthFactor:null,age:null,ageRange:null,diameterCm:null,__error:'inputError'}; const factor = (G[species] || 5)*(C[condition] || 1); const diameter = (measureUnit === 'cm' ? circumference/2.54 : circumference)/Math.PI; const age = diameter*factor; return { diameter, growthFactor: factor, age, ageRange: Math.round(age*0.75)+'-'+Math.round(age*1.3)+' years', diameterCm: diameter*2.54 };",
    "inputs": [
      {
        "name": "circumference",
        "type": "number",
        "default": 150,
        "min": 1,
        "max": 1500,
        "step": 0.5,
        "requiredValue": true,
        "strictRange": true
      },
      {
        "name": "measureUnit",
        "type": "select",
        "default": "cm",
        "options": [
          {
            "value": "cm"
          },
          {
            "value": "in"
          }
        ]
      },
      {
        "name": "species",
        "type": "select",
        "default": "oak",
        "options": [
          {
            "value": "oak"
          },
          {
            "value": "maple"
          },
          {
            "value": "pine"
          },
          {
            "value": "birch"
          },
          {
            "value": "willow"
          },
          {
            "value": "ash"
          },
          {
            "value": "elm"
          },
          {
            "value": "apple"
          },
          {
            "value": "unknown"
          }
        ]
      },
      {
        "name": "condition",
        "type": "select",
        "default": "average",
        "options": [
          {
            "value": "good"
          },
          {
            "value": "average"
          },
          {
            "value": "poor"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "age",
        "precision": 0,
        "unit": "years"
      },
      {
        "name": "ageRange",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "diameterCm",
        "precision": 1,
        "unit": "cm"
      },
      {
        "name": "diameter",
        "precision": 2,
        "unit": "in"
      },
      {
        "name": "growthFactor",
        "precision": 1,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
