Day of Year Calculator

Enter a date as YYYY-MM-DD to find its day-of-year number.

How it is calculated

Type a date as YYYY-MM-DD. The tool adds up the days in all earlier months of that year and then adds the day of the month: day of year = (days in months before) + day. Whether February has 28 or 29 days depends on the leap-year test, divisible by 4, except centuries unless divisible by 400, so 2000 and 2024 are leap years while 1900 and 2023 are not. The year has 365 or 366 days, and days remaining = total days in the year − day of year, so 31 December always shows 0 days remaining. A month or day with one digit, such as 2024-2-5, is accepted. A date that does not exist (2023-02-29, month 13) or any other layout, like 03/01/2024, returns no result. The tool applies the Gregorian calendar to every year.

Worked example

Take 1 March 2024, entered as 2024-03-01. 2024 is divisible by 4 and not a century year, so it is a leap year with 366 days. Days before March: January 31 + February 29 = 60. Add the day of the month, 1, to get day 61. Days remaining: 366 − 61 = 305 days. The tool shows 61, 305 days, and leap year: Yes. For comparison, 1 March 2023 is day 60, because February 2023 has only 28 days, and it also has 305 days remaining, since 2023 has 365 days.

Try this example →

Common mistakes

  • Entering the date as DD/MM/YYYY or MM/DD/YYYY. Only the year-month-day order with hyphens is read; other layouts return nothing.
  • Forgetting the leap day. After 28 February, the same calendar date is one day number higher in a leap year, so 1 March is day 61 in 2024 but day 60 in 2023.
  • Treating every year divisible by 100 as a leap year, or every year divisible by 4. 1900 is not a leap year; 2000 is, because it is divisible by 400.
  • Expecting the day-of-year to count the date itself as zero. January 1 is day 1, so the remaining days on 31 December are 0, not 1.
  • Confusing this ordinal number with the astronomical Julian Date or a week number; they count different things.

About this calculator

The day-of-year (also called ordinal date or Julian day-of-year, not to be confused with the astronomical Julian Date) numbers every calendar date from 1 on January 1st up to 365 on December 31st in a common year, or 366 in a leap year — one determined by the standard Gregorian rule (divisible by 4, except century years unless divisible by 400).

This ordinal form is formalized in ISO 8601 as the YYYY-DDD date format, and it is widely used in programming, manufacturing date codes, agriculture and climate data, and payroll or scheduling systems where counting elapsed days within a year is more convenient than working with month and day separately.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The days remaining figure counts the days after the chosen date, not including it. For 21 June 2026 the tool gives day 172 and 193 days remaining, so if today also counts, you have 194 calendar days left in the year. Add one whenever you plan inclusively. Do you use the day number for date codes such as YYDDD on labels, or for scheduling?

Popular calculators

All Calculators