Weeks until a future date
From July 25 to September 10, 2026 there are 47 days: 6 whole weeks and 5 days, or 6.714286 weeks as a decimal. You enter both dates, so a saved countdown for a launch or contract window gives the same answer next month. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Reference date
- 2026-07-25
- Target date
- 2026-09-10
- Total days
- 47
- Whole weeks
- 6
- Remaining days
- 5
- Fractional weeks
- 6.714286
The weeks-until-date calculator measures the exact calendar-day gap from an explicit ISO reference date to an explicit later target date. It reports completed seven-day blocks, leftover days, and the same interval as a decimal number of weeks. Both inputs are supplied by you, so the answer never changes with the current clock, browser location, daylight-saving rules, or server settings. Strict validation also catches impossible dates and targets that are not actually later than the reference date.
Enter two explicit ISO calendar dates
For example, 2026-07-25 is accepted, while 2026-7-25, July 25 2026, and strings containing a time are rejected. Requiring one unambiguous representation prevents regional day-month ordering from changing the result. The calculator validates the real proleptic Gregorian calendar as well as the visible pattern.
February 29 is therefore valid in 2024 and 2000, but invalid in 2023 and 1900; April 31 is always invalid. Years from 0001 through 9999 are supported. The target must be strictly later than the reference.
Nothing is inferred from today.
Understand whole weeks, leftover days, and fractional weeks
A 47-day interval therefore contains 6 whole weeks, 5 remaining days, and 6.714286 fractional weeks. Moving from one midnight to the next is one day, so a reference of Monday and a target of the following Monday is exactly seven days and exactly one week. No weekends or holidays are removed.
Each day is an ordinary civil calendar day, which is appropriate for countdown plans, project milestones, contract windows, and other elapsed-date calculations rather than business-day calendars.
Why the result is deterministic in UTC
Instead, it validates the year, month, and day and maps each Gregorian date to an integer day number using fixed arithmetic. Subtracting those integers yields the exact interval. That design avoids daylight-saving transitions that can make a local-clock subtraction appear one hour short or long, and it avoids parsing rules that differ between runtimes.
There is no network request, random value, current timestamp, or locale-sensitive parser in the algorithm. The response repeats both ISO inputs so downstream records remain self-describing. Invalid values fail clearly instead of being normalized silently; a nonexistent date is never rolled into the next month.
Because the operation depends only on two short strings and constant-time integer arithmetic, it is suitable for repeated automated checks without introducing clock drift or external service availability into a pipeline.
What you can do with it
Plan a fixed milestone
Measure complete and decimal weeks from an approved planning date to a later release, launch, or delivery date.
Build reproducible countdown data
Store an explicit reference beside the target so reports can be regenerated without changing as the current date advances.
Compare future intervals
Use decimal weeks to compare contract windows, study plans, campaign periods, or project phases on a common scale.
FAQ
How are fractional weeks calculated?
The exact calendar-day difference is divided by seven and returned to six decimal places. Whole weeks and remaining days are also returned separately.
How many weeks are there from July 25 to September 10, 2026?
There are 47 days, which is 6 whole weeks and 5 days, or 6.714286 weeks as a decimal. The decimal describes the whole gap; it is not an extra part-week added to the 6.
Can the target date be the same as the reference date or earlier?
No. The target must fall strictly after the reference. Equal dates or a target in the past are rejected, because the tool only answers how many weeks remain until a later day.
Does the calculator use today's date?
No, nothing is taken from today. Enter today yourself as the reference date; because both dates are written down, the same calculation gives the same answer whenever you open it again.
Are weekends and holidays left out of the count?
No. Every calendar day counts, so a Monday to the following Monday is exactly seven days and one week. That suits countdowns and contract windows rather than business-day planning.
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/weeks-until-date \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"reference_date":"2026-07-25","target_date":"2026-09-10"}'const res = await fetch("https://api.kit.forhosting.com/date/weeks-until-date", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"reference_date": "2026-07-25",
"target_date": "2026-09-10"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/weeks-until-date",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"reference_date": "2026-07-25",
"target_date": "2026-09-10"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/weeks-until-date", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"reference_date":"2026-07-25","target_date":"2026-09-10"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"reference_date":"2026-07-25","target_date":"2026-09-10"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/weeks-until-date", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"reference_date": "2026-07-25",
"target_date": "2026-09-10"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.weeks_until_date",
"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
Enter two explicit ISO calendar dates
Provide reference_date and target_date in the fixed YYYY-MM-DD format, including all leading zeroes. Equal dates and targets before the reference produce an invalid_input error because this capability answers a deliberately narrow question: how many weeks remain from a known starting date until a known future date. If a workflow runs the same request next month, it receives the same answer because the reference is part of the request rather than read from a clock. That property makes saved calculations, audit records, tests, and scheduled jobs reproducible. It also makes the input contract easy to review: the two dates shown in a request are the complete basis for the result, with no hidden timezone, locale, or current-date assumption affecting the count.
Understand whole weeks, leftover days, and fractional weeks
The result starts with total_days, the number of midnight-to-midnight calendar intervals between the reference and target. whole_weeks is the integer quotient when that count is divided by seven, and remaining_days is the remainder from zero through six. fractional_weeks expresses the entire interval in weeks by dividing total_days by seven and rounding the displayed JSON number to six decimal places. These fields describe the same duration in complementary ways; fractional_weeks is not an extra partial week added to whole_weeks. Use whole_weeks when only fully completed seven-day blocks count, remaining_days when a schedule needs the residual calendar days, and fractional_weeks for estimates, charts, rates, or comparisons that accept decimals. The calculation does not count both endpoints as full days.
Why the result is deterministic in UTC
Identical inputs consequently produce identical JSON in a browser, an edge worker, a test suite, or a later replay. You can try the calculation in the browser at no charge, while a successful API item uses the published base price of $0.002.
Technical questions
Does the calculator use today's date?
No. You must provide both reference_date and target_date, so the calculation never depends on the current clock.
Must the target date be later?
Yes. Equal dates and targets before the reference are rejected with invalid_input because this capability measures time until a future target.
Can daylight-saving time change the answer?
No. The algorithm uses Gregorian integer day arithmetic with UTC semantics and never uses local times or the JavaScript Date object.
What does an API calculation cost?
A successful item uses the published base price of $0.002. The browser calculator is available without an API charge.