Day of the Year Calculator
Enter any year, month and day to see its ordinal position within that year, where January 1 is day 1 and December 31 is day 365 or 366. The calculator also shows how many days remain until the year ends and labels the year as leap or common. It uses the Gregorian leap year rules, so it knows February 29 exists only in the right years.
How to find the day of the year
- Type the four-digit year into the Year box (it defaults to the current year).
- Enter the month as a number from 1 to 12 in the Month box.
- Enter the day of the month in the Day box.
- Read the Day of year card, counting from January 1 as day 1.
- Check the Days remaining card and the leap or common year label beneath it.
- Click Copy to grab the one-line summary such as Day 60 of 366, 306 remaining.
Examples
Leap day in a leap year
2024-02-29
Day 60 of 366, 306 remaining
Last day of a common year
2023-12-31
Day 365 of 365, 0 remaining
US Independence Day in 2025
2025-07-04
Day 185 of 365, 180 remaining
Frequently asked questions
What does the day of the year mean?
It is the ordinal position of a date counting from January 1 as day 1. In a common year December 31 is day 365, and in a leap year it is day 366. This number is sometimes called the ordinal date or the Julian day within the year.
How are leap years decided?
The tool follows the Gregorian rule: a year is a leap year when it is divisible by 4, except centuries, which must also be divisible by 400. So 2024 and 2000 are leap years, while 1900 and 2100 are not, and February then holds 29 days instead of 28.
What day number is February 29?
In a leap year such as 2024, February 29 is day 60. If you enter February 29 in a common year the tool shows an error, because that date does not exist and cannot have a day number.
How is days remaining calculated?
It is the total days in the year minus the day number. On December 31 the result is 0 because no days follow it, and on January 1 it is 364 in a common year or 365 in a leap year.
What happens if I enter an impossible date?
The calculator validates the day against the real length of the month. Entering April 31 or February 30 shows a message like day must be an integer from 1 to 30, so you cannot get a misleading number from a date that never occurred.
Can I use it for very old or future years?
Yes. It applies the same proleptic Gregorian rules to any whole year, including years before the calendar was adopted and years far in the future. Keep in mind that historical calendars in use at the time may have numbered days differently.
Does it work with negative years or year zero?
You can enter any integer year, including 0 and negative values, and the leap year math still applies. This matches the proleptic Gregorian calendar used by many programming libraries rather than the BCE and CE convention that skips year zero.
Is my date kept private?
Yes. Every calculation runs in your browser with plain arithmetic, and nothing about the date you enter is uploaded or logged anywhere.
Can I get the result programmatically?
Yes. This tool has a JSON API that returns the day of year, days remaining, total days and the leap year flag for a year, month and day, so you can wire the same numbers into a script or spreadsheet.
Learn more
- Ordinal dates and the day of the year
How the day-of-year number works, where the ISO 8601 ordinal date format fits in, and why leap years shift every date after February.
Related tools
Week Number Calculator
Find the ISO 8601 week number for any date, plus the day of the year, weekday, calendar quarter and how many days are left in the year.
Date Difference Calculator
Find the number of days, weeks, business days and years, months and days between two dates. Enter a start and end date to see the full breakdown.
Add Business Days Calculator
Add or subtract working days from a date, skipping weekends and any holidays you list. See the result date and its day of the week instantly.
Add Days Calculator
Add or subtract calendar days from any date and see the result with its day of the week. Free, instant and works for past or future dates.
Add Time Calculator
Add or subtract hours and minutes from a time of day. See the new clock time and whether it crosses into another day. Free and private.
Add to Date
Add or subtract days, weeks, months and years from any date and get the new date. Handles month-end and leap days correctly. Free and instant.