{
  "id": "birth-year",
  "version": "c333bd1c6f9e",
  "status": "published",
  "name": "Birth Year Calculator",
  "question": "What is my birth year from my age?",
  "summary": "Works out the year someone was born from their age and today’s date (or any date), and whether their birthday has come yet that year; if you are not sure, it gives both possible years.",
  "category": "days",
  "subcategory": "age",
  "url": "https://www.acalculator.org/days/birth-year-calculator",
  "markdown": "https://www.acalculator.org/days/birth-year-calculator.md",
  "kind": "function",
  "method": "With Y the year of the date and A the age: born in Y − A if the birthday has come by the date, Y − A − 1 if not; not sure gives both.",
  "assumptions": [
    "Age is counted in complete years: it goes up by 1 on each birthday and is never rounded up.",
    "You say whether the birthday has come; the page does not need the birthday itself."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "age": {
        "title": "Age",
        "description": "The age in whole years, as you would say it.",
        "type": "integer",
        "minimum": 0,
        "maximum": 130
      },
      "on": {
        "title": "On date",
        "description": "The date the age is for. Today, unless you change it.",
        "type": "string",
        "format": "date"
      },
      "had": {
        "title": "Birthday this year?",
        "description": "Whether the birthday has already come in that year, on or before the date.",
        "type": "string",
        "enum": [
          "yes",
          "no",
          "unsure"
        ]
      }
    }
  },
  "outputs": {
    "year": {
      "label": "Birth year",
      "description": "The year of birth, or the two possible years.",
      "format": "text"
    },
    "earliest": {
      "label": "Earliest possible year",
      "description": "The earlier year it can be.",
      "format": "text"
    },
    "latest": {
      "label": "Latest possible year",
      "description": "The later year it can be.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "age": 16,
      "on": "2026-10-19",
      "had": "yes"
    },
    "outputs": {
      "year": "2010",
      "earliest": "2010",
      "latest": "2010"
    },
    "text": "Someone aged 16 on October 19, 2026 was born in 2010."
  },
  "examples": [
    {
      "given": {
        "age": 16,
        "on": "2026-10-18",
        "had": "yes"
      },
      "expect": {
        "year": "2010",
        "earliest": "2010",
        "latest": "2010"
      },
      "source": "U.S. Census Bureau, American Community Survey 2023 Subject Definitions, Age: age in complete years as of the date, not rounded up before a birthday. https://www2.census.gov/programs-surveys/acs/tech_docs/subject_definitions/2023_ACSSubjectDefinitions.pdf; hand calculation in content.mdx: 2026 − 16 = 2010"
    },
    {
      "given": {
        "age": 16,
        "on": "2026-10-18",
        "had": "no"
      },
      "expect": {
        "year": "2009",
        "earliest": "2009",
        "latest": "2009"
      },
      "source": "U.S. Census Bureau, American Community Survey 2023 Subject Definitions, Age: age in complete years as of the date, not rounded up before a birthday. https://www2.census.gov/programs-surveys/acs/tech_docs/subject_definitions/2023_ACSSubjectDefinitions.pdf; hand calculation in content.mdx: 2026 − 16 − 1 = 2009"
    },
    {
      "given": {
        "age": 30,
        "on": "2026-03-01",
        "had": "unsure"
      },
      "expect": {
        "year": "1995 or 1996",
        "earliest": "1995",
        "latest": "1996"
      },
      "source": "U.S. Census Bureau, American Community Survey 2023 Subject Definitions, Age: age in complete years as of the date, not rounded up before a birthday. https://www2.census.gov/programs-surveys/acs/tech_docs/subject_definitions/2023_ACSSubjectDefinitions.pdf; hand calculation in content.mdx: 2026 − 30 = 1996, or 1995 before the birthday"
    },
    {
      "given": {
        "age": 0,
        "on": "2026-01-01",
        "had": "no"
      },
      "expect": {
        "year": "2025"
      },
      "source": "U.S. Census Bureau, American Community Survey 2023 Subject Definitions, Age: age in complete years as of the date, not rounded up before a birthday. https://www2.census.gov/programs-surveys/acs/tech_docs/subject_definitions/2023_ACSSubjectDefinitions.pdf; hand calculation in content.mdx: 2026 − 0 − 1 = 2025"
    }
  ],
  "sources": [
    "U.S. Census Bureau, American Community Survey 2023 Subject Definitions, Age: age is the age in complete years as of the date, not rounded up before a birthday. https://www2.census.gov/programs-surveys/acs/tech_docs/subject_definitions/2023_ACSSubjectDefinitions.pdf (cited from the copy already in this repo, src/families/how-old-am-i)"
  ],
  "related": [
    "how-old-will-i-be",
    "dob",
    "how-old-am-i",
    "birthday"
  ],
  "changelog": []
}
