Age in Units

Calculate age in years, months, weeks, days, hours, and heartbeats from a birthdate.

⚡ 1 credit per call

Try it

Fill in the fields below and hit Send.

Why use this

LLMs can't reliably calculate precise age in multiple time units. Use this for age verification, demographic analysis, or any task requiring precise age calculations in different time units (years, months, weeks, days, hours, and even heartbeats).

Input

Field Type Required Description
birthdate string Birthdate in YYYY-MM-DD format
reference_date string Reference date in YYYY-MM-DD format. Defaults to today if omitted

Response

Field Type Description
years number Age in complete years
months number Total age in complete months
weeks number Total age in complete weeks
days number Total age in complete days
hours number Total age in complete hours
heartbeats number Approximate heartbeats (calculated as hours × 60 × 70)

API Reference

Endpoint

POST https://api.lightningapi.tools/age-in-units

Required headers

Authorization: Bearer <apiKey>
Content-Type: application/json

Example request

{
  "birthdate": "1990-01-01",
  "reference_date": "2025-01-01"
}

Example response

{
  "years": 35,
  "months": 420,
  "weeks": 1826,
  "days": 12784,
  "hours": 306816,
  "heartbeats": 1288627200
}