Ordinal day
Day of Year Converter
Convert a calendar date to its day-of-year number (1–366) and back.
Day of year
Pick a date, or enter a day number and year.
Filling in the day-of-year number takes priority. Clear it to convert from the calendar date instead. For a full table of every day in a year, see Day Numbers.
Every calendar date has a matching day-of-year number — a sequential count from 1 on January 1 to 365 (or 366 in a leap year) on December 31. This converter works in both directions: enter a calendar date to find its day-of-year number, or enter a day-of-year number and a year to find the matching calendar date. It is a small but frequently needed conversion in logistics, manufacturing, programming, and any system that timestamps records with an ordinal day count instead of a month-and-day pair.
What a day-of-year number is
January 1 is always day 1. January 31 is day 31. February 1 is day 32 in a common year, and every subsequent date's number depends on whether February has 28 or 29 days that year. December 31 lands on day 365 in a common year and day 366 in a leap year. This sequential numbering is sometimes called an "ordinal date" or a "Julian date" in casual usage, though the latter term is technically ambiguous since astronomers use "Julian date" to mean something different — a continuous day count since a fixed historical epoch. If you need that astronomical Julian day number, use the Julian day number converter instead.
For a strict two-digit-year-plus-three-digit-day format used in some logistics and defense systems (YYDDD), see the ordinal date converter, which formats the same underlying day-of-year number differently.
Why day-of-year numbering exists
Manufacturing date codes stamped on packaging frequently use a day-of-year number combined with the year, because it is compact and unambiguous once you know the format — a code like "2024187" reads as day 187 of 2024, which this tool decodes into a normal calendar date. Some inventory and expiration-tracking systems prefer this format because it sorts correctly as plain text without needing to parse month names or handle varying month lengths.
Programmers encounter day-of-year numbers when working with libraries that expose a "day of year" property on date objects, or when building custom date arithmetic that is easier to reason about as a single running count rather than separate month and day fields. Meteorologists and agricultural planners also use day-of-year (sometimes called "Julian day" in weather station software, again distinct from the astronomical term) to compare seasonal timing across different years without worrying about each year's specific weekday layout.
How to use this converter
To convert a calendar date into its day-of-year number, pick the date and the tool returns the number along with whether that year is a leap year and how many days remain afterward. To go the other direction, enter a day-of-year number and a year, and the tool returns the matching calendar date. If you leave the year blank, it defaults to the current year. Filling in the day-of-year field takes priority over the calendar-date field, so clear it if you want to convert from a specific calendar date instead.
The maximum valid day-of-year number depends on whether the chosen year is a leap year: 366 for leap years, 365 otherwise. Entering 366 for a common year, or any number above 365/366, returns an error rather than an out-of-range date.
Worked example
A shipping label reads "day 250" for the current year. Enter 250 in the day-of-year field with the current year selected, and the tool returns the exact calendar date — early September in a common year, one day earlier in a leap year, since the extra day inserted at the end of February shifts every subsequent day-of-year number by one. That single-day shift after February 29 is the most common source of off-by-one errors when manually computing day-of-year numbers.
Going the other direction, if you need to know what day-of-year number corresponds to a specific event date — say, the day-of-year number for your company's fiscal year-end — pick that calendar date here and read off the number, which is useful for configuring systems that require ordinal-day inputs rather than month-and-day pairs.
Leap years and the February 29 shift
Every date from March 1 onward has a different day-of-year number in a leap year compared to a common year, because the extra day inserted at February 29 pushes every later date's ordinal number up by one. A date like July 4 is day 185 in a common year but day 186 in a leap year. This is the single most common mistake when manually computing or hardcoding day-of-year numbers — the correct value silently changes every four years. This converter always checks the specific year you provide, so the leap-year adjustment is automatic and does not need to be remembered or coded separately.
Day-of-year numbers in scheduling and reporting
Fiscal calendars, academic year planners, and long-range scheduling systems sometimes reference milestones by day-of-year number rather than by calendar date, particularly when comparing the same milestone across multiple years of historical data. A retailer analyzing "day 320 sales" across the past five 2026-style fiscal years can compare like-for-like timing even though day 320 falls on a different weekday and sometimes a different specific date each year, since the count resets cleanly at January 1 regardless of weekday alignment.
Agricultural and environmental researchers frequently plot phenomena like bloom dates or migration timing against day-of-year number specifically because it normalizes for year length and lets multi-year datasets line up on a single 1-to-366 axis without special handling for leap years, beyond the standard one-day shift already described above.
Related tools
For a full table listing every date in a year alongside its day-of-year number at once, see day numbers. For the YYDDD ordinal date format used in logistics and defense systems, use the ordinal date converter. For the astronomical Julian day number, see the Julian day number converter. The full date tools hub and converters hub list every related calculator.
Frequently asked questions
What is a day-of-year number?
It's a sequential count of days from the start of a year, where January 1 is day 1 and December 31 is day 365 in a common year or day 366 in a leap year. Every calendar date maps to exactly one day-of-year number for its year.
Is day-of-year the same as a Julian date?
Casually, yes — many manufacturing and logistics systems call this a Julian date. Astronomers use "Julian date" for something different: a continuous day count since a fixed historical epoch. For that value, use the Julian day number converter instead.
Why does the same date have a different day-of-year number in different years?
Leap years insert an extra day at February 29, which shifts the day-of-year number of every date from March 1 onward up by one compared to a common year. A date like July 4 is day 185 normally but day 186 in a leap year.
What's the highest valid day-of-year number?
365 in a common year and 366 in a leap year. Entering a number above that maximum for the selected year returns an error rather than an invalid or out-of-range calendar date.
Which field takes priority if I fill in both?
The day-of-year number and year fields take priority over the calendar date field. Clear the day-of-year field if you want to convert starting from a specific calendar date instead of a day number.