Day of the year

Which day of the year a date is

—

How this was counted
Day of year— Days remaining— Date— Week number— Year length—

Date arithmetic is tested on every build against hand-worked cases, including month ends, leap days and two-digit years. How it is checked

Enter a date to get its day number in the year, from day 1 to 365, or 366 in a leap year. Or enter a day number and a year to get the date back. This ordinal date is used in aviation, logistics, manufacturing lot codes and lab notebooks.

Where the leap day shows up

An ordinal date is a plain count: 1 January is day 1, 31 December is day 365, or 366 in a leap year. The leap day changes the count only from 1 March onward, where each date in a leap year is one higher than the same date in a common year. Dates in January and February are unaffected, which is why an off-by-one in leap handling can look correct for two months and then break.

The count assumes the calendar it is counting in. That matters for dates before 1923, when some countries were still on the Julian calendar. The day of the week page gives both labels, and the weekday, which never varied anywhere.

Both directions

Manufacturing lot codes, aviation records and a good deal of scientific data are stamped with a year and a day number in place of a date, and reading them back requires knowing whether that year was a leap year. Day 60 of 2024 is 29 February; day 60 of 2026 is 1 March. Enter a number and a year above and the date comes back; enter a date and the number does.

Ordinal dates and Julian dates

In aviation and manufacturing the ordinal day number is often called the Julian day. The astronomers’ Julian day is a different number: a running count of days from 4713 BC, now seven digits long. If a form asks for a Julian date and expects three digits, it wants the ordinal day number on this page. If it expects seven, it wants the astronomical one.

Questions

What day of the year is it today?
The box above opens on today's date and the answer is the first figure in the strip. The count runs from 1 on 1 January to 365 on 31 December, or 366 in a leap year. The days-remaining figure beside it counts forward to the end of the year and does not include the current day, so on 31 December it reads zero.
Why is 1 March day 60 in some years and 61 in others?
Because 29 February sits in front of it. In a common year January and February use up 59 days, so 1 March is day 60. In a leap year they use 60, so 1 March is day 61 and every date after it shifts by one.
Is this the same as a Julian date?
It depends who is asking. In aviation, manufacturing and food packaging, “Julian date” normally means exactly this: the day number within the year, usually as three digits, often with a year digit in front. Astronomers use the term for a continuous count of days since 4713 BC, currently over 2,460,000, which lets any two instants be subtracted without reference to a calendar. A three-digit field wants the number on this page.
How do I read a lot code like 6236?
That format is usually one year digit followed by three day digits, so 6236 is day 236 of a year ending in 6. Enter 236 and the year in the boxes above to get the date. Be careful with the year digit: it only narrows the year to one in ten, so 6236 could be 2016 or 2026, and the date it maps to differs because leap years fall differently. If the product has a shelf life shorter than a decade the ambiguity usually resolves itself.
Does the day number restart at the same date every year?
Only for dates before 1 March. From 1 March onward a given date is one day number in a common year and one higher in a leap year, so you need the year to turn a day number into a date. That is why the reverse lookup above needs the year box filled in.