Age calculator
Find someone's age in completed years between two dates: a person born on 1990-05-15 is 36 on 2026-07-25, because the birthday has already passed that year. Handy for school cut-offs and age limits. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Birth date
- 1990-05-15
- Reference date
- 2026-07-25
- Age
- 36
- Years
- 36
An age calculator answers the everyday question of how many whole years someone has lived between a birth date and a chosen reference date. People use it for school cut-offs, contest age groups, employment eligibility, insurance underwriting, and simple curiosity about how old they will be on a future day. The result is the completed years of life after the last birthday on or before the reference date.
What whole-year age means and how birthdays are counted
Whole-year age is the number of completed birthdays between a birth date and a reference date, not a count of calendar days divided by three hundred sixty-five and not a breakdown into leftover months. Subtract the birth year from the reference year, then ask a single question: has the anniversary of the birth month and day already occurred on the reference date?
If the reference month and day are strictly earlier than the birth month and day, the last birthday has not arrived yet and the year total is reduced by one. If the dates match, the birthday has been reached and that year counts. The same pair of civil dates always produces the same integer, because the engine never samples a host clock, a time zone, or daylight-saving tables.
A child born on the fifteenth of May nineteen ninety is thirty-six years old on the twenty-fifth of July two thousand twenty-six, because May fifteenth has already passed that year. The same person is still thirty-five on the first of May two thousand twenty-six, because the birthday is two weeks away. Leap-day births follow a plain month-and-day compare: a person born on the twenty-ninth of February turns a year older on the first of March in a non-leap reference year, because the twenty-eighth is still earlier than the twenty-ninth.
This is a completed-year contract, not an exact civil triple of years, months, and days, and not a raw day-count between two timestamps. Use those neighbouring tools when the product copy needs leftover months or an unordered span length; use this page when the search and the form ask only how old someone is in whole years.
Where a whole-year age calculator earns its keep
School enrolment and sports age groups need a single integer against a published cut-off date, not a months-and-days triple that a clerk would have to re-interpret. Contest rules, cinema ratings, and regulated product access often ask only whether someone is sixteen, eighteen, or twenty-one on a stated day. Human-resources onboarding and insurance underwriting store completed years against an audit date so exports and regression suites reproduce the same number every time.
Parent dashboards and classroom demos can run the free in-browser age calculator without installing a date library or shipping a timezone database to every client. Keep expectations honest: this capability measures Gregorian completed years between two explicit dates; it does not skip weekends as business age, load public holiday calendars, convert lunar ages, default the reference to today on the server, or invent leftover months.
Pair it with an exact years-months-days tool when a pediatric chart needs the leftover months, and with a date-difference helper when the product copy talks about a span rather than an age.
What you can do with it
School and contest age gates
Pass a fixed birth date and a published cut-off reference date to show completed years for enrolment, league age groups, or regulated access without host-clock drift.
How old will I be on a future date
Enter a birth date and a future reference date to see the whole-year age on a wedding day, a trip, a retirement date, or the next school year.
FAQ
How does this age calculator count whole years?
The engine subtracts the years, then subtracts one if the birthday has not yet occurred on the reference date.
What if the birth date is after the reference date?
Age cannot be negative; correct the pair rather than expecting a signed year count.
How are leap-day birthdays handled?
A birth on 29 February reaches the next year on 1 March in a non-leap reference year, because 28 February is still earlier than the 29th. In a leap year the anniversary is 29 February itself.
What does the age calculator cost?
The browser tool is free on your device.
Why do I have to enter the reference date myself?
Because the calculator never reads a clock, so the same two dates always give the same age on any device. Enter today, a past day or a future one, such as a school cut-off or a contest deadline.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/life/age \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"birth_date":"1990-05-15","reference_date":"2026-07-25"}'const res = await fetch("https://api.kit.forhosting.com/life/age", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"birth_date": "1990-05-15",
"reference_date": "2026-07-25"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/life/age",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"birth_date": "1990-05-15",
"reference_date": "2026-07-25"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/life/age", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"birth_date":"1990-05-15","reference_date":"2026-07-25"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"birth_date":"1990-05-15","reference_date":"2026-07-25"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/life/age", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"birth_date": "1990-05-15",
"reference_date": "2026-07-25"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "life.age",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This tool never invents today from a server clock: both the birth date and the reference date must be supplied as civil YYYY-MM-DD values, so the same pair always yields the same integer age in a browser, in continuous integration, and on the API. Invalid calendar days and a birth date that falls after the reference date fail with invalid_input and are not billed. Successful API calls use the published $0.002 base price.
Input contract, calendar validation, and the response shape
Each value should be a civil calendar day in YYYY-MM-DD form, for example nineteen ninety hyphen zero five hyphen fifteen for a birth date and two thousand twenty-six hyphen zero seven hyphen twenty-five for the snapshot day. You may prefix a full ISO-8601 datetime; if a time is present only the calendar date part is used, because whole-year age is a date-to-date measure, not a clock duration with time zones. Years range from one through nine thousand nine hundred ninety-nine, months must be one through twelve, and the day must exist in that month under Gregorian leap rules, including February twenty-nine only in leap years. POST a compact JSON body with two required string fields: birth_date and reference_date. Optional aliases birth, birthdate, dob, and from map to the birth field; reference, as_of, to, and on map to the reference field so form builders and SDKs can keep familiar names. Impossible pairs such as two thousand twenty-three hyphen zero two hyphen twenty-nine are rejected with invalid_input instead of being clamped into March. If the birth date falls strictly after the reference date, the request fails with a clear message that age cannot be negative. Missing fields, empty strings, and non-string values fail with invalid_input naming the field and are not billed.
Where a whole-year age calculator earns its keep
Call the prepaid API when eligibility pipelines, visa forms, or payroll snapshots need a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request.
Integration use cases
HR and insurance snapshots
Store completed years against a payroll or underwriting date so exports and golden tests reproduce the same integer every time.
Technical questions
Does the age calculator use today's date automatically?
No. reference_date is required. The engine never reads the system clock, so results stay identical in CI, browsers, and API workers.