Day of the Year Converter (Ordinal Date)
Convert any calendar date to its day-of-year number — the ordinal date from 1 to 365 or 366 — and convert a day number back into a calendar date. The tool also shows how many days remain in the year, what fraction of the year has elapsed, and whether the year is a leap year. Everything runs live in your browser.
How to use the Day of the Year Converter (Ordinal Date)
Pick a date in the calendar date field and the day-of-year number appears, or type a year and a day number (1 to 366) to convert the other way. The two inputs stay in sync, so editing either side updates the other and refreshes the cards below.
The cards show the day of year, the number of days remaining until 31 December, the percentage of the year elapsed, and a note on whether the year is a leap year (which determines whether day 366 exists). For example, 29 May 2026 is day 149 of a 365-day year. The ordinal date is sometimes loosely called a "Julian date" in business and aviation, though that is different from the astronomical Julian Day; this tool computes the day-of-year ordinal.
It all runs in your browser, so conversions are instant, work offline, and nothing you enter is uploaded anywhere.
What the day-of-year (ordinal date) is
The day of year, also called the ordinal date, is simply the position of a date within its year: 1 January is day 1, 1 February is day 32, and 31 December is day 365 in a common year or 366 in a leap year. ISO 8601 formalises it as the YYYY-DDD ordinal date format, where the three-digit number runs from 001 to 366. It is a compact, unambiguous way to refer to a day when the month is not important, and it makes "how many days into the year" or "how many days are left" a one-step calculation rather than a sum over month lengths.
This representation shows up in more places than you might expect. Mainframe and COBOL systems historically stored dates in a packed YYDDD or YYYYDDD form — often called a "Julian date" in that world, a name that unfortunately collides with the astronomical Julian Day used in science. Aviation and logistics stamp manufacturing lot codes and flight data with the ordinal day. Agriculture and remote sensing express satellite imagery dates as day-of-year because crop models and orbital passes are naturally indexed that way. And many scientific datasets, from weather records to ecology field notes, use the ordinal date so that seasonal patterns line up cleanly year over year. Knowing that day 60 is roughly the start of March, and that the leap day pushes everything after it by one in a leap year, is a genuinely useful piece of mental arithmetic.
The only real subtlety is the leap year. A year is a leap year if it is divisible by 4, except for century years, which must be divisible by 400 — so 2000 was a leap year but 1900 and 2100 are not. In a leap year, 29 February is day 60 and every subsequent date shifts up by one compared with a common year, so 1 March is day 61 instead of 60, and the year runs to day 366. That single extra day is why converting a bare ordinal number back to a calendar date requires knowing the year, and why a converter that handles the leap-year rule correctly is more reliable than counting on your fingers. The forward and reverse conversions here are just additions and subtractions against the cumulative month lengths, adjusted for the leap day, so they are exact for any year in the Gregorian calendar.
Common use cases
- Legacy systems. Decode or build the YYDDD / YYYYDDD ordinal dates used by mainframe and COBOL data.
- Lot and batch codes. Read the day-of-year stamped on manufacturing, food, or aviation labels.
- Science and remote sensing. Convert satellite or field-data day-of-year values to real dates.
- Planning. See how far through the year a date is and how many days remain.