1. Home
  2. Calculators
  3. Day of the Year Calculator

Day of the Year Calculator

For developers, loggers and planners who work with day-of-year numbers.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Day of the Year Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table.

Features

  • Date to day number
  • Day number to date
  • ISO 8601 ordinal date (YYYY-DDD)
  • Days left and share of the year gone
  • Handles leap years

Supported formats

Input

  • A typed date, or a year and day number

You get

  • On-screen results
  • Copyable text
  • CSV table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Day of the Year Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • It counts from 1 January in the Gregorian calendar and does not give a Julian Day Number (see the Julian date converter).
  • Dates must be typed as YYYY-MM-DD.
  • Everything runs in your browser; nothing you type is sent anywhere.

Guide

Day of the year: converting dates to day numbers and back, with the ISO ordinal date

The day of the year is the position of a date in its year, counting 1 January as day 1. It is used in logs, in weather and agriculture records, in food and manufacturing batch codes and by programmers who need a single number for a date within a year. Finding it by hand means adding the lengths of the months before the date and remembering leap years. This page does it both ways.

Date to day number

Type a date, or leave the field empty to use today. The page adds up the days of the earlier months, with February counted as 29 in a leap year, and then adds the day of the month. The result is shown as the day number out of 365 or 366, with the weekday, the ISO ordinal date, the days left, the share of the year passed, the quarter, the ISO week and the number of days in that month.

Day number to date

Choose the second mode, enter a year and a number from 1 to 366, and the page returns the date. Day 366 is accepted only in a leap year, and the limit is shown in the message when you ask for it in an ordinary year. The reverse lookup uses the same day count in both directions, so a date turned into a number and back always returns the original.

The ordinal date

ISO 8601 allows a date to be written as the year, a hyphen and a three-digit day number, for example 2024-061. It is compact, sorts correctly as text and avoids month names, which is why logs and data files use it. The page prints it for every result. Some industries use a shorter form with a two-digit year and the day number, such as 24061, which you can read straight off this line.

Edge cases

The year must be from 1 to 9999. Dates are typed as YYYY-MM-DD, and impossible dates are rejected. After February the day number of a calendar date differs by one between ordinary and leap years, so a stored day number only makes sense together with its year. The share of the year gone is the day number divided by the length of the year, which is 366 days in a leap year.

A worked example

1 March 2024 is day 61 of 366, a Friday, with 305 days left, 16.667% of the year gone, in the first quarter and in ISO week 9. The ordinal date is 2024-061. The last day of 2023 is day 365 of 365 with nothing left. Day 100 of 2026 is Friday 10 April, in ISO week 15, with 265 days left and 27.397% of the year gone, in the second quarter, with 30 days in April. Day 366 of 2024 is Tuesday 31 December, and it falls in ISO week 1 of 2025.

Limits

The page numbers days in the Gregorian calendar only. It does not produce the Julian Day Number used in astronomy, which counts days from a date in 4713 BC, so use the Julian date converter for that. It also does not handle fiscal years that start in another month, where the day count would begin on a different date.

Checked against the current version of the Day of the Year Calculator on .

Frequently asked questions

Why is the day number of 1 March different in leap years?

Because 29 February is day 60 in a leap year, so 1 March moves from day 60 to day 61, and every date after it moves up by one as well. The last day of the year is 366 instead of 365.

What is a Julian date in a warehouse or military code?

In those fields a Julian date means the year plus the day of the year, such as 24061, not the astronomers’ Julian Day Number. This page gives the ordinal date in the ISO form, which you can shorten to that style by hand.

What day of the year is 1 March 2024?

Day 61, because 2024 is a leap year with 29 February as day 60. In 2023 the same date is day 60.

What is an ordinal date?

The ISO 8601 form YYYY-DDD, such as 2024-061, which names a day by its position in the year.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.