Day of the Year Calculator: Find the Day Number
Find which day of the year any date falls on, from 1 to 365 or 366 in a leap year. Get the exact day number and see how many days remain until year-end.
Day of the Year Calculator
Day of the year: 222
Days left in the year: 143
Progress through the year
Documentation
What is a day of the year?
The day of the year is the position of a date within its calendar year, counted from January 1. January 1 is day 1, and December 31 is day 365 in a common year or day 366 in a leap year. This number is also called the ordinal date. A day of the year calculator takes any date and returns that number, along with how many days are left before the year ends.
How to calculate the day of the year
To find the day of the year by hand, add up the days in every month before the target month, then add the day of the month.
1day of year = (days in all earlier months) + day of month
2In a leap year, add one extra day to any date that falls in March or later, because February then has 29 days instead of 28.
The table below shows how many days come before the start of each month in a common (non-leap) year.
| Month | Days before it starts |
|---|---|
| January | 0 |
| February | 31 |
| March | 59 |
| April | 90 |
| May | 120 |
| June | 151 |
| July | 181 |
| August | 212 |
| September | 243 |
| October | 273 |
| November | 304 |
| December | 334 |
Days remaining in the year are found the same way in reverse:
1days remaining = total days in the year − day of year
2A common year has 365 total days. A leap year has 366.
Worked example
Take July 15, 2023. July is the 7th month, and the table above shows 181 days come before July 1 in a non-leap year. 2023 is not a leap year, so no extra day is added.
1day of year = 181 + 15 = 196
2days remaining = 365 − 196 = 169
3July 15, 2023 is day 196 of the year, with 169 days left.
Now take February 29, 2024, a leap year. The table lists 31 days before February 1. Because the date itself falls in February, not after it, the leap-day adjustment does not apply yet.
1day of year = 31 + 29 = 60
2days remaining = 366 − 60 = 306
3February 29, 2024 is day 60 of the year, with 306 days left.
Leap years and the day of the year
A leap year has 366 days instead of 365. The extra day, February 29, keeps the calendar lined up with Earth's orbit around the sun, which takes about 365.24 days.
A year is a leap year if it can be divided evenly by 4. There is one exception: a century year (one ending in 00) is only a leap year if it can be divided evenly by 400. This is why 2000 and 2400 are leap years, but 1900, 2100, and 2200 are not.
Because of this rule, any date in March or later shifts forward by one day of the year during a leap year, compared with the same date in a common year. December 31, for instance, is day 365 in a common year and day 366 in a leap year.
Day of the year versus Julian date
The day of the year is sometimes confused with the Julian date, but they measure different things. The day of the year restarts at 1 every January 1. The Julian date, used mainly in astronomy, counts days continuously from a fixed starting point in 4713 BC and never resets. The two share the word "Julian" only by coincidence of naming history, not by calculation method.
Why the day of the year is useful
Ordinal dates appear in several fields. Farmers use them to schedule planting and harvest windows against long-term averages. Meteorologists plot temperature and rainfall by day number to compare years directly. Astronomers reference them when timing recurring events such as equinoxes. Businesses use them to track progress toward annual targets, since "day 250 of 365" conveys how much of the year has passed more directly than a calendar date does. Some file-naming and logging systems also use the ordinal date as a compact, sortable stand-in for a full date.
Frequently asked questions
How do you calculate the day of the year? Add the number of days in every month before the target month to the day of the month. In a leap year, add one more day for any date in March or later.
What day of the year is December 31? Day 365 in a common year, or day 366 in a leap year.
Is the day of the year the same as the Julian date? No. The day of the year counts from January 1 of the current year. The Julian date counts continuously from 4713 BC and is used mainly in astronomy.
Which years are leap years? A year divisible by 4 is a leap year, unless it is a century year (ending in 00), in which case it must also be divisible by 400. 2000 and 2024 are leap years; 1900 and 2100 are not.
How many days are left in the year on a given date? Subtract the day of the year from 365, or from 366 in a leap year.
Why does February 29 exist? Earth takes about 365.24 days to orbit the sun, not an even 365. Adding February 29 roughly every four years keeps the calendar year in step with the solar year.
References
- "Ordinal date." Wikipedia, Wikimedia Foundation, https://en.wikipedia.org/wiki/Ordinal_date. Accessed 9 Aug. 2026.
- "Leap year." Wikipedia, Wikimedia Foundation, https://en.wikipedia.org/wiki/Leap_year. Accessed 9 Aug. 2026.
- "Julian day." Wikipedia, Wikimedia Foundation, https://en.wikipedia.org/wiki/Julian_day. Accessed 9 Aug. 2026.