# Days Until Calculator

> Counts the days from a reference date (default today) to a target date and reports the countdown as weeks and days, approximate months, a calendar breakdown and the target's weekday.

- Calculator id: `days-until` · Category: Everyday Life (`everyday`) · Tool name: `calculate_days_until`
- Canonical page: https://tttkmbb.com/everyday/days-until · This document: https://tttkmbb.com/everyday/days-until.md · JSON definition: https://tttkmbb.com/everyday/days-until.json

## Purpose

Counts the days from a reference date (default today) to a target date and reports the countdown as weeks and days, approximate months, a calendar breakdown and the target's weekday.

**Use when:** You need a countdown to an event, deadline or holiday, or how many days ago a date was.

**Do not use when:** You need business days or an inclusive count between two dates (use date-difference), or an age (use age).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `target_date` | date |  | required | The event date (YYYY-MM-DD). |
| `from_date` | date |  | optional, default "today" | Reference date; defaults to the current UTC date. |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `days` | integer | days | target_date − from_date; negative when the target is in the past. |
| `weeks` | integer | weeks | floor(\|days\| / 7). |
| `remaining_days` | integer | days | \|days\| mod 7. |
| `months_approx` | number | months | \|days\| / 30.4375 (average Gregorian month). |
| `calendar_text` | string |  | Whole years, months and days between the two dates. |
| `target_weekday` | string |  | Day of the week of target_date. |
| `is_past` | boolean |  | true when target_date is before from_date. |
| `countdown_text` | string |  | Days and weeks/days until (or since) the target. |

## Formula

`days = target_date − from_date; weeks = floor(|days| / 7); remaining_days = |days| mod 7; months_approx = |days| / 30.4375`

## Data Sources

- Gregorian calendar – leap-year rule and month lengths (Wikipedia) — https://en.wikipedia.org/wiki/Gregorian_calendar (reference, retrieved 2026-09-23)
- ISO 8601 – Date and time format (Wikipedia) — https://en.wikipedia.org/wiki/ISO_8601 (reference, retrieved 2026-09-23)

Data freshness: `daily` (max_age_seconds 86400). Depends on the current date unless the date is supplied.

## API

- `GET https://tttkmbb.com/api/v1/calculate/days-until?target_date=…`
- `POST https://tttkmbb.com/api/v1/calculate/days-until` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/days-until · OpenAPI operationId `calculate_days_until` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "days-until", "inputs": {…}}`

## Example

- From 2026-09-23 to 2026-12-25: inputs `{"target_date":"2026-12-25","from_date":"2026-09-23"}` → `{"days":93,"weeks":13,"remaining_days":2,"months_approx":3.1,"calendar_text":"3 months 2 days","target_weekday":"Friday","is_past":false,"countdown_text":"93 days (13 weeks 2 days) until 2026-12-25"}`
- From 2026-01-01 to 2027-01-01: inputs `{"target_date":"2027-01-01","from_date":"2026-01-01"}` → `{"days":365,"weeks":52,"remaining_days":1,"months_approx":12,"calendar_text":"1 year","target_weekday":"Friday","is_past":false}`

```
GET https://tttkmbb.com/api/v1/calculate/days-until?target_date=2026-12-25&from_date=2026-09-23
```

## Limitations

You need business days or an inclusive count between two dates (use date-difference), or an age (use age). All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Is the target day itself counted?**

No. From Monday to the following Friday is 4 days; the countdown reaches 0 on the target date.

**Which time zone is 'today'?**

UTC. Near midnight, users in other zones may see a one-day difference; pass from_date explicitly to avoid it.

## Related

- [Date Difference Calculator](https://tttkmbb.com/everyday/date-difference.md) — Full difference between two dates including business days.
- [Add or Subtract Days Calculator](https://tttkmbb.com/everyday/add-days.md) — Find the date N days from now.
