ToolNimba

๐Ÿ“† Day of Year Calculator: Ordinal Date and Days Left

Shihab Mia By Shihab Mia ยท Updated 2026-07-07

Day of year
-
Days remaining
-
Year elapsed
-
Weekday
-
Days in this year
-

Pick a date to see its day-of-year number, how many days are left in the year, and the percentage of the year that has elapsed.

The day of year is the ordinal position of a date inside its year: January 1 is day 1 and December 31 is day 365, or day 366 in a leap year. This day of year calculator returns that number for any date you enter, or for today with one click, and also shows how many days remain in the year, the percentage of the year elapsed, the weekday, and the ISO 8601 ordinal date (for example 2026-188 for July 7, 2026). Leap years are detected automatically, so the count is always correct for the exact year you choose.

What is the Day of Year Calculator?

The day of the year, also called the ordinal date or day number, is simply the count of days from the start of a year up to and including a given date. January 1 is day 1, February 1 is day 32, and December 31 is day 365 in a common year or day 366 in a leap year. Because it names a date with a single number instead of a month and day, it is used heavily in astronomy, agriculture, aviation, logistics, and computer systems, where storing a year plus a day number is more compact and easier to sort or subtract than a full calendar date.

Leap years are the one complication. A year is a leap year if it is divisible by 4, except for century years, which must also be divisible by 400. So 2024 and 2000 are leap years, but 1900 and 2100 are not. In a leap year February has 29 days, which pushes every date from March 1 onward up by one compared with a common year: March 1 is day 60 in a common year but day 61 in a leap year, and the whole year runs to 366 days instead of 365. This calculator applies the leap rule to the specific year you enter, so the day number, the days remaining, and the percentage are all measured against the right total.

The days remaining figure is the number of days left until the end of that year, computed as total days in the year minus the current day number. The percent elapsed is the day number divided by the total days in the year, times 100. Because the count is inclusive (the chosen day itself is already counted), January 1 sits at about 0.27 percent rather than 0, and December 31 lands at exactly 100 percent. Together these three figures give a quick sense of where any date falls within its year, which is handy for progress tracking, reporting periods, and year-end countdowns.

The ordinal date has a formal written form in the ISO 8601 standard: YYYY-DDD, where DDD is the day number padded to three digits with leading zeros. April 10, 2026 is written 2026-100, and January 5 is 2026-005. This is the format the calculator shows on the ISO line, and it is the one most data systems and interchange formats expect when they store a date as a year plus day number. You can read more about the standard at https://www.iso.org/iso-8601-date-and-time-format.html.

One widely used variant causes real confusion: the five-digit YYDDD code, often called a Julian date in manufacturing, food packaging, and mainframe systems. On that scheme, 26188 means day 188 of the year ending in 26, which is July 7, 2026. This is not the same as the astronomical Julian Date (JD) used in astronomy, which is a continuous count of days since noon on January 1, 4713 BC and never resets each January. When a spec sheet, a food expiry code, or an old COBOL record mentions a Julian date, it almost always means the ordinal YYDDD form, not the astronomical count. This tool gives you the plain ordinal day number, which is the core value behind both the ISO YYYY-DDD and the packaging YYDDD formats.

Because every date maps to a single day number, ordinal dates make some calculations trivial. To find how many days separate two dates in the same year, you subtract their day numbers: day 200 minus day 150 is 50 days apart. To convert a day number back to a calendar date, you count forward from January 1, subtracting month lengths until the remaining count fits inside a month. Those reverse and difference operations are exactly why scientists, satellite operators, and software engineers reach for ordinal dates instead of month-and-day notation.

When to use it

  • Answering "what day number is it?" for today or for any past or future date.
  • Converting a calendar date into an ISO 8601 ordinal date (YYYY-DDD) for logs, data files, or scientific records.
  • Decoding or building a five-digit YYDDD code found on food packaging, lot numbers, or legacy mainframe records.
  • Tracking progress through the year by reading the percent elapsed for goals, OKRs, or reporting periods.
  • Working out how many days remain in the year for planning, countdowns, and year-end deadlines.
  • Finding the gap between two dates in the same year by subtracting their day numbers.

How to use the Day of Year Calculator

  1. Enter a date, or click Today to load the current date.
  2. Read the day-of-year number (1 to 365, or 1 to 366 in a leap year).
  3. Check the days remaining and the percentage of the year elapsed.
  4. Note the weekday, the ISO 8601 ordinal date, and whether the year is a leap year or a common year.

Formula & method

day of year = (date minus January 1 of the same year, in days) + 1. days remaining = total days in year - day of year. percent elapsed = day of year / total days in year x 100. Total days = 366 in a leap year, otherwise 365. ISO 8601 ordinal date = YYYY-DDD, with the day number padded to three digits.
Day of Year: counting through the yearJan 1 = day 1Dec 31 = day 365 or 366Jul 7 = day 188 (2026-188)elapsed: 188 days (51.5%)remaining: 177 daysday of year + days remaining = total days in year (365 or 366)

Worked examples

Find the day of year for July 7, 2026 (a common year).

  1. 2026 is not divisible by 4, so it is a common year with 365 days.
  2. Add the lengths of the months before July: 31 + 28 + 31 + 30 + 31 + 30 = 181 days (Jan to Jun).
  3. Add the day in July: 181 + 7 = 188.
  4. Days remaining = 365 - 188 = 177.
  5. Percent elapsed = 188 / 365 x 100 = 51.51%.
  6. ISO 8601 ordinal date = 2026-188. The YYDDD packaging code is 26188.

Result: Day 188 of 365, 177 days remaining, 51.51% of the year elapsed, written 2026-188.

Find the day of year for March 1, 2024 (a leap year).

  1. 2024 is divisible by 4 and is not a century year, so it is a leap year with 366 days.
  2. Add the lengths of the months before March: 31 (Jan) + 29 (Feb) = 60 days.
  3. Add the day in March: 60 + 1 = 61.
  4. Days remaining = 366 - 61 = 305.
  5. Percent elapsed = 61 / 366 x 100 = 16.67%.
  6. ISO 8601 ordinal date = 2024-061.

Result: Day 61 of 366, 305 days remaining, 16.67% of the year elapsed, written 2024-061.

Convert the day number 100 back to a calendar date in 2026.

  1. 2026 is a common year, so January has 31 days: 100 - 31 = 69 remaining.
  2. February has 28 days: 69 - 28 = 41 remaining.
  3. March has 31 days: 41 - 31 = 10 remaining, so the date falls in April.
  4. The remaining 10 lands on April 10.

Result: Day 100 of 2026 is April 10, 2026, written 2026-100.

Day of year for the first of each month (common year vs leap year)

DateCommon yearLeap year
January 111
February 13232
March 16061
April 19192
May 1121122
June 1152153
July 1182183
August 1213214
September 1244245
October 1274275
November 1305306
December 1335336
December 31365366

Ordinal date formats compared

FormatExample (July 7, 2026)Where it is used
Plain day number188Everyday counting, this tool
ISO 8601 ordinal (YYYY-DDD)2026-188Data interchange, logs, standards
Packaging Julian (YYDDD)26188Food codes, lot numbers, mainframes
Astronomical Julian Date (JD)2461228.5Astronomy, satellite timing

Common mistakes to avoid

  • Forgetting that leap years shift everything after February. From March 1 onward, the day number in a leap year is one higher than in a common year, because February has 29 days. Using a fixed table for every year gives the wrong answer for leap years. This tool checks the actual year you enter.
  • Treating every century year as a leap year. A common shortcut is "divisible by 4 means leap year", but century years are the exception: they must also be divisible by 400. So 2000 is a leap year while 1900 and 2100 are not.
  • Counting January 1 as day 0. The ordinal date is one-based, so January 1 is day 1, not day 0. The days remaining and percentage here use this inclusive count, which is why the chosen day is treated as already elapsed.
  • Confusing the ordinal date with the astronomical Julian Date. A YYDDD code like 26188 is an ordinal day number for the year, but the astronomical Julian Date is a continuous count of days since 4713 BC that never resets. They are different systems that unfortunately share the word "Julian".
  • Dropping the leading zeros in ISO ordinal dates. ISO 8601 pads the day number to three digits, so January 5 is 2026-005, not 2026-5. Systems that parse ordinal dates may reject the value if the zeros are missing.
  • Confusing day of year with day of week or week number. The day of year is a number from 1 to 366. It is not the weekday (Monday to Sunday) nor the ISO week number (1 to 53). Use the matching calculator if you need those instead.

Glossary

Day of year
The position of a date counted from January 1, where January 1 is day 1 and December 31 is day 365 or 366.
Ordinal date
A date expressed as a year plus a day-of-year number, for example 2026-188 for July 7, 2026.
ISO 8601 ordinal date
The standard written form YYYY-DDD, with the day number padded to three digits, such as 2026-005 for January 5, 2026.
Julian date (YYDDD)
A five-digit code combining a two-digit year and a three-digit day number, common on food packaging and legacy systems, such as 26188.
Astronomical Julian Date
A continuous count of days since noon on January 1, 4713 BC, used in astronomy and satellite timing. It is not reset each year.
Leap year
A year with 366 days and a February 29. A year is a leap year if divisible by 4, except century years, which must be divisible by 400.
Common year
An ordinary 365-day year, with no February 29.
Days remaining
The number of days left in the year after the chosen date, equal to the total days in the year minus the day-of-year number.

Frequently asked questions

What is the day of the year?

The day of the year, or ordinal date, is the position of a date counted from the start of its year. January 1 is day 1, and December 31 is day 365 in a common year or day 366 in a leap year. It lets you refer to a date using a single number.

What day number is it today?

Click the Today button and the calculator fills in the current date and shows its day-of-year number instantly, along with the days remaining, the percentage of the year elapsed, and the ISO 8601 ordinal date. For example, July 7, 2026 is day 188.

How do I write a day of year in ISO 8601 format?

ISO 8601 uses YYYY-DDD, with the day number padded to three digits. April 10, 2026 is 2026-100 and January 5, 2026 is 2026-005. The calculator shows this ISO ordinal date for any date you enter.

Is the day of year the same as a Julian date?

Usually the packaging or mainframe "Julian date" (YYDDD, such as 26188) is just the ordinal day number with a two-digit year, so it matches the day of year. The astronomical Julian Date is different: it is a continuous day count since 4713 BC that never resets each year.

How many days are in a leap year?

A leap year has 366 days because February has 29 days instead of 28. A common (non-leap) year has 365 days. The calculator detects which type the year is and counts against the correct total.

How do I know if a year is a leap year?

A year is a leap year if it is divisible by 4, with one exception: century years (those ending in 00) must also be divisible by 400. So 2024 and 2000 are leap years, but 1900 and 2100 are not.

How is the percentage of the year calculated?

It is the day-of-year number divided by the total number of days in that year, multiplied by 100. The count is inclusive, so the chosen day is already counted as elapsed. December 31 lands at exactly 100 percent.

How do I convert a day number back to a calendar date?

Start from January 1 and subtract each month length in turn until the remaining count fits inside a month. For 2026, day 100 leaves 10 after subtracting January (31) and February (28) and March (31), so it is April 10, 2026.

How do I find the number of days between two dates in the same year?

Subtract their day numbers. If one date is day 200 and the other is day 150, they are 50 days apart. This works only within a single year; for dates in different years, use a date difference calculator.

Why does March 1 have a different day number in a leap year?

Because February has 29 days in a leap year instead of 28, every date from March 1 onward shifts up by one. March 1 is day 60 in a common year but day 61 in a leap year.