Day of the year

Every date has an ordinal number: February 1 is day 32, and December 31 is day 365 (or 366 in a leap year). For example, 1 June 2026 is day 152 of 365, with 213 days left in the year, and 15 September 2026 is day 258. The calculator defaults to today and shows the day number, the days remaining in the year, and the ISO week. Day-of-year numbers (sometimes called Julian dates in aviation, agriculture, and manufacturing date codes, though that name properly belongs to an astronomy count) are how sequential day math avoids month-length headaches.

Common questions

Is the day of the year the same as a Julian date?
Colloquially, yes: packaging codes and military/aviation formats like 2026-229 use “Julian date” to mean the day-of-year ordinal. Strictly, no: the astronomical Julian Day is a continuous count of days since 4713 BC. This page computes the ordinal.
How do I get the day of year in code?
Python: date.timetuple().tm_yday. PostgreSQL: EXTRACT(DOY FROM date). Java: LocalDate.getDayOfYear(). strftime uses %j.
When does the day number reach 366?
Only in leap years, next in 2028. In a leap year every date from March 1 onward has a day number one higher than in a common year, which is the off-by-one that breaks naive day-of-year arithmetic.

Related pages