{
  "id": "how-old-will-i-be",
  "version": "f757416c4d33",
  "status": "published",
  "name": "How Old Will I Be Calculator",
  "question": "How old will I be in a future year?",
  "summary": "Works out how old you will be in any future year, from your date of birth or from your age now, before and after your birthday that year.",
  "category": "days",
  "subcategory": "age",
  "url": "https://www.acalculator.org/days/how-old-will-i-be-calculator",
  "markdown": "https://www.acalculator.org/days/how-old-will-i-be-calculator.md",
  "kind": "function",
  "method": "Birth year B = the year of the birth date, or this year − age now (− 1 more if this year’s birthday has not come). In year T: age after the birthday = T − B; before it = T − B − 1.",
  "assumptions": [
    "Age is counted in complete years: it goes up by 1 on each birthday and is never rounded up.",
    "Only the year of each date is used."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "known": {
        "title": "I know",
        "description": "Your date of birth, or only your age now.",
        "type": "string",
        "enum": [
          "age",
          "birth"
        ]
      },
      "age": {
        "title": "Age now",
        "description": "Your age today in whole years.",
        "type": "integer",
        "minimum": 0,
        "maximum": 130
      },
      "had": {
        "title": "Birthday this year?",
        "description": "Whether your birthday has already come this year.",
        "type": "string",
        "enum": [
          "yes",
          "no"
        ]
      },
      "on": {
        "title": "Today’s date",
        "description": "The date your age now is for. Today, unless you change it.",
        "type": "string",
        "format": "date"
      },
      "birth": {
        "title": "Birth date",
        "description": "Your date of birth.",
        "type": "string",
        "format": "date"
      },
      "year": {
        "title": "In the year",
        "description": "The future (or past) year to find your age in.",
        "type": "integer",
        "minimum": 1900,
        "maximum": 2500
      }
    }
  },
  "outputs": {
    "after": {
      "label": "Age after your birthday that year",
      "description": "The year minus your birth year.",
      "format": "integer"
    },
    "before": {
      "label": "Age before your birthday that year",
      "description": "One less than after the birthday.",
      "format": "integer"
    },
    "born": {
      "label": "Birth year",
      "description": "The year you were born.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "known": "age",
      "age": 11,
      "had": "yes",
      "on": "2026-10-19",
      "birth": "2015-10-19",
      "year": 2050
    },
    "outputs": {
      "after": 35,
      "before": 34,
      "born": "2015"
    },
    "text": "That year you will be 35 after your birthday, and 34 before it."
  },
  "examples": [
    {
      "given": {
        "known": "age",
        "age": 11,
        "had": "yes",
        "on": "2026-10-18",
        "year": 2050
      },
      "expect": {
        "born": "2015",
        "after": 35,
        "before": 34
      },
      "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 − 11 = 2015; 2050 − 2015 = 35"
    },
    {
      "given": {
        "known": "age",
        "age": 11,
        "had": "no",
        "on": "2026-10-18",
        "year": 2050
      },
      "expect": {
        "born": "2014",
        "after": 36,
        "before": 35
      },
      "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 − 11 − 1 = 2014; 2050 − 2014 = 36"
    },
    {
      "given": {
        "known": "birth",
        "birth": "1990-07-04",
        "year": 2040
      },
      "expect": {
        "born": "1990",
        "after": 50,
        "before": 49
      },
      "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: 2040 − 1990 = 50"
    }
  ],
  "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": [
    "birth-year",
    "dob",
    "how-old-am-i",
    "retirement-age"
  ],
  "changelog": []
}
