How to use the day of the year calculator
- Enter the year as a four-digit number.
- Select the month from the dropdown list.
- Type the day of the month.
- Read the day of year and the number of days remaining instantly.
How the day number is calculated
The day of year is the sum of all days in the preceding months plus the current day. For example, March 1 in a non-leap year is 31 (January) + 28 (February) + 1 = day 60.
In a leap year, February has 29 days, so every date from March onward shifts by one. March 1 becomes day 61 instead. The formula uses a lookup table of cumulative days: [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]. If the year is a leap year and the month is March or later, add 1 to the result.
Leap year rules explained
A common mistake is assuming every fourth year is a leap year. The full rule has three parts:
- The year must be divisible by 4.
- If it is also divisible by 100, it is not a leap year.
- Unless it is divisible by 400, in which case it is a leap year.
This means 2024 is a leap year (divisible by 4, not by 100). The year 1900 was not (divisible by 100 but not 400), while 2000 was (divisible by 400). This day of year calculator applies these rules automatically so you never have to check manually.
Common day numbers reference
Here are the ordinal dates for the first day of each month in both common and leap years.
| Month | Common year | Leap year |
|---|---|---|
| January 1 | 1 | 1 |
| February 1 | 32 | 32 |
| March 1 | 60 | 61 |
| April 1 | 91 | 92 |
| May 1 | 121 | 122 |
| June 1 | 152 | 153 |
| July 1 | 182 | 183 |
| August 1 | 213 | 214 |
| September 1 | 244 | 245 |
| October 1 | 274 | 275 |
| November 1 | 305 | 306 |
| December 1 | 335 | 336 |
Ordinal dates vs Julian day numbers
People sometimes call the day of year a "Julian date" or "Julian day", but that term has a different meaning in astronomy. A Julian Day Number counts days continuously from January 1, 4713 BC. An ordinal date simply counts from 1 to 365 (or 366) within a single calendar year.
The ISO 8601 standard represents an ordinal date as YYYY-DDD, where DDD is the three-digit day number. For instance, February 1, 2024 is written as 2024-032. This format is widely used in logistics, manufacturing batch codes and scientific datasets because it sorts chronologically without needing to parse month names.
Practical uses for the day number
Knowing the day of year is useful beyond simple curiosity. Project managers use it to calculate progress against annual milestones. In agriculture, growing degree days are tracked using ordinal dates to predict crop development stages.
Government and financial systems often store dates as year-plus-day-number to save space and avoid timezone ambiguity. If you need to work out spans between dates rather than positions within a single year, the date calculator can help. For tracking elapsed time since birth, see the age calculator.
Worked examples
Each result below was produced by the same code the tool runs, so you can check your own numbers against them.
| Example | Input | Result |
|---|---|---|
| New Year's Day 2024 | Year: 2024; Month: 1; Day: 1 | Day of year: 1; Days remaining: 365; Total days in year: 366; ISO ordinal date: 2024-001 |
| Leap Day 2024 | Year: 2024; Month: 2; Day: 29 | Day of year: 60; Days remaining: 306; Total days in year: 366; ISO ordinal date: 2024-060 |
| Last day of 2023 | Year: 2023; Month: 12; Day: 31 | Day of year: 365; Days remaining: 0; Total days in year: 365; ISO ordinal date: 2023-365 |
| US Independence Day | Year: 2024; Month: 7; Day: 4 | Day of year: 186; Days remaining: 180; Total days in year: 366; ISO ordinal date: 2024-186 |
FAQ
What day of the year is March 1?
In a common year, March 1 is day 60. In a leap year, it is day 61 because February has 29 days.
How many days are left after today?
Subtract the current day number from the total days in the year (365 or 366). Enter your date above and the calculator shows the remaining days automatically.
Is 2024 a leap year?
Yes. 2024 is divisible by 4 and not by 100, so it has 366 days. February 29, 2024 is day 60.
Why does this calculator reject February 29 on some years?
February 29 only exists in leap years. Years like 1900 or 2023 are not leap years, so entering February 29 for those years returns an error.
What is the ISO 8601 ordinal date format?
It combines the four-digit year and the three-digit day number, such as 2024-186 for July 4, 2024.
Does this tool upload my data?
No. All calculations happen locally in your browser. Nothing is sent to any server.