Skip to content
Calcapedia
Time & Dates

Day of the Year Calculator

Find which day of the year a date is, how many days are left, and its week number. Or turn a day number back into a date.

Level: Grades 3–4

Printable worksheet

Day of the Year Calculator

Inputs
What do you want to find?

Choose a date.

Result

Calculating…

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

What this calculator does

Find out which day of the year any date is, counting from January 1. January 1 is day 1, February 1 is day 32, and December 31 is day 365. In a leap year, December 31 is day 366. You'll see these day numbers on production and expiry codes. They also show up in shipping and factory schedules, science data logs, and planning tools that count the year as one long run of days.

The calculator works both ways. Enter a date to get its day number, the days left in the year and how much of the year has passed. You also get its ISO week number, the standard international way of numbering weeks. Or enter a year and a day number to find the date and weekday it stands for.

Where it's used

Why this math matters outside the classroom:

  • Day numbers. March 1 is day 60 in a common year and day 61 in a leap year.
  • Julian-style dates. Warehouses and food producers print a day-of-year number on packages as a compact date code.
  • Week numbers. Offices use the ISO week number to label schedules and reports for each week of the year.
  • Science logs. Field researchers record observations by day of year so records from different years line up.

How to use it

  1. Choose whether you're starting from a date or from a day number.
  2. For a date, pick it in the date field; it starts on today. For a day number, enter the year and a number from 1 to 366.
  3. Read the result. The steps show the month lengths that were added or taken away, including whether February had 28 or 29 days that year.

What the inputs mean

Year
Any year from 1 to 9999 on the Gregorian calendar, the one in everyday use.
Day number
Day 1 is January 1. Day 366 only exists in leap years. Those are years you can divide evenly by 4, except century years that don't divide evenly by 400. So 2000 was a leap year, and 1900 was not.

Formula and method

day of the year = (days in all full months before the date's month) + day of the month
days left = days in the year − day of the year
share of the year = day of the year ÷ days in the year × 100
ISO week = ⌊(day of the year of that week's Thursday − 1) ÷ 7⌋ + 1

The months before the chosen one are added at their real lengths: 31, 28 or 29, 31, 30 and so on. Only February changes from year to year. So dates in January and February have the same day number every year. From March 1 on, a leap year is one day ahead.

Going the other way, the calculator takes whole months off the day number until what's left fits inside one month. What's left is the day of that month.

In the week formula, ⌊ ⌋ means "round down to a whole number". Under ISO 8601, the international standard, weeks start on Monday. Week 1 is the week with the year's first Thursday in it. The calculator finds the Thursday of your date's week. Then it counts how many 7-day blocks into its year that Thursday falls. So a few days at the very start or end of a year can belong to week 52 or 53 of the year before, or week 1 of the next.

All the math uses calendar dates, so the answer doesn't depend on your time zone.

Worked example

What day of the year is October 18, 2026?

  1. 2026 is not a leap year, so February has 28 days.
  2. January to September: 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 = 273 days.
  3. Add the 18 days of October: 273 + 18 = 291.
  4. Days left: 365 − 291 = 74. Share of the year: 291 ÷ 365 × 100 = 79.7%.
  5. The Thursday of that Monday-to-Sunday week is October 15, day 288, so the ISO week is ⌊287 ÷ 7⌋ + 1 = 42.

Result: October 18, 2026 is a Sunday, day 291 of 365, in ISO week 42, with 74 days left in the year.

Understanding the result

Day numbers are a short way to write a date when you already know the year. A code such as 26291 on a product usually means year 2026, day 291, which is October 18.

The share of the year is measured at the end of the chosen day, so December 31 always shows 100%.

The days-left number doesn't count the chosen date itself. On December 30, there's 1 day left: December 31.

Assumptions and limitations

  • Dates are on the Gregorian calendar, even for years before it came into use.
  • Day 1 is January 1, and weeks follow ISO 8601 (starting on Monday).
  • Other ways of numbering weeks can give a different week number. Examples are weeks that start on Sunday, or a week 1 that always includes January 1.
  • It doesn't give astronomers' Julian day numbers. Those count days nonstop from 4713 BC, rather than starting again each year.

Frequently asked questions

Is the day of the year the same as a Julian date?

The term is used both ways. In manufacturing and the military, a "Julian date" often means the year plus the day of the year, such as 26291. In astronomy, the Julian day is one running count of days since 4713 BC. This calculator gives the first kind.

Why does a date after February have a different day number in a leap year?

A leap year adds February 29 as day 60. Every date from March 1 on is pushed one day later. So March 1 is day 60 in a common (non-leap) year and day 61 in a leap year.

Why can January 1 be in week 52 or 53?

Under ISO 8601, a week belongs to the year its Thursday is in. If January 1 falls on a Friday, Saturday or Sunday, its week's Thursday is in December. So those first days count as the last week of the year before.

How many days are in a year?

365 in a common year and 366 in a leap year. Over the Gregorian calendar's full 400-year cycle, the average is 365.2425 days.

How this calculator is checked

Method: Gregorian calendar month lengths and leap-year rule; ISO 8601 week numbering (week of the year's first Thursday). The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Day of the Year Calculator on your own website or blog for free. Paste this code where you want it to appear: