Find Date By Day of Year
Convert between day-of-year (1-366) and calendar date - both directions, weekday, ISO ordinal, days remaining. Free, offline, client-side, instant, secure.
Two-way converter between day-of-year (1-366) and calendar date.
Pick a direction. Forward: enter year + day number, get
the calendar date. Reverse: enter year + month + day, get the
day-of-year. Both directions also report weekday, ISO 8601 ordinal
format (YYYY-DDD), days remaining in the year, and the
leap/common flag.
How to Use Find Date By Day of Year
- Pick a direction. "Day of year → Calendar date" (default) is for when you know the ordinal day number and want the calendar date. "Calendar date → Day of year" is the inverse - you know the calendar date and want its position in the year.
- Type a year (1900-2100). Defaults to the current year. The leap/common classification affects both directions: day 60 is February 29 in a leap year but March 1 in a common year.
- Fill the matching field(s). Forward: just the day number (1-365, or 1-366 in a leap year). Reverse: month (1-12) and day-of-month (1-31). Invalid combos like Feb 29 in a non-leap year are rejected with a specific error.
- Click Calculate or press Enter in any field (or Ctrl/Cmd + Enter from anywhere). The result card and stats line update at once.
- Read the result card - big indigo headline shows the answer (calendar date or day-of-year), with a sub-line giving context (weekday, full date, etc.).
- Read the stats line for all the extras: weekday, day-of-year, days remaining in the year, leap/common flag, and the ISO 8601 ordinal format (
YYYY-DDD). - Copy or download. Copy report uses the Clipboard API with an
execCommandfallback. Download TXT savesday-of-year.txt.
Frequently Asked Questions
What’s the day of year?
It’s the sequential position of a calendar date in its year, counting from 1 (January 1) to 365 in a common year or 366 in a leap year. ISO 8601 calls it “ordinal date” and writes it as YYYY-DDD (e.g. 2024-256 for September 12, 2024).
Why does leap year matter?
Because the day-of-year shifts after Feb 28 in a leap year. Day 60 is Feb 29 in 2024 but March 1 in 2023. Day 256 is September 12 in 2024 but September 13 in 2023 – the same ordinal points to a different calendar date depending on the year’s length. The tool always asks for the year so the leap/common classification is unambiguous.
What’s the inverse direction useful for?
For converting calendar dates to ordinal dates – e.g. when feeding data into systems that expect day-of-year (some scientific datasets, satellite trajectories, agricultural records, batch numbering schemes). Pick “Calendar date → Day of year” and enter Y/M/D.
What happens with Feb 29 in a non-leap year?
The reverse mode rejects it with a specific error: “February 2023 does not have a day 29.” It uses the JS Date constructor to validate – if the constructor’s output doesn’t match the input year/month/day (e.g. Feb 29, 2023 becomes Mar 1, 2023), the input is flagged as invalid.
Why does the tool use noon internally?
Constructing new Date(year, 0, dayOfYear, 12, 0, 0) at noon avoids edge cases where DST shifts a midnight Date object into the previous or next day in some timezones. Noon is safely inside the target day everywhere.
Why is the year range limited to 1900-2100?
JavaScript’s Date handles a vastly wider range, but proleptic Gregorian behaviour before 1582 (when the calendar was adopted) is ahistorical. 1900-2100 covers all practical use cases. The error surfaces outside the range so you can’t get silently wrong results.
What’s an ISO 8601 ordinal date?
The format YYYY-DDD where DDD is the zero-padded day of year. So January 1, 2024 is 2024-001; December 31, 2024 is 2024-366 (leap year). It’s a compact, unambiguous date encoding used in scientific computing, aviation logs, and POSIX shell timestamps.
Is my data uploaded to a server?
No. The page is three static files (HTML, CSS, JS) and runs entirely in your browser using plain JavaScript Date arithmetic. No fetch, no XHR, no analytics, no cookies. You can disconnect from the internet after the page loads and the tool still works.