{
  "schemaVersion": 1,
  "slug": "baby-name-popularity-calculator",
  "category": "fun",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "aabbf287f985360e1031886c6c5a9b28cab572cf40578488b3539f6c38e79484",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/baby-name-popularity-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": "p = 1.15 ÷ r^1.09 ÷ 100; N = B × p",
    "vars": [
      [
        "r",
        "Name rank"
      ],
      [
        "p",
        "Share as a fraction"
      ],
      [
        "B",
        "Total births"
      ],
      [
        "N",
        "Estimated babies with the name"
      ]
    ],
    "note": "p is a fractional share (multiply by 100 for percent); per thousand = p × 1000."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "US Social Security Administration — Baby name data limitations",
        "url": "https://www.ssa.gov/oact/babynames/limits.html"
      }
    ],
    "referenceRole": "context",
    "implementationHash": "aabbf287f985360e1031886c6c5a9b28cab572cf40578488b3539f6c38e79484",
    "basis": "p = 1.15 ÷ r^1.09 ÷ 100; N = B × p",
    "limitations": "The references provide context and limitations. They do not validate this page’s illustrative multipliers, lookup values or predictions."
  },
  "contract": {
    "compute": "const rankN = Math.max(1, Math.round(rank)); const share = 1.15/Math.pow(rankN, 1.09)/100; const babies = totalBirths*share; const perThousand = share*1000; const classmates = classSize*share; return { estimatedBabies: Math.round(babies), sharePercent: share*100, perThousand, classmatesWithName: classmates, rarity: rankN <= 20 ? 'Very common' : rankN <= 100 ? 'Common' : rankN <= 500 ? 'Familiar' : rankN <= 2000 ? 'Uncommon' : 'Rare' };",
    "inputs": [
      {
        "name": "rank",
        "type": "number",
        "default": 1,
        "min": 1,
        "max": 5000,
        "step": 1,
        "slider": true
      },
      {
        "name": "totalBirths",
        "type": "number",
        "default": 3600000,
        "min": 1,
        "max": 20000000,
        "step": 1000
      },
      {
        "name": "classSize",
        "type": "number",
        "default": 30,
        "min": 1,
        "max": 200,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "estimatedBabies",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "sharePercent",
        "precision": 4,
        "unit": "%"
      },
      {
        "name": "perThousand",
        "precision": 3,
        "unit": ""
      },
      {
        "name": "classmatesWithName",
        "precision": 2,
        "unit": ""
      },
      {
        "name": "rarity",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
