Age calculator API: exact age from a date of birth

$0.01 per call · failed calls are never charged · no account or API key needed

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

Run it free (25 free calls) Buy credits by card (from $5) Example result (JSON)

Try it with your own inputs

Date of birth, YYYY-MM-DD

Uses one of your 25 free calls. Nothing is charged, and a call that fails is not counted.

Inputs

NameTypeDescription
birthdate (required)stringDate of birth, YYYY-MM-DD
onstringMeasure 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.

Related tools