Day of the Year Calculator — Find Julian Day Number
This day of the year calculator instantly finds the ordinal day number (Julian Day Number) for any calendar date — from day 1 (January 1) to day 365 or 366 (December 31). It also shows how many days remain in the year, displays a year-progress bar, detects leap years, and lets you reverse-convert any day number back to a full calendar date. Enter a date below for instant results.
Date to Day of Year
Pick any date to find its ordinal day number (Julian Day Number) within the year.
Day of the Year
87
Day 87 of 365
87
of 365 total
278
days left in year
No
365 days in year
Day Number to Date
Enter a year and an ordinal day number to find the corresponding calendar date.
Frequently Asked Questions
What day of the year is today?
The day of the year is the ordinal number of today's date within the current calendar year. January 1 is day 1, and December 31 is day 365 (or 366 in a leap year). Use the calculator above and it will automatically show today's day number.
What is the Julian Day Number?
In the context of calendar dates, the Julian Day Number (also called the ordinal date) is an integer from 1 to 365 (or 366 in leap years) that represents a date's position within the year. January 1 = 1, February 1 = 32, and so on. This should not be confused with the astronomical Julian Day Number, which counts days from January 1, 4713 BC.
How do I calculate the day of the year manually?
Sum the total days in each month before your target month, then add the day of the month. For example, March 15 in a non-leap year: January (31) + February (28) = 59, plus 15 = day 74. In a leap year, add 1 for any date in March or later.
What is the ISO 8601 ordinal date format?
ISO 8601 expresses ordinal dates as YYYY-DDD, where DDD is the three-digit day-of-year number with leading zeros. For example, April 10, 2026 is 2026-100. This format is used in computing, aviation, and logistics to simplify date calculations.
How many days are left in the year?
The remaining days in the year equal the total days in the year minus the current day number. In a non-leap year with 365 days, if today is day 100, there are 265 days remaining. In a leap year (366 days), if today is day 100, there are 266 days remaining. The calculator shows remaining days automatically.
How do I convert a day number back to a date?
Start with January 1 of the target year and add (day number − 1) days. For example, day 100 of 2026: start January 1, 2026 and add 99 days, which gives April 10, 2026. Use the 'Day Number to Date' section of this calculator for instant reverse lookups.
Does the day of year change in a leap year?
Yes. In a leap year, February 29 is inserted as day 60. Every date from March 1 onward has a day number that is one higher than the same calendar date in a common year. December 31 is day 366 in a leap year instead of day 365.
What years are leap years?
A year is a leap year if it is divisible by 4, except century years must also be divisible by 400. So 2000, 2004, 2008, … 2024 are leap years, but 1900 and 2100 are not. The next leap year after 2024 is 2028.
How the Day of Year Calculator Works
Julian Day Number
The Julian Day Number (also called the ordinal date or day-of-year number) is a simple integer that counts the position of a date within its calendar year. January 1 is day 1, January 2 is day 2, and so on through December 31, which is day 365 in a common year and day 366 in a leap year.
This notation is widely used in astronomy, aviation, military logistics, and computing because it collapses a month-and-day pair into a single number, making date arithmetic simpler. The ISO 8601 standard formalises the ordinal date as YYYY-DDD — for example, April 10, 2026 is written as 2026-100.
Note:The term "Julian Day" also refers to the Julian Day Number used in astronomy, which counts days continuously from January 1, 4713 BC. The two systems are different; this calculator uses the ordinal day-of-year meaning, not the astronomical Julian Day Number.
How to Calculate the Day of Year
There are two common approaches to calculating the day-of-year number by hand:
Method 1 — Cumulative Month Totals
Sum the number of days in all months before the target month, then add the day of the month. For a leap year, add 1 for any date after February.
- Find the cumulative day count at the start of the target month (see the table below).
- Add the day of the month.
- If the year is a leap year and the month is March or later, add 1.
Days before March = 31 (Jan) + 28 (Feb) = 59
Day of year = 59 + 15 = 74
Method 2 — Formula
For month M and day D in year Y:
This formula handles leap years automatically and is used in some calendrical algorithms.
How This Calculator Works
The calculator subtracts January 1 of the selected year from the selected date in milliseconds, divides by 86,400,000 (milliseconds per day), applies Math.ceil(), and adds 1 to make January 1 equal to day 1. The reverse lookup sets the date to January 1 and then uses Date.setDate(n) to advance by the target ordinal number.
Monthly Day Ranges Table
The table below shows the first and last ordinal day number for each month. Values in parentheses apply to leap years (an extra day is added from March onward).
| Month | Days | First Day | Last Day |
|---|---|---|---|
| January | 31 | 1 | 31 |
| February | 28 (29) | 32 | 59 (60) |
| March | 31 | 60 (61) | 90 (91) |
| April | 30 | 91 (92) | 120 (121) |
| May | 31 | 121 (122) | 151 (152) |
| June | 30 | 152 (153) | 181 (182) |
| July | 31 | 182 (183) | 212 (213) |
| August | 31 | 213 (214) | 243 (244) |
| September | 30 | 244 (245) | 273 (274) |
| October | 31 | 274 (275) | 304 (305) |
| November | 30 | 305 (306) | 334 (335) |
| December | 31 | 335 (336) | 365 (366) |
Values in parentheses apply to leap years. A leap year has 366 days; all months from March onward are shifted by one compared to a common year.
Leap Years and Day Numbering
A year is a leap year if it is divisible by 4, except for century years, which must be divisible by 400. So 2000 and 2400 are leap years, but 1900 and 2100 are not.
Impact on Day of Year
In a leap year, February 29 is inserted as day 60. Every subsequent date in the year is one ordinal number higher than the same calendar date in a common year. December 31 becomes day 366 instead of day 365.
Practical Uses
Ordinal dates simplify date arithmetic: the number of days between two dates in the same year is just the difference of their day numbers. Cross-year calculations require knowing the total days in each intervening year, which depends on whether those years are leap years.