Calendar basics

Day of the Year and Julian Dates: How to Read YYDDD Codes

A day-of-year number counts from 1 on January 1 to 365 or 366 on December 31. Combined with the year it makes the YYDDD codes often called Julian dates, which are not the same thing as the astronomical Julian Day Number.

The day of the year is a single number for each date: 1 for January 1, 32 for February 1, and so on up to 365, or 366 in a leap year. October 22, 2026 is day 295. Put the last two digits of the year in front and you get 26295, the five-digit YYDDD code that people often call a “Julian date.”

That nickname causes confusion, because astronomers use “Julian date” for something completely different. This guide covers both, with worked conversions you can check by hand.

Day-of-year numbers in one table

The quickest way to get a day number is to add the date to the number of days that come before its month. The table below gives the day number of the first of each month.

Month Day 1 in a common year Day 1 in a leap year
January 1 1
February 32 32
March 60 61
April 91 92
May 121 122
June 152 153
July 182 183
August 213 214
September 244 245
October 274 275
November 305 306
December 335 336

The two columns match through February and then split by one, because a leap year’s February 29 is day 60. To check whether a year has that extra day, see the leap years guide.

Worked example: date to day number

Find the day number of October 22, 2026.

  1. 2026 is not divisible by 4, so it is a common year.
  2. October 1 is day 274 in a common year.
  3. October 22 is 21 days after October 1, so it is day 274 + 21 = 295.

Check it another way: January through September 2026 hold 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 = 273 days, and 273 + 22 = 295. Days left in the year: 365 − 295 = 70.

Reading YYDDD Julian date codes

A YYDDD code puts two things side by side:

  • YY: the last two digits of the year.
  • DDD: the day of the year, always three digits, padded with zeros (005 for January 5, 045 for February 14).

To decode one, split it after the second digit, then turn the day number back into a date using the table.

Worked example: decoding 27200

  1. Split: year 27, day 200. Read the year as 2027.
  2. 2027 is a common year.
  3. Find the last month start at or below 200. July 1 is day 182, and August 1 (day 213) is too high.
  4. Subtract: 200 − 182 = 18. Day 200 is 18 days after July 1.
  5. Result: July 19, 2027.

Worked example: the leap-year trap

The same day number can mean different dates in neighboring years.

  • 24060 is day 60 of 2024, a leap year: February 29, 2024.
  • 25060 is day 60 of 2025, a common year: March 1, 2025.

Any code with a day number of 60 or more needs a leap-year check before you decode it.

Shorter and longer versions

Some systems use a four-digit YDDD code with just one year digit. 6295 could then mean day 295 of 2006, 2016 or 2026, so the format only works when the item is known to be recent. Other systems use seven digits, YYYYDDD, which removes the ambiguity: 2026295 can only be October 22, 2026.

The international standard ISO 8601 calls this an ordinal date and writes it with a hyphen, as in 2026-295. Ordinal date is the more precise name. Older programming languages and spreadsheet software still use the label “Julian date,” which is one reason the term survives.

The US military also writes dates as a year plus a day number. December 11, 1999, for example, becomes 1999345 or 99345, because December 1 was day 335 of that common year and 335 + 10 = 345.

Codes on products

A five-digit or four-digit number stamped on a package may be a YYDDD or YDDD date, but each company sets its own code format, and a lot code can contain other information besides a date. If a code decodes to a plausible recent date, that is a good sign; if it decodes to day 400 or a date in the future, it is not a day-of-year code. When it matters, such as for a recall, ask the manufacturer what the code means.

The day of the year calculator converts any date to its day number and YYDDD code and turns a code back into a date, so you can check a decoding in seconds.

The astronomical Julian Day Number

Astronomers use “Julian date” for something else: a continuous count of days that ignores months and years entirely.

The count starts at noon Universal Time on January 1, 4713 BC in the proleptic Julian calendar, which is November 24, 4714 BC in the proleptic Gregorian calendar. That moment is day 0. Each Julian day begins at noon rather than midnight, a convention that suited astronomers observing at night, because a whole night’s observations then fall within one day number.

The starting point comes from the Julian Period that the scholar Joseph Scaliger proposed in 1583. He multiplied three old calendar cycles, 28 × 19 × 15, to get a cycle of 7,980 years, and all three cycles started together in 4713 BC. The astronomer John Herschel developed the idea into a count of days for astronomy in his 1849 book Outlines of Astronomy.

Some reference values:

  • October 15, 1582, the first day of the Gregorian calendar, began at JD 2,299,160.5 (midnight), so its noon is JD 2,299,161.
  • The standard astronomical epoch J2000.0 is JD 2,451,545.0, noon on January 1, 2000.
  • October 22, 2026 at noon UT is JD 2,461,336.

Worked example: Julian Day for October 22, 2026

The University of Texas formula, with fractions dropped after each multiplication or division:

  1. Year Y = 2026, month M = 10, day D = 22. (For January or February, subtract 1 from Y and add 12 to M first.)
  2. A = Y ÷ 100 = 20.
  3. B = A ÷ 4 = 5.
  4. C = 2 − A + B = 2 − 20 + 5 = −13.
  5. E = 365.25 × (Y + 4716) = 365.25 × 6,742 = 2,462,515.5, which drops to 2,462,515.
  6. F = 30.6001 × (M + 1) = 30.6001 × 11 = 336.6011, which drops to 336.
  7. JD = C + D + E + F − 1524.5 = −13 + 22 + 2,462,515 + 336 − 1,524.5 = 2,461,335.5.

The result ends in .5 because it is the Julian Day at midnight beginning October 22. Add 0.5 to get noon, JD 2,461,336.

You can check it against J2000: there are 9,791 days from January 1, 2000 to October 22, 2026, and 2,451,545 + 9,791 = 2,461,336.

The day number also gives the weekday. Add 1 to the noon Julian Day Number and divide by 7. The remainder gives the weekday, counting 0 for Sunday: 2,461,337 ÷ 7 leaves 4, which is Thursday. October 22, 2026 is indeed a Thursday, as the day of the week calculator confirms.

Modified Julian Date

Seven-digit numbers with a half day attached are awkward, so many scientific systems use the Modified Julian Date: MJD = JD − 2,400,000.5. MJD 0 is midnight at the start of November 17, 1858, and MJD days begin at midnight like ordinary days. Midnight starting October 22, 2026 is MJD 61,335.

Which “Julian” you are looking at

What you see What it is Example for October 22, 2026
295 Day of the year 295
26295 YYDDD ordinal date 26295
2026-295 ISO 8601 ordinal date 2026-295
2461336 Julian Day Number (noon UT) 2,461,336
61335 Modified Julian Date (midnight UT) 61,335

None of these is a date on the Julian calendar, the older calendar that the Gregorian reform replaced. That calendar is a third meaning of “Julian,” explained in the Gregorian calendar history. For planning, ISO week numbers are a fourth way to label dates by count, covered in the ISO week numbers guide, and every 2026 calendar page shows the plain dates that all of these numbers point to.

Frequently asked questions

What day of the year is October 22, 2026?

October 22, 2026 is day 295 of 2026. The first nine months of a common year hold 273 days, and 273 + 22 = 295. Written as a YYDDD code it is 26295, and 70 days remain in the year after it.

What does a Julian date like 26295 mean?

In the YYDDD format, the first two digits are the year and the last three are the day of the year. So 26295 means day 295 of 2026, which is October 22, 2026. The day number is always three digits, so January 5 is written 005.

Is a Julian date the same as the Julian calendar?

No. The YYDDD Julian date is just a day count within a Gregorian year. The Julian calendar is the older calendar introduced under Julius Caesar, and the astronomical Julian Day Number is a continuous day count that began in 4713 BC. Ordinal date is the precise name for the day-of-year format.

How do leap years change day-of-year numbers?

Leap years add February 29 as day 60, so every date from March 1 onward is one number higher than in a common year. March 1 is day 60 in a common year and day 61 in a leap year, and December 31 is day 365 or day 366.

What is today's Julian Day Number?

The Julian Day Number counts days from noon Universal Time on January 1, 4713 BC in the proleptic Julian calendar. October 22, 2026 has Julian Day Number 2,461,336 at noon UT. Each later day adds one, so you can find any nearby date by adding or subtracting days.

Sources

  1. Julian Dates - Bill Jefferys, University of Texas at Austin
  2. Ordinal date - Wikipedia
  3. Julian day - Wikipedia

Calculated examples were checked against the Old Calendars date engine. See our editorial policy for how we research and correct pages.