{
  "id": "baby-age",
  "version": "da9b975de0b6",
  "status": "published",
  "name": "Baby Age Calculator",
  "question": "Age calculator of baby",
  "summary": "Works out how old a baby is from the birth date, in months and days and in weeks and days, and the corrected age of a baby born before the due date.",
  "category": "days",
  "subcategory": "age",
  "url": "https://www.acalculator.org/days/baby-age-calculator",
  "markdown": "https://www.acalculator.org/days/baby-age-calculator.md",
  "kind": "function",
  "method": "age = the whole years, months, and days from the birth date to the age-on date; corrected age = the same from the due date (the age less the weeks born early)",
  "assumptions": [
    "Dates are whole calendar days with no time of day; the day of birth is day 0.",
    "Months are calendar months from the birth date; a day that a month does not have moves to its last day.",
    "Corrected age (AAP) counts from the due date. Use it for a baby born early, for the first 2 years.",
    "The age-on date is today unless you change it; the page reads today’s date from your device when it loads."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "birth": {
        "title": "Birth date",
        "description": "The day the baby was born.",
        "type": "string",
        "format": "date"
      },
      "on": {
        "title": "Age on",
        "description": "The date to work out the age on. Today, unless you change it.",
        "type": "string",
        "format": "date"
      },
      "due": {
        "title": "Due date (if born early)",
        "description": "The due date, for a baby born before it. Leave it empty for a baby born on time.",
        "type": "string",
        "format": "date"
      }
    }
  },
  "outputs": {
    "age": {
      "label": "Age",
      "description": "Whole years, whole months, and days from the birth date to the age-on date.",
      "format": "duration"
    },
    "weeks": {
      "label": "In weeks",
      "description": "The age as whole weeks and the days left.",
      "format": "duration"
    },
    "days": {
      "label": "Days old",
      "description": "Days from the birth date to the age-on date.",
      "format": "integer"
    },
    "corrected": {
      "label": "Corrected age",
      "description": "For a baby born early: whole years, months, and days from the due date to the age-on date (the age less the weeks born early).",
      "format": "duration"
    },
    "correctedWeeks": {
      "label": "Corrected age in weeks",
      "description": "The corrected age as whole weeks and the days left.",
      "format": "duration"
    },
    "early": {
      "label": "Born early by",
      "description": "Weeks and days from the birth date to the due date.",
      "format": "duration"
    },
    "toDue": {
      "label": "Days to the due date",
      "description": "When the age-on date is before the due date: the days left until the due date.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "birth": "2026-06-22",
      "on": "2026-09-30"
    },
    "outputs": {
      "age": {
        "years": 0,
        "months": 3,
        "days": 8
      },
      "weeks": {
        "weeks": 14,
        "days": 2
      },
      "days": 100
    },
    "text": "A baby born on June 22, 2026 is 3 months, 8 days old on September 30, 2026."
  },
  "examples": [
    {
      "given": {
        "birth": "2026-06-22",
        "on": "2026-09-30"
      },
      "expect": {
        "age": {
          "years": 0,
          "months": 3,
          "days": 8
        },
        "weeks": {
          "weeks": 14,
          "days": 2
        },
        "days": 100
      },
      "source": "Julian Day numbers (Meeus, Astronomical Algorithms, 1991, chapter 7): JD 2461313.5 − JD 2461213.5 = 100 days; hand calculation in content.mdx"
    },
    {
      "given": {
        "birth": "2026-01-01",
        "on": "2026-04-23",
        "due": "2026-02-26"
      },
      "expect": {
        "weeks": {
          "weeks": 16,
          "days": 0
        },
        "early": {
          "weeks": 8,
          "days": 0
        },
        "correctedWeeks": {
          "weeks": 8,
          "days": 0
        },
        "corrected": {
          "years": 0,
          "months": 1,
          "days": 28
        }
      },
      "source": "American Academy of Pediatrics, HealthyChildren.org, Corrected Age For Preemies: corrected age = age in weeks − weeks born early (https://www.healthychildren.org/English/ages-stages/baby/preemie/Pages/Corrected-Age-For-Preemies.aspx); hand calculation in content.mdx"
    },
    {
      "given": {
        "birth": "2026-09-01",
        "on": "2026-09-30",
        "due": "2026-10-20"
      },
      "expect": {
        "weeks": {
          "weeks": 4,
          "days": 1
        },
        "early": {
          "weeks": 7,
          "days": 0
        },
        "toDue": 20
      },
      "source": "hand calculation in content.mdx"
    },
    {
      "given": {
        "birth": "2024-02-29",
        "on": "2026-02-28"
      },
      "expect": {
        "age": {
          "years": 2,
          "months": 0,
          "days": 0
        },
        "days": 730
      },
      "source": "Gregorian leap-year rule (ISO 8601); hand calculation in content.mdx"
    }
  ],
  "sources": [
    "American Academy of Pediatrics, HealthyChildren.org, Corrected Age For Preemies: corrected age is the age in weeks less the weeks born early, used for the first 2 years. https://www.healthychildren.org/English/ages-stages/baby/preemie/Pages/Corrected-Age-For-Preemies.aspx",
    "CDC, Special Situations (General Best Practices for Immunization): preterm infants are vaccinated at the same chronological age and schedule as full-term infants. https://www.cdc.gov/vaccines/hcp/imz-best-practices/special-situations.html",
    "Jean Meeus, Astronomical Algorithms (1991), chapter 7: Julian Day numbers, so the days between two dates are the difference of their Julian Days."
  ],
  "related": [
    "dob",
    "chronological-age",
    "weeks",
    "days-since"
  ],
  "changelog": []
}
