What is the Day of the Year?
The "day of the year" — also called the ordinal date — is a number from 1 to 365 (or 366 in a leap year) that tells you how far into the year a particular date falls. January 1 is day 1, December 31 is day 365 (or 366). This counting system is widely used in astronomy, logistics, agriculture, and computing, where it is convenient to refer to a date by a single number.
How to Use This Calculator
Enter the year, choose the month, and type the day of the month. The calculator instantly returns the ordinal day number, how many days remain until the end of that year, and the total number of days in the year. It automatically accounts for leap years, so February 29 and dates after it are counted correctly.
The Formula Explained
The core idea is simple: count the number of full days from January 1 of the same year up to your chosen date, then add 1 so that January 1 itself becomes day 1.
$$\text{Day of Year} = \sum_{m=1}^{\text{Month}-1} D_m(\text{Year}) + \text{Day}$$
A year is a leap year when it is divisible by 4, except for century years which must also be divisible by 400. So 2000 and 2024 are leap years (366 days), while 1900 and 2023 are not (365 days).
Worked Example
Take March 1, 2024. January has 31 days and February in 2024 (a leap year) has 29 days, totalling 60 days before March. March 1 is therefore day \(60 + 1 = 61\). Since 2024 has 366 days, the days remaining after March 1 are \(366 - 61 = 305\).
$$\text{Days Remaining} = T - \text{Day of Year} = 366 - 61 = 305$$
FAQ
Is January 1 day 0 or day 1? It is day 1. The ordinal date convention starts counting at 1, not 0.
How are leap years handled? If the year is a leap year, February has 29 days and the year has 366 days total, which shifts every date from March 1 onward by one compared to a normal year.
What is December 31? It is day 365 in a normal year and day 366 in a leap year — the last day of the year.