Calendar position

Day of the Year Calculator

Find a date’s ordinal position from 1 to 365, or 366 in a leap year.

Calendar date

Select a date

DOY
Calendar summary

Ordinal day

The day number will appear here

Choose any valid Gregorian calendar date.

What Is the Day of the Year?

Day of the year, or DOY, is a date’s position when you number January 1 as day 1 and continue through the year. This Day of the Year Calculator finds that ordinal number for a selected date. It also shows the year, whether its length is 365 or 366 days and the number of dates remaining after the selected date.

Use the number to check a calendar record, organize observations or understand a data file that uses year plus day number. The form converts a calendar date to its ordinal position; it does not identify the weekday, decode a product code or convert an ordinal number back into a date.

How to Find a Date’s Ordinal Day

  1. Choose the Date you want to check. Include its year, since leap years can change the position of dates after February.
  2. Select Find day number. The form requires a valid calendar date rather than a typed ordinal number.
  3. Read Day of the year and the repeated Ordinal day card. January 1 is day 1, not day zero.
  4. Check the Year and Days in year cards. The year length follows the Gregorian leap-year rule.
  5. Read Days remaining as the count after the selected date through December 31. The chosen date is not added to that remaining count.

There is one date input and no separate leap-year switch. Choose today yourself if you want today’s day number; do not assume a displayed example is a live clock. The page does not show a time, time zone, progress percentage or reverse day-number lookup.

Day of Year and Days Remaining Formulas

Ordinal day N = days in completed months + day of month

Days in year Y = 366 in a leap year, otherwise 365

Days remaining R = Y − N

Add the lengths of all months before the chosen month, then add the date’s day number within its month. January has no completed months before it, so January 1 gives N=1. The final date gives N=Y and R=0.

NSIDC’s DOY calendar documents this sequential numbering. The calculator’s date library returns the ordinal position; the interface calculates year length and remaining days from the returned year and number.

The Gregorian rule makes a year leap if it is divisible by four, except a century year must also be divisible by 400. Thus 2000 is leap and 2100 is not. The US Naval Observatory verifies that rule. All results are integer counts, so no fractional-day rounding is applied.

Date, Ordinal Day and Year Length

Date
The calendar date being converted, including year, month and day. Invalid dates such as February 29 in a common year are rejected.
Day of the year / ordinal day, N
Sequential position starting at 1 on January 1, shown in the featured and repeated results.
Year
The year taken from the selected date, repeated to check the leap-year context.
Days in year, Y
365 for a Gregorian common year or 366 for a leap year, calculated by the interface.
Days remaining, R
Y−N: dates after the selected date through the end of the year. December 31 returns zero.

Day of the Year Calculation Example

Illustrative example. Select September 7, 2028. Since 2028 is a leap year, January through August contribute 31 + 29 + 31 + 30 + 31 + 30 + 31 + 31 = 244 days.

Add the seven days in September: 244 + 7 = day 251. The year has 366 days, leaving 366 − 251 = 115 days remaining after September 7.

For September 7, 2027, February has one fewer day. Its ordinal position is 250 and the year length is 365, again leaving 115 days. The same remaining count occurs because both the ordinal and year length change by one.

Calculation check. Independent calendar subtraction from January 1, plus one, agrees with the endpoint and interface results. January 1, 2028 is day 1 with 365 remaining; December 31 is day 366 with zero remaining.

Example comparison. Review the inputs and results together using the assumptions in the caption.

Hypothetical dates and remaining counts after the selected date
Selected dateOrdinal dayYear lengthDays remaining
September 7, 2027250365115
September 7, 2028251366115
December 31, 20283663660

Leap Years, Ordinal Days and Julian Dates

A day number needs its year. The extra February date changes positions from March onward. The year length also changes, which is why some matching month/day dates can have different ordinal numbers but the same days remaining.

Matching month/day positions in common and leap years
Calendar dateCommon-year DOYLeap-year DOY
January 111
February 285959
March 16061
December 31365366

Use the Gregorian century rule rather than assuming every fourth year is leap. The year 2000 is divisible by 400 and has a leap day; 2100 is divisible by 100 but not 400 and does not. The year selected in the form determines which case applies.

An ordinal date uses a year and a position within it. Astronomical Julian Date uses a different continuous-day convention. NSIDC’s DOY reference warns about that terminology. This calculator outputs an ordinary ordinal number, not a full data-code parser or astronomical date conversion.

How to Interpret Your Day Number

An ordinal day is a position within a year, not an elapsed count since January 1. On January 1, zero days have elapsed from that same date, but the ordinal position is 1. This one-day distinction matters when comparing a DOY value with a date-difference calculation.

Keep the year with the number. Day 251 falls on different calendar dates in common and leap years. Before the leap day, matching month/day dates keep the same ordinal position; dates from March onward shift by one in a leap year.

Some data formats call a day-of-year value a “Julian date.” NSIDC explicitly distinguishes that usage from astronomical Julian Date. This page returns the 1-to-365/366 ordinal position, not an astronomical continuous day count or a full coded date string.

Days remaining excludes the selected date. If you need a list including that date, it has one additional date, but this form has no inclusive switch. The result does not select business days, decode a manufacturer’s date format or determine whether a product is still usable.

Common Day of Year Mistakes

  • Starting January 1 at zero instead of one.
  • Using a common-year month table for a date after February in a leap year.
  • Assuming every century divisible by four is a Gregorian leap year.
  • Dropping the year when saving an ordinal number.
  • Confusing day of the year with weekday or calendar week number.
  • Treating the result as an astronomical Julian Date or a decoded product code.
  • Adding the selected date to Days remaining even though the card excludes it.

Day of the Year Questions

What does day of the year mean?

It is a date’s sequential position within its year. January 1 is day 1, and December 31 is day 365 in a common year or day 366 in a leap year.

How do I calculate an ordinal day number?

Add the lengths of the months before the selected month, then add the day within that month. Use the correct February length for the year.

Does Days remaining include the selected date?

No. It subtracts the ordinal day from the year length. December 31 gives zero remaining, and January 1 gives 364 or 365 depending on year length.

Why does the same date sometimes have a different day number?

Leap years add February 29. Matching month/day dates from March onward have an ordinal position one higher than in a common year.

Is a day-of-year number the same as a Julian Date?

Not in the astronomical sense. Some record formats use that wording for an ordinal day, but this page does not calculate an astronomical Julian Date.

Can I enter day 251 and find the date?

No. This form accepts a calendar date and returns its ordinal position. It does not provide a reverse lookup input.

Can this identify a weekday or calendar week number?

No. The results show ordinal day, year, year length and remaining days. A weekday or numbered calendar week is a different property.

Can it decode a food or product date code?

No. It does not know the manufacturer’s format, year encoding or product policy. An ordinal-day result alone cannot establish what a code means.

Sources and References