Day of Year to Date Calculator
Convert an ordinal day number (1-366) and a year into the calendar date it falls on, plus its weekday and days remaining in the year.
- Calendar date
- July 19, 2026 (2026-07-19)
- Day of the week
- Sunday
- Leap year?
- No
- Days remaining in year after this date
- 165
How it works
This runs the reverse of a count this site's Day of the Week calculator already reports as one of its own answers: given a year and an ordinal day number (day 1 is January 1st, counting straight through to day 365 or 366), it finds which actual calendar date that is. The date is built in UTC by adding (day of year − 1) whole days to January 1st of that year, so the local timezone of whatever device runs the calculation never shifts which calendar day comes out.
Whether day 366 is valid for a given year depends on the standard Gregorian leap-year rule: a year is a leap year if it's divisible by 4, except century years (divisible by 100), which are leap years only if also divisible by 400. Entering day 366 for a non-leap year is rejected with an explanation, rather than silently rolling over into the following year.
Alongside the calendar date, this reports which weekday it falls on and how many days remain in that year after it — useful for anything keyed to a Julian/ordinal date format (common in manufacturing date codes, some file formats, and scientific data) that needs translating back into a everyday calendar date.
FAQ
How is this different from the Day of the Week calculator?
That calculator goes forward: give it a calendar date, and it tells you the weekday and which ordinal day of the year that date is. This one runs the opposite direction — give it the ordinal day number and the year, and it tells you which calendar date that is. They're inverses of each other.
Why does the valid range depend on the year I enter?
Because a leap year has 366 days and a non-leap year has only 365 — day 366 simply doesn't exist in a non-leap year's calendar. The calculator checks your chosen year's leap-year status first and rejects an out-of-range day number for that specific year, rather than applying a fixed 1-366 range to every year regardless of whether it's actually that long.