Age in total weeks
Count how many complete weeks someone has lived between a birth date and a later day: from 15 May 1990 to 15 May 2024 is 1,774 weeks plus 1 day. Every leap year is counted exactly. 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
- 2024-05-15
- Jdn birth
- 2,448,027
- Jdn reference
- 2,460,446
- Total days
- 12,419
- Age in weeks
- 1,774
People search for an age-in-total-weeks calculator when they want a single whole-week count of how long someone has lived from an explicit birth date to an explicit reference day, not a full age broken into years and months, and not a generic weeks-between-two-dates tool that ignores which day is birth. Parents track newborn age in weeks for pediatric visits and feeding schedules. Researchers and product teams label cohort age in weeks for trials, onboarding funnels, and subscription milestones. Historians and journalists express a life span or anniversary in completed seven-day blocks. This capability accepts two strict ISO calendar dates, validates that each day truly exists on the Gregorian calendar including leap-year Februaries, converts both to astronomical Julian Day Numbers with pure integer arithmetic, and returns floor of the non-negative day span divided by seven as age in total weeks, together with leftover days from zero through six. The reference date must fall on or after the birth date so “weeks lived” never goes negative. Impossible bases such as the twenty-ninth of February in a common year fail with a clear validation error instead of wrapping silently.
How age in total weeks is computed from two ISO dates
Begin with two civil calendar dates written as year, month, and day in the international ISO form with hyphens and fixed widths so every client agrees on the same six integers: the birth date and the reference date you care about, such as a checkup day, a report cut-off, or a historical milestone.
For each string confirm that the year lies in a practical Gregorian range from year one through nine thousand nine hundred ninety-nine, that the month is between one and twelve, and that the day exists for that month under Gregorian leap rules: a year is a leap year when it is divisible by four, except that century years are leap years only when they are also divisible by four hundred.
That rule makes February twenty-nine legal in years such as two thousand twenty-four and two thousand, and illegal in two thousand twenty-three and nineteen hundred. When both triples are valid, convert each civil day to an astronomical Julian Day Number with the Fliegel and Van Flandern integer formula used across the date family. Subtract the birth day number from the reference day number to obtain total calendar days lived between those two civil midnights.
When the difference is zero or positive, divide by seven with integer floor for whole weeks lived and keep the remainder as leftover days between zero and six inclusive.
Where total-weeks age calculators show up in real work
Pediatric and newborn care tracks infants in completed weeks of life for visit schedules, growth charts, and feeding guidance when a day-level age is too fine and a year-level age is useless. Clinical trials and longitudinal studies label participant follow-up windows as weeks since enrollment or weeks of life when the protocol is written in week units. Product and growth teams measure time-since-signup in whole weeks for activation cohorts, retention curves, and feature gates that unlock after a fixed week count.
HR and benefits tooling sometimes expresses continuous service or parental-leave eligibility in weeks from a hire or birth event without pulling a full HRIS date library. If you later need absolute weeks between two unordered dates, age broken into years months and days, business-day counts that skip weekends, or pure day addition to a single base, treat those as separate search intents and landings rather than overloading this age-in-total-weeks page.
What you can do with it
Newborn and pediatric week-of-life tracking
Convert a birth ISO date and a checkup reference day into whole weeks lived plus leftover days for visit schedules, growth notes, and parent-facing week-of-life labels.
Cohort and retention age in weeks
Label trial participants or product signups by completed weeks from birth or enrollment date to a report cut-off for week-based protocols and funnels.
Anniversaries and life-span week counts
Express how many full seven-day weeks separate a birth date from a milestone or historical reference day for journalism, memorials, and teaching demos.
FAQ
What does age in total weeks mean?
It means the non-negative civil-day span from an explicit birth date to an explicit reference date, expressed as whole seven-day weeks plus a leftover of zero through six days, without using wall-clock “today” or business-day rules.
What date format is required?
Values like 1990-5-15 or 1990/05/15 are rejected so every client agrees.
What if the reference date is before the birth date?
Weeks lived cannot be negative; swap the fields only if you meant a different span tool such as weeks between two unordered dates.
What does it cost?
The browser tool is free and runs locally.
What are the leftover days in the result?
They are the days after the last complete week, always between zero and six. A common year of 365 days, for example, gives fifty-two whole weeks and 1 leftover day.
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/date/age-in-weeks \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"birth_date":"1990-05-15","reference_date":"2024-05-15"}'const res = await fetch("https://api.kit.forhosting.com/date/age-in-weeks", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"birth_date": "1990-05-15",
"reference_date": "2024-05-15"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/age-in-weeks",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"birth_date": "1990-05-15",
"reference_date": "2024-05-15"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/age-in-weeks", 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":"2024-05-15"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"birth_date":"1990-05-15","reference_date":"2024-05-15"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/age-in-weeks", 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": "2024-05-15"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.age_in_weeks",
"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
How age in total weeks is computed from two ISO dates
If that difference is negative, the reference falls before birth and the request fails with invalid input rather than inventing a negative age.
What you send and what you get back
Classic checks include exactly one year of three hundred sixty-five days from a non-leap birthday yielding fifty-two whole weeks and one leftover day, a leap-day birth to a later leap-day anniversary spanning the correct multi-year day count, identical dates yielding zero weeks and zero leftover days, and fourteen days later yielding exactly two weeks. Send two required string fields: birth_date and reference_date, each a strict ISO calendar day such as nineteen ninety hyphen zero five hyphen one five and two thousand twenty-four hyphen zero five hyphen one five. Common aliases such as dob, birth, as_of, and to are accepted by the same core so scripts can use familiar names without changing the math. Missing fields, non-string values, strings that do not match the four-two-two digit pattern, dates that match the pattern but are not real calendar days, and a reference that is earlier than birth all fail with invalid_input and are not charged. On success the response echoes the normalized birth_date and reference_date ISO strings, the Julian Day Number for each side, total_days as the non-negative civil span, age_in_weeks as the floor of total days divided by seven, leftover_days as the remainder modulo seven, and a short formula string that documents the JDN path. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where total-weeks age calculators show up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Technical questions
Why do I need a reference date instead of using today?
Both dates are explicit so the result is fully deterministic: the same pair always yields the same week count in golden tests, offline widgets, and Workers that must not read the host clock.