Calculates precise age from birthdate using deterministic date arithmetic. Access via MCP in Cursor or Windsurf for instant age calculations, or call GET /v1/time/age with birthdate parameter. Returns years, months, days, and total days lived. Handles leap years and timezone-aware calculations automatically.
curl "https://tinyfn.io/v1/time/age" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/time/age', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/time/age',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's time/timezone tools:
{
"mcpServers": {
"tinyfn-time": {
"url": "https://tinyfn.io/mcp/time",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Use the Calculate Age tool with a birthdate parameter like '1990-05-15'. It returns exact age in years, months, days, plus total days lived.
Accepts ISO 8601 formats like '1990-05-15', '1990-05-15T10:30:00Z', and common formats like 'May 15, 1990'. Always returns precise calculations.
Yes, it accounts for leap years in both the birth year and intervening years. February 29th birthdays are handled properly for non-leap calculation years.
The tool returns a breakdown: complete years, remaining months, remaining days, and total days lived. Perfect for detailed age analysis in AI applications.
Uses UTC by default for consistent results. If timezone is specified in the birthdate, calculations adjust accordingly to avoid off-by-one errors.
Get your free API key and start using Calculate Age in seconds.
Get Free API Key