← All tool references

Date & Time · execute

Age Calculator

Calculate your exact age in completed years, months, and days—or measure the precise age on any past or future date.

Open public tool

Overview

Category
Date & Time
API mode
execute
Processing
client-side
Privacy
no-data-stored

Public descriptor

The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.

GET /api/v1/tools/age-calculator

View this descriptor as JSON

Execute availability

This tool has an execute route defined by its descriptor. Server-side execution is currently unavailable, so requests return api_not_launched.

POST /api/v1/tools/age-calculator/execute

Authentication is not issued during the preview. A bearer API key is planned for execution after launch.

Input schema

object object; additional properties are not accepted.

birth_date · string · required
Choose the date of birth to measure from.
as_of_date · string · optional
Leave this blank to calculate the age through today, or choose another date for a past or future comparison.
{
    "type": "object",
    "properties": {
        "birth_date": {
            "type": "string",
            "description": "Choose the date of birth to measure from."
        },
        "as_of_date": {
            "type": "string",
            "description": "Leave this blank to calculate the age through today, or choose another date for a past or future comparison."
        }
    },
    "required": [
        "birth_date"
    ],
    "additionalProperties": false
}

Output schema

On a successful execution, schema values appear in data.result.values.

years · number
Completed years.
months · number
Additional months.
days · number
Additional days.
total_days · number
Inclusive day span.
{
    "type": "object",
    "properties": {
        "years": {
            "type": "number",
            "description": "Completed years."
        },
        "months": {
            "type": "number",
            "description": "Additional months."
        },
        "days": {
            "type": "number",
            "description": "Additional days."
        },
        "total_days": {
            "type": "number",
            "description": "Inclusive day span."
        }
    },
    "additionalProperties": false
}

Age Calculator: Age from birth date

The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.

curl -X POST "https://utilitypages.org/api/v1/tools/age-calculator/execute" \
  -H "Content-Type: application/json" \
  -d '{
    "birth_date": "2000-01-15",
    "as_of_date": "2026-01-15"
}'
{
    "ok": true,
    "data": {
        "slug": "age-calculator",
        "result": {
            "values": {
                "years": 26,
                "months": 0,
                "days": 0,
                "total_days": 9497
            },
            "display": {
                "display": "26"
            },
            "warnings": [],
            "assumptions": [],
            "steps": []
        }
    },
    "meta": [],
    "request_id": "req_example_123"
}

Errors

api_not_launched · 503
Returned by the current launch gate for every execute request.
invalid_json · 400
Returned when an enabled execute request does not contain valid JSON.
validation_failed · 422
Returned when a request does not satisfy the input schema.
browser_interaction_required · 422
Returned for browser capability tools instead of inventing a server-side result.
tool_not_found · 404
Returned when a requested descriptor slug does not exist.
execution_failed · 503
Returned when an enabled server-side execution cannot complete.