Age calculator API: exact age from a date of birth
Exact age from a date of birth in years, months and days, total days lived, the weekday of birth, and the date of and days until the next birthday, measured today (UTC) or on any date you give. Use for age checks, forms and anniversaries.
When to use it
- Get an exact age in years, months and days for forms and checks
- Find the next birthday and the days left until it
- Measure age on any date, not only today
Inputs
| Name | Type | Description |
|---|---|---|
birthdate (required) | string | Date of birth, YYYY-MM-DD |
on | string | Measure on this date, YYYY-MM-DD (default today) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/calc/age?birthdate=1990-05-17"
Or one of your 25 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/calc/age?birthdate=1990-05-17&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.
Example result
{
"years": 36,
"months": 5,
"days": 6,
"totalDays": 13308,
"nextBirthday": "2027-05-17",
"daysUntilNextBirthday": 206,
"bornOn": "Thursday"
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is calc_age, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp
Questions
How are 29 February birthdays handled?
In years without 29 February the next birthday falls on 28 February.
Which time zone counts as today?
UTC, unless you pass the date to measure on.
How do I pay?
Each successful call costs $0.01; failed calls are not charged. The first 25 calls are free. Then pay with card credits (from $5) or per call in USDC over x402 or MPP. No account or API key is needed.