User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
Category Calendars
Quick:
Select a date or enter a DOY to view details
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

About

The ordinal date system assigns each day a sequential number from 1 (January 1) to 365 or 366 in leap years. This numbering follows ISO 8601 conventions used in aviation, military operations, and scientific data logging where unambiguous date references prevent costly errors. Misinterpreting dates in logistics or scheduling systems has caused supply chain failures exceeding $100M annually across industries. The day-of-year format eliminates month-boundary confusion entirely.

This tool calculates DOY using the formula DOY = d + floor(275mΓ·9) βˆ’ K Γ— floor((m+9)Γ·12) + L, where K depends on leap year status. Leap year detection uses the Gregorian rule: divisible by 4, except century years must also divide by 400. February 29 exists only when year mod 400 = 0 or (year mod 4 = 0 ∧ year mod 100 β‰  0).

day of year ordinal date DOY calendar julian day date calculator yearly calendar

Formulas

The day of year (DOY) represents the ordinal position of a date within its year, ranging from 1 to 365 (or 366 in leap years).

DOY = floor(Date βˆ’ Jan086400000 ms)

Where Jan0 = December 31 of the previous year (day zero reference), and 86400000 ms represents one day in milliseconds.

Leap year determination follows the Gregorian calendar rule:

isLeap = (year mod 4 = 0) ∧ (year mod 100 β‰  0 ∨ year mod 400 = 0)

Reverse lookup from DOY to calendar date:

Date = new Date(year, 0, DOY)

ISO week number calculation uses the Thursday-based system where week 1 contains January 4:

W = floor(DOY βˆ’ weekday + 107)

Where weekday = 1 (Monday) to 7 (Sunday).

Reference Data

MonthDaysStart DOY (Common)End DOY (Common)Start DOY (Leap)End DOY (Leap)
January31131131
February28/2932593260
March3160906191
April309112092121
May31121151122152
June30152181153182
July31182212183213
August31213243214244
September30244273245274
October31274304275305
November30305334306335
December31335365336366
Notable DOYDate (Common Year)Date (Leap Year)Significance
1January 1January 1New Year's Day
32February 1February 1Start of February
60March 1February 29Leap day / March start
91April 1March 31Q2 start (common)
100April 10April 9Day 100 milestone
152June 1May 31Summer begins
182July 1June 30Year midpoint (common)
183July 2July 1Year midpoint (leap)
200July 19July 18Day 200 milestone
256September 13September 12Programmer's Day (28)
273September 30September 29Q3 end
300October 27October 26Day 300 milestone
335December 1November 30December start (common)
365December 31December 30Year end (common)
366 - December 31Year end (leap only)

Frequently Asked Questions

In common years (365 days), March 1 is DOY 60. In leap years (366 days), February 29 is DOY 60, pushing March 1 to DOY 61. All dates from March onward have a DOY value one higher in leap years than common years. This offset persists through December 31, which is DOY 365 in common years but DOY 366 in leap years.
Ordinal dates eliminate ambiguity from varying month lengths and international date format differences (MM/DD vs DD/MM). Flight plans, satellite tracking, and logistics systems use DOY format (YYYY-DDD) because it provides a monotonically increasing sequence without month boundaries. GPS systems internally use week numbers and day-of-week, converting to DOY for human interfaces.
Programmer's Day falls on DOY 256, which equals 2^8 (the number of distinct values in an 8-bit byte). In common years this is September 13; in leap years it shifts to September 12. The choice of 256 honors the fundamental unit of computer memory and the binary nature of computing.
DOY resets to 1 each January 1 and ranges 1-366 within a year. Julian Day Number (JDN) is a continuous count of days since January 1, 4713 BC (Julian calendar). To convert: JDN = 367Γ—year βˆ’ floor(7Γ—(year+floor((month+9)/12))/4) + floor(275Γ—month/9) + day + 1721013.5. DOY is year-relative; JDN is absolute.
Remaining days = (365 or 366) βˆ’ DOY. For a common year with DOY 200: 365 βˆ’ 200 = 165 days remaining. For a leap year: 366 βˆ’ 200 = 166 days. The tool displays this automatically when selecting any date, showing both elapsed and remaining day counts.
Yes. ISO weeks are Thursday-anchored, so if January 1 falls on Friday, Saturday, or Sunday, that day belongs to the last week of the previous ISO year. For example, January 1, 2022 (Saturday) was ISO week 52 of 2021. Conversely, late December days can belong to ISO week 1 of the following year.