ordinal · 1-366 · julian day of year · live

Find the day of year for any date

The ordinal day (1-366) of any date, plus days remaining and an at-a-glance progress bar. Leap-year aware so Feb 29 always counts.

Quick Start

How day-of-year works

Day-of-year (a.k.a. ordinal date or "Julian day of year") counts from 1 on Jan 1. The total is 365 in common years and 366 in leap years.

  1. 01

    Pick a date

    Any calendar date — picker is local to your timezone.

    Parsing accepts ISO 8601, RFC 3339, RFC 2822, and Unix epoch seconds/milliseconds. The Date constructor handles the rest with browser-engine consistency.

    inputISO 8601RFC 3339epochlive
    date · timestampyyyy-mm-dd · ISO
    2026-05-21
    loaded · ISO 8601zone · ready
  2. 02

    Count from Jan 1

    Days are inclusive: Jan 1 is day 1, not day 0.

    All math runs in UTC internally to avoid DST landmines; presentation converts back to the user’s zone via Intl.DateTimeFormat.

    countUTC mathIntlDST-safelive
    math · optionsdelta · live
    d - Jan1 + 1
    options applied · UTCDST-safe
  3. 03

    Leap-year aware

    Years divisible by 4 (except centuries not divisible by 400) have 366 days.

    Output respects the chosen timezone offset (Z vs +05:30) and pads digits per ISO conventions so sorts stay chronological.

    leapoffsetzone-awaresortablepadded
    366 · computedleap · ready
    Feb 29 → ok
    computed · instantsortable
  4. 04

    Progress + ordinal

    The ISO ordinal form is YYYY-DDD with zero-padded DDD.

    Copy writes via the Async Clipboard API; nothing pings a time server — the browser’s clock is the only oracle.

    fmtclipboardno oracledeterministicclient-side
    ord · copiedyyyy-ddd · done
    2026-141
    ready · ready to shipsuccess
Pro tips

Time math without DST landmines

Always store UTC

Convert to local for display only. UTC storage avoids DST jumps and timezone drift in databases.

Watch leap seconds

POSIX time doesn’t count leap seconds; some systems do. Don’t use timestamps for sub-second precision across boundaries.

Prefer Temporal eventually

The Date API has many quirks. Temporal is shipping in modern engines and handles zones correctly.

Cron is timezone-tricky

Cron expressions run in the daemon’s local zone unless told otherwise. Pin a TZ explicitly for predictable runs.

ISO 8601 sorts naturally

YYYY-MM-DDTHH:mm:ss sorts correctly as a string. Don’t use US-style MM/DD/YYYY for anything machine-readable.

Beware Y2K38

Signed 32-bit Unix timestamps overflow in 2038. Use 64-bit storage end-to-end for long-lived systems.

Use Cases

When to know day-of-year

Aviation, payroll, project planning.

Aviation

Flight plans use day-of-year extensively. Math runs in UTC under the hood to dodge DST jumps — local time is only for display. That means scheduling logic and date diffs survive March / November fall-back without the classic off-by-one-hour bug.

DST-safe

Astronomy

Solar and seasonal calculations reference DDD. Browser clock is the only source — no external time server, no privacy leak, no rate limit. Pair with NTP-synced server time for high-accuracy use cases, but for human-scale work the browser clock is plenty.

UTC-correct

Payroll

Day-of-year supports accrual proration. ISO 8601 output sorts naturally as strings, perfect for filenames (report-2026-01-15.pdf) and log lines that need chronological ordering without parsing. Drop into S3 keys for free time-bucketing.

ISO-sortable

Date formatting

%j in strftime / %DDD in ISO ordinal. Pairs cleanly with cron, scheduled tasks, and timestamped log analysis. The tool's output drops directly into APScheduler, Linux cron, or GitHub Actions schedule expressions without re-formatting.

spec-grade

Project tracking

Year-to-date progress bars in dashboards. Output respects the chosen timezone offset (Z vs +05:30) so REST APIs and database TIMESTAMP WITH TIME ZONE columns round-trip cleanly. No ambiguity between "noon UTC" and "noon local".

zone-aware

GeoJSON / GIS

Some scientific feeds index by ordinal date. Confirms the difference between epoch seconds (10 digits) and milliseconds (13 digits) before you commit code that mis-multiplies by 1000 — a classic bug in cross-language time handling.

epoch-accurate
FAQ

Frequently asked questions

No — that's a separate astronomical count from 4713 BC. This is the calendar-year ordinal.
Day 1 — Jan 1 is the first ordinal. Some systems use 0; here we use the ISO and aviation convention.
Years divisible by 4 (except centuries not divisible by 400) have 366 days. Feb 29 is day 60.
Date picker uses local midnight — fine for whole-day ordinals. UTC matters only if you cross midnight.
No — the calculation runs locally in your browser tab.
Suggest a tool

Something missing?

Tell us what you need. We ship the top requests every two weeks.

Sent straight to the maintainers · no account needed
47 in queue·8 shipped this month
Request queued. Thanks!