Day Of The Year Calculator - Day Number and Days Left

Use this day of the year calculator to find the numbered day of the year for any date, the days remaining until 31 December, the weekday, and whether the year is a leap year.

Updated: June 19, 2026 • Free Tool

Day Of The Year Calculator

Type the date you want to look up in YYYY-MM-DD order, or leave the field blank to see today's day-of-year, days left, weekday, and leap-year flag.

Results

Day of the year
0th day
Days remaining in the year 0days
Total days in the year 0days
Weekday 0
Leap year 0

What Is a Day Of The Year Calculator?

A day of the year calculator finds the numbered position of any date in its calendar year, the days remaining until 31 December, the total days in that year, and whether the year is a leap year. Pick a date in YYYY-MM-DD order, leave the field blank for today, and the result panel reports the day number, the days-left count, the year length, the weekday, and the leap-year flag on the same screen. It answers everyday questions like 'how many days into the year are we?', 'what numbered day was my birthday on?', and 'how many days are left until 1 January?'.

  • Checking today's day-of-year: Leave the date field blank to read today's ordinal day number, weekday, and days remaining, which is useful for streak counters, journal entries, and progress dashboards.
  • Finding the day number for a birthday or anniversary: Type any past date to find out what numbered day of the year it fell on, so you can compare birthdays, anniversaries, and milestone dates that share the same day number.
  • Counting the days left in the year: Read the days-remaining figure to plan how many weeks, sprints, or pay periods fit between today and 31 December, or to track the countdown to a New Year event.
  • Confirming a leap year and its 366-day length: The leap-year flag and total-days field let you verify whether the date's year has 365 or 366 days, which is useful for fiscal-year planning, school calendars, and project budgets.

The day-of-year number is the small but useful answer that lets you compare dates that fall in different months, and the days-remaining counter turns the same answer into a countdown to the end of the calendar year.

When you also need the gap between two dates, the Day Counter Calculator reports the day count between any start and target date on the same screen.

How the Day Of The Year Calculator Works

The day-of-year number comes from adding the lengths of every whole month that comes before the chosen month, then adding the day-of-month, after first deciding whether February has 28 or 29 days. The leap-year decision follows the Gregorian rule that a year is a leap year if it is divisible by 4, except for centurial years that are not divisible by 400.

dayOfYear = sum(daysInMonth[1..m-1]) + d, with February = 29 in leap years and 28 otherwise
  • year: Four-digit Gregorian calendar year that decides whether February has 28 or 29 days and whether the year has 365 or 366 days.
  • month: Calendar month of the chosen date, where 1 = January and 12 = December. Months outside 1-12 are rejected with a validation error.
  • day: Day of the month for the chosen date. Must be a valid day for the chosen month and year, so 29 February is only accepted in leap years and 31 April is rejected.
  • daysInMonth[m]: Length of month m in the chosen year. The default sequence is 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31; February becomes 29 in a leap year.

The days-remaining figure is the year total (365 or 366) minus the day-of-year number plus one, so 31 December itself counts as a remaining day rather than zero.

Finding the day number for 16 March 2024

Date: 2024-03-16 • Year 2024 is a leap year, so February has 29 days

January (31) + February (29) + 16 = 76

76th day of the year, with 291 days remaining, weekday Saturday.

Knowing March 16 is the 76th day of a leap year makes it easy to compare the same calendar date in a common year, where it would be the 75th day.

According to Wikipedia: Gregorian calendar, January through December contain 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, and 31 days respectively in a non-leap year

When you want to verify the leap-year flag for a year on its own, the Leap Year Calculator applies the same Gregorian rule and returns a Yes or No answer.

Key Concepts Behind a Day-Of-The-Year Lookup

Four small ideas decide what the day-of-year number actually means and how it changes between common and leap years.

Ordinal day numbering

Day-of-year numbering counts 1 January as day 1 and runs through 31 December as day 365 (or day 366 in a leap year). The same calendar date can therefore land on different day numbers depending on whether the year is a common year or a leap year.

Leap year rule

A Gregorian year is a leap year when it is divisible by 4, except for years divisible by 100 that are not also divisible by 400. 2024 and 2028 are leap years; 1900 was a common year; 2000 was a leap year.

February 29 offset

When a year is a leap year, February has 29 days instead of 28, which shifts every day number from 1 March onward up by one. March 1 is day 60 in a common year and day 61 in a leap year.

Days remaining vs days elapsed

Days remaining counts the calendar days from the chosen date up to and including 31 December. It is the complement of day-of-year inside the year, not the gap to the next 1 January.

These four ideas are the same in every Gregorian year, so the only thing that changes between runs is whether the year being queried is a common year or a leap year.

When you need to see the full month layout that contains the chosen date, the Calendar Calculator shows the matching month grid for the same year and month.

How to Use This Day Of The Year Calculator

Run a clean day-of-year lookup in four short steps. The result panel updates as you type, so you can compare dates and leap years without reloading.

  1. 1 Type the date you want to look up: Enter a date in YYYY-MM-DD order, for example 2024-03-16, in the Date field. Leave the field blank to see today's day-of-year, days remaining, weekday, and leap-year flag.
  2. 2 Read the day-of-year number and weekday: Use Day of the year for the ordinal position in the calendar year and Weekday to verify the result on a real calendar. Both update together as soon as the date changes.
  3. 3 Check the leap-year flag: Read Leap year to see whether the chosen date falls in a common year (No) or a leap year (Yes), and read Total days in the year to see the matching 365 or 366 total.
  4. 4 Use the days-remaining counter for planning: Read Days remaining in the year to plan sprints, pay periods, savings goals, or countdown displays that run until 31 December of the chosen year.

For today, leave the date field blank. The result panel reports the current day-of-year number, the weekday, the days remaining until 31 December, and whether the current year is a leap year. Type any other date in YYYY-MM-DD order to swap to that date's day-of-year and leap-year flag.

When the chosen date is a wedding, hire, or subscription anniversary, the Anniversary Calculator reports the elapsed years, months, and days from that start date.

Benefits of Using This Day Of The Year Calculator

The calculator removes the manual month-length lookup and the leap-year edge case, so the day-of-year number and the days-left counter always come from the same verified formula.

  • One field, four verified answers: Type a date once and read the day-of-year number, the days remaining, the weekday, the total days in the year, and the leap-year flag on the same screen, without adding the month lengths yourself.
  • Live today mode: Leave the date field blank to see today's day number, days remaining, weekday, and leap-year flag without typing the current date, which is handy for dashboards, journals, and streak counters.
  • Leap-year safe by default: The Gregorian leap-year rule is applied before the month-length sum is built, so the day-of-year number for 29 February 2024 is correct and 29 February 1900 is rejected with a clear validation error.
  • Built-in validation: The calculator rejects unparseable dates, dates outside the calendar month lengths, and February 29 in common years, so the day-of-year figure always matches a real Gregorian date.
  • Real-time updates: The result panel recomputes as soon as you change the date, which makes it easy to compare a date in a common year against the same date in a leap year and read the +1 shift for March through December.

Most day-of-year lookups are quick everyday questions, and the same verified formula answers every one of them, so the result panel is the only place you need to read.

When you want the same lookup specialised for a birth date, the Birthday Calculator adds age, next-birthday countdown, and weekday-of-birth on top of the day-of-year number.

Factors That Affect the Day-Of-The-Year Result

The day-of-year number depends on a small handful of calendar rules, and one of them shifts the result for an entire half of the year.

Leap year status

A leap year adds one extra day (29 February), which shifts the day-of-year number for every date from 1 March onward up by one. March 1 is day 60 in a common year and day 61 in a leap year.

Month length

The day-of-year number is the prefix sum of the month lengths, so a 31-day month adds 31 days to the prefix while a 30-day month adds 30. February's 28 or 29 days is the only variable.

Day-of-month within the month

The day-of-month is added to the month prefix, so dates earlier in a month always have a smaller day-of-year number than dates later in the same month.

Centurial year exception

Years divisible by 100 are leap years only when they are also divisible by 400. 2000 was a leap year (divisible by 400), but 1900 was a common year (divisible by 100 only).

Days-remaining complement

The days-remaining figure is the year total (365 or 366) minus the day-of-year number plus one, so 31 December itself counts as a remaining day; changing any input on the form updates both the day-of-year figure and the days-left counter at the same time.

  • The day-of-year number is a Gregorian calendar concept. It does not match the Julian day, which is a separate continuous count of days used in astronomy and software libraries.
  • The days-remaining counter stops at 31 December of the chosen date's calendar year, so it does not carry over across New Year and is not a substitute for a general countdown tool that targets a specific future date.

These factors rarely change the answer by more than a single day, but the centurial-year exception is the easiest to forget, so it is worth checking the leap-year flag before quoting the day-of-year number for a year like 1900 or 2100.

According to Wikipedia: Leap year, a Gregorian year is a leap year if it is divisible by 4, except for years divisible by 100 unless they are also divisible by 400

When you need to add or subtract a fixed number of days to land on a new date, the Date Calculator applies the same Gregorian month-length math in the opposite direction.

Day of the year calculator showing the day number, days remaining, total days in the year, weekday, and leap-year flag for a chosen date
Day of the year calculator showing the day number, days remaining, total days in the year, weekday, and leap-year flag for a chosen date

Frequently Asked Questions

Q: What is the day of the year calculator?

A: The day of the year calculator finds the numbered position of any date in its calendar year (1 for 1 January, 365 or 366 for 31 December), the days remaining until 31 December, the total days in the year, and whether the year is a leap year. Leave the date field blank to see today's day-of-year number without typing the current date.

Q: How many days are in a year, and how many days are in a leap year?

A: A common Gregorian year has 365 days, and a leap year has 366 days. The leap day is 29 February, which is added every fourth year except for centurial years that are not divisible by 400, so 1900 was a common year and 2000 was a leap year.

Q: How do you calculate the day of the year from a date?

A: Decide whether the year is a leap year using the Gregorian rule, list the length of every month before the chosen month, add those lengths together, and then add the day-of-month of the chosen date. The result is the day-of-year number; subtract it from 365 (or 366 in a leap year) and add one so 31 December itself counts as a remaining day.

Q: How many days are left in the year today?

A: Leave the date field blank to read today's day-of-year number and the matching days-remaining figure. The days-remaining counter shows the whole calendar days from today up to and including 31 December of the current year.

Q: What day of the year was my birthday?

A: Type your birth date in YYYY-MM-DD order and read the day-of-year number from the result panel. The same calendar date in a leap year will land one position later than it does in a common year because February has 29 days instead of 28.

Q: Is 2028 a leap year, and how many days will it have?

A: Yes, 2028 is a leap year because it is divisible by 4 and is not a centurial year, so it has 366 days. February 2028 therefore has 29 days, and the leap-day shift moves the day-of-year number for every date from 1 March onward up by one compared with a common year.