The day of the year turns a calendar date into a single sequence number: January 1 is day 1, and the count runs to day 365 or day 366. Whether you are checking a birthday, filling in a form, or finding today's place in the calendar, the number follows from adding up the completed months and the current day.
To find the day of the year, add the lengths of all fully completed months, then add the day of the current month. In a non-leap year, 13 March is day 72 because January and February contribute 31 + 28 = 59 days, and 59 + 13 = 72. In a leap year February holds 29 days instead of 28, which shifts the count for every later date. The calculator applies this rule to today's date and to any date you enter.
What is the formula for the day of the year?
The month-by-month rule adds the days of each whole month that has already passed, then the numbered day of the current month:
The calculator's own date logic expresses the same count as a difference from the start of the year, where the division is rounded down and one day is added:
Every number in the table below comes from the calculator's reference material: the January and February month lengths, the numbered-day examples, and the 365- and 366-day year totals.
| Date | Year type | Completed-month total | Day number | Days left in year |
|---|---|---|---|---|
| 1 January | any | — | 1 | — |
| 13 March | non-leap | 31 + 28 = 59 | 72 | 293 |
| 16 March 1977 | non-leap | 31 + 28 = 59 | 75 | — |
| 29 February | leap | 31 + 29 = 60 | 60 | — |
| 31 December | non-leap | — | 365 | — |
| 31 December | leap | — | 366 | — |
Notice that the completed-month total is the part that changes between leap and non-leap years: February contributes 28 days in one and 29 in the other, so every date after February moves by one place.
Worked example: 16 March 1977
The reference example asks for the day number of 16 March 1977. First check the year: 1977 cannot be divided by 4 without a remainder, so it is not a leap year and February has 28 days. Then write down the day of the current month, which is 16, and the lengths of the two preceding months, 31 for January and 28 for February. Adding them gives 16 + 31 + 28 = 75, so 16 March 1977 was the 75th day of the year.
How do I use the day of the year calculator?
The calculator takes a single input: a Date, which you can pick from the calendar icon. From that date it returns the Custom number (the day of the year) and the Remaining days custom value (the number of days left in that year). It also shows the current year's figures automatically: The present date is:, Present day, Present number, Remaining days present, and Present year, alongside the Custom year of your chosen date.
FAQ
Is the day number the same as the weekday?
No. The calculator's "Present day" output is the weekday, while "Present number" is the sequential day of the year. A date therefore has two different labels that should not be confused when reading the results.
Can I look up the day number of a date in a past year?
Yes. Enter any date in the Date field and the calculator reports that date's year, day number and remaining days. The worked example above uses a date in 1977.
Why does the calculator adjust for time zones?
Its date logic applies a time-zone correction before comparing the chosen date with January 1 and December 31, so the day number and remaining-day count are based on a consistent calendar day.
Which tool counts the days between two dates?
Use the days between dates calculator for a span between two dates. If you also want the weekday on which a date falls, use the day of the week calculator.
References
- Omni's Day of the Year Calculator reference article: month-by-month counting rules, dated examples and calculator fields.
- Standard Gregorian calendar convention: January 1 as day 1, with a 365-day non-leap year and a 366-day leap year.