Date & Time

Day of Year Calculator

Find a date’s ordinal day number within its year.

Results are provided for general informational use. Verify important financial, health or legal figures before relying on them.

About this Day of Year Calculator

The Day of Year Calculator returns the ordinal position of a selected date within its calendar year. It is useful for schedules, datasets, logs and systems that identify dates by a day number rather than month and day.

A date's ordinal day number is used in manufacturing date codes, agricultural planning, and some scheduling systems where a single running day count is more convenient than a month-and-day format.

How the calculation works

The tool measures the selected date against January 1 of the same year using UTC-normalized dates to avoid daylight-saving shifts.

How to use it

  1. Choose a date.
  2. Select Calculate day number.
  3. Review the day of year and the number of days in that year.

Practical example

January 1 is day 1. December 31 is day 365 in a normal year and day 366 in a leap year.

December 31 is day 365 in a standard year but day 366 in a leap year, since the extra day added by February 29 earlier in the year shifts the final day's ordinal number forward by one.

Things to double-check

The day-of-year number for any date after February in a leap year will be one higher than the same calendar date in a non-leap year, since the extra February 29 shifts every subsequent day's count forward by one for the rest of that year.

Ordinal dates

The day of the year counts days from 1 January. 7 October 2026 is day 280, because October 1 is day 274, and 85 days remain in the year. In a leap year every date after 28 February is one day higher, so the same date in 2028 is day 281. The last day of the year is day 365, or 366 in a leap year. About 76.7 percent of the year has passed by day 280.

Where ordinal dates are used

The ISO 8601 standard allows dates written as year and ordinal day, such as 2026-280, which is useful in logs and data files because it sorts correctly. Manufacturers often print Julian-style codes like 26280 on packaging to show the production date. Farmers and gardeners track planting and harvest by day of year, and scientists compare observations across years. Converting between a calendar date and an ordinal day is straightforward with the tool.

Progress and planning

Day numbers make it easy to measure progress through the year. If a yearly target is 1,200 units and it is day 280, being on pace means about 920 units, found by multiplying 1,200 by 280 divided by 365. This helps you see whether you are ahead or behind. Remember to use 366 for leap years when you calculate the share of the year gone.

Do not confuse it with other Julian dates

The term Julian date is used in three ways: the day of the year in manufacturing, the astronomical Julian day number that counts days continuously from 4713 BC, and the old Julian calendar that preceded the Gregorian one. They are unrelated. This tool gives the day of the year. If you read a code on a product, check the manufacturer's explanation, since formats such as YYDDD and YYYYDDD both exist.

Seasons and day numbers

In a non-leap year the spring equinox, around 20 March, is day 79. The summer solstice, around 21 June, is day 172, the autumn equinox, around 23 September, is day 266 and the winter solstice, around 21 December, is day 355. Day numbers make it easy to see where you are in the cycle of seasons, and gardeners and astronomers use them to compare years. The exact dates move by a day because of leap years and the clock, so use them as guides.

Worked examples

The 1st of March is day 60 in a normal year and day 61 in a leap year, since February has 28 or 29 days. Christmas Day, 25 December, is day 359 in a normal year, because the first eleven months have 334 days. Day 200 is 19 July. To check a result, remember the cumulative totals at the end of each month in a normal year: 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 and 365. Adding the day of the month to the total of the previous months gives the day number.

Lot codes and manufacturing

Factories often print a production code made of the year and the day number. The code 26280 means day 280 of 2026, which is 7 October. Knowing the format lets you read the date of manufacture on packaging, tyres, medicines and food, and work out how old a product is. Expiry dates may also be set as a number of days from production, so converting between a calendar date and a day number is useful. Always check the manufacturer's explanation, since different companies use different formats.

Tracking progress through the year

The day number tells you how much of the year has passed. Day 280 of 365 means about 76.7 percent. Quarters end on days 90, 181, 273 and 365 in a normal year, one day later after February in a leap year. Divide a yearly target by 365 to get a daily amount and multiply by the day number to see where you should be today. Use it for savings goals, reading challenges, sales targets and fitness plans, and revise the pace if you are behind.

Ordinal dates in software

The ISO standard defines an ordinal date format such as 2026-280. Many programming languages provide the day of the year, for example the tm_yday field in Python and similar functions elsewhere, and spreadsheets can compute it by subtracting the first of January and adding one. Remember to handle leap years: the number of days in a year is 365 unless the year is divisible by 4, with century years needing divisibility by 400. If you store only the day number without the year, the information is ambiguous.

Key terms explained

The day of the year, or ordinal date, is the position of a date in the year from 1 to 365 or 366. A leap year has 366 days. A Julian date in the manufacturing sense is a year and day number. The astronomical Julian day is a different continuous count. The ISO ordinal format is year, a hyphen and the three-digit day number. A quarter is a quarter of the year, ending on day 90, 181, 273 and 365 in a normal year.

Rules of thumb and quick checks

The cumulative totals at the end of each month in a normal year are 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 and 365. In a leap year, every total from March onward is one higher. To find the day number, add the day of the month to the total of the earlier months. Divide the day number by 365 to see the share of the year that has passed. Use 366 in a leap year.

Frequently asked questions

Does it account for leap years?

Yes. Leap years have 366 days.

Is January 1 day zero?

No. It is day 1.

Why use day-of-year numbers?

They provide a compact ordinal date often used in technical and scheduling contexts.

What is the day-of-year number used for?

It is commonly used in manufacturing date codes, certain agricultural and scientific record-keeping, and some scheduling or file-naming systems that benefit from a single sequential day count.

Is day-of-year the same as the astronomical Julian day number?

No, the astronomical Julian day is a continuous day count starting from a fixed historical reference point thousands of years ago, while day-of-year simply restarts from 1 every January 1st.

Keep exploring

More Date & Time

View category →