{
  "schemaVersion": 1,
  "slug": "kids-clothing-size-calculator",
  "category": "fashion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "a1e8be83eb55d710136114f1bf7529c47d96d12b0fab9cf30a3120d094a89fc7",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/kids-clothing-size-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": "EU reference = 50 + round((h_cm − 50) ÷ 6) × 6; clamp 50–176",
    "vars": [
      [
        "EU",
        "Approximate height-size reference"
      ],
      [
        "h_cm",
        "Child height (cm)"
      ]
    ],
    "note": "Height-only reference rounded to the nearest 6 cm label from 50 to 176 cm. It is not a universal country conversion or fit prediction; brand charts vary."
  },
  "externalEvidence": {
    "reviewedAt": "2026-09-28",
    "sources": [
      {
        "name": "BSI — BS EN 13402-3: Size designation of clothes",
        "url": "https://accord-checkout.bsigroup.com/products/size-designation-of-clothes-measurements-and-intervals"
      }
    ]
  },
  "contract": {
    "compute": "const hcm=unit==='cm'?height:height*2.54;if(!Number.isFinite(hcm)||hcm<45.72||hcm>178)return{euSize:null,__error:'inputError'};const euSize=Math.max(50,Math.min(176,Math.round((hcm-50)/6)*6+50));return {euSize};",
    "inputs": [
      {
        "name": "height",
        "type": "number",
        "default": 46,
        "min": 18,
        "max": 70,
        "step": 0.5,
        "unitField": "unit",
        "minByUnit": {
          "in": 18,
          "cm": 45.72
        },
        "maxByUnit": {
          "in": 70,
          "cm": 177.8
        },
        "unitScales": {
          "in": 1,
          "cm": 0.39370078740157477
        }
      },
      {
        "name": "unit",
        "type": "select",
        "default": "in",
        "options": [
          {
            "value": "in"
          },
          {
            "value": "cm"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "euSize",
        "precision": 0
      }
    ],
    "interpret": null
  }
}
