Age Calculator API
Exact age in years, months and days on a given date, with totals in days and weeks and the next birthday.
POST /api/v1/tools/age-calculatorMCP age_calculatorTime & DateCalculate exact age in years, months and days from a date of birth, plus total days and weeks, the weekday you were born and days to your next birthday.
Input
Send these as a JSON object. Unknown fields are rejected.
- birthDate
- Date of birth as YYYY-MM-DD. (string, up to 10 characters, required)
- asOf
- Date to calculate the age on, as YYYY-MM-DD. Defaults to today (UTC). Someone born on 29 February has their birthday on 28 February in common years. (string, up to 10 characters)
curl https://pithlab.com/api/v1/tools/age-calculator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"birthDate":"1990-05-15","asOf":"2026-10-20"}'Example response
{
"ok": true,
"result": {
"years": 36,
"months": 5,
"days": 5,
"totalMonths": 437,
"totalDays": 13307,
"totalWeeks": 1901,
"remainderDays": 0,
"bornOnWeekday": "Tuesday",
"birthdayToday": false,
"nextBirthday": "2027-05-15",
"nextBirthdayWeekday": "Saturday",
"daysToNextBirthday": 207,
"nextAge": 37,
"text": "Age on 2026-10-20: 36 years, 5 months, 5 days (13,307 days)"
}
}