Ordinal Date Converter

Convert between calendar dates and ISO ordinal dates (YYYY-DDD)

Free ordinal date converter. Turn any Gregorian calendar date into ISO 8601 ordinal format (year plus day-of-year, 1-366) and back again, with correct leap-year handling. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is an ISO 8601 ordinal date?

An ordinal date identifies a day by its year and its position in that year. It is written as YYYY-DDD, where DDD is the day-of-year from 001 to 365 (or 366 in a leap year). For example, 2026-060 is the 60th day of 2026.

Convert any calendar date into its ISO 8601 ordinal date — the year plus the day-of-year (001–366) — or convert an ordinal date back to a normal calendar date. Ordinal dates are common in scientific data, aviation, and mainframe systems where the day number within the year matters more than the month.

How it works

An ordinal date is written YYYY-DDD. The DDD part is the day-of-year: January 1 is day 1, and December 31 is day 365 in a common year or day 366 in a leap year.

To find the day-of-year, the tool adds up the lengths of every month before the target month, then adds the day-of-month:

dayOfYear = sum(daysInMonth[0..month-1]) + day

February counts as 29 days when the year is a leap year. The Gregorian leap-year test is:

isLeap = (year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)

To convert back, the tool walks forward month by month, subtracting each month’s length from the day-of-year until the remainder fits inside a month — that remainder is the day, and the month it stopped on is the calendar month.

Example

The 60th day of 2026:

  • 2026 is not a leap year (2026 % 4 ≠ 0).
  • January has 31 days, leaving 60 − 31 = 29.
  • February (28 days in 2026) covers up to day 59, so 29 lands on March.
  • 29 − 28 = 1 → March 1, 2026, i.e. 2026-060.

In a leap year such as 2024, the same day-of-year 60 would fall on February 29 instead, because February holds an extra day.

Where ordinal dates are actually used

ISO 8601 and data exchange. The ISO 8601 ordinal format (YYYY-DDD) is a valid date representation in the standard. Some data interchange systems and log formats prefer it because it is compact and sorts correctly as a string without needing month-specific parsing.

Aviation and scheduling. Airlines and aircraft maintenance systems use day-of-year numbers to schedule recurring inspections and calculate flight cycles. Julian day format (loosely used to mean day-of-year in aviation) appears in Airworthiness Directives and maintenance logs.

Astronomical and scientific data. Scientific datasets often record observations by day-of-year because it aligns with seasonal analysis. Day 1 is January 1, and plotting data across day-of-year instantly reveals seasonal patterns without calendar irregularities (different month lengths) distorting the x-axis spacing.

Mainframe and COBOL systems. Older enterprise systems commonly store dates as YYYYDDD (no separator) or YYDDD (two-digit year). The ordinal format was efficient when disk and memory were expensive.

Julian Day Number confusion. The term “Julian date” is often misused to mean ordinal date (day 1–366 resetting each year), but the true Julian Day Number (JDN) is a continuous count of days since January 1, 4713 BC, used in astronomy. They are completely different systems. This tool implements ordinal dates (the ISO 8601 meaning), not JDN.

Notes

The valid range for the day-of-year is 1–365 in common years and 1–366 in leap years; entering a larger number is rejected. Everything runs locally in your browser — no dates are uploaded.