Converter

Calendar Date to Julian Date

Enter any month, day and year to get its Julian date — both the day-of-year code used in industry and the astronomical Julian Date used in science.

Today, December 5, 2026, is 2026339 (26339). All of today's formats →

Convert a calendar date

Enter a calendar date
Calendar date
Julian date (day-of-year)
Astronomical
Julian Date (JD)
Modified JD (MJD)
Julian Day Number
—

Click or tap any result to copy it.

The formula for the day-of-year Julian date

The day-of-year Julian date is the year followed by the day of year, written with three digits:

day_of_year = days before the month + day of the month
julian_date = year + day_of_year (padded to 3 digits)

For July 21, 2026: 181 days come before July in a common year, and 181 + 21 = 202, giving 2026202 or 26202.

Days before each month

Add the day of the month to the number for its month. Use the leap-year column for 2024, 2028, 2032 and so on.

MonthCommon yearLeap year
January 0 0
February 31 31
March 59 60
April 90 91
May 120 121
June 151 152
July 181 182
August 212 213
September 243 244
October 273 274
November 304 305
December 334 335

Worked examples

  • March 15, 2024 (leap year): 60 + 15 = 75 → 2024075 / 24075
  • March 15, 2026 (common year): 59 + 15 = 74 → 2026074 / 26074
  • October 31, 2026: 273 + 31 = 304 → 2026304
  • December 31, 2028 (leap year): 335 + 31 = 366 → 2028366

Writing the short forms

  • YYDDD (5 digits): drop the century, so 2026202 becomes 26202.
  • YDDD (4 digits, MRE cases): keep only the last digit of the year, 6202.
  • DDD (3 digits, egg cartons): the day alone, 202. Always keep the leading zeros: January 5 is 005.
  • CYYDDD (JD Edwards): put a century digit in front, 1 for the 2000s, so 126202. See the JD Edwards converter.

In a spreadsheet or code

Excel (date in A1), returning the 7-digit code as text:

=TEXT(A1,"yyyy")&TEXT(A1-DATE(YEAR(A1),1,0),"000")

Python, where %j is the zero-padded day of year:

from datetime import date
date(2026, 7, 21).strftime("%Y%j")  # '2026202'

More languages, including SQL, JavaScript and SAS, are in the code library. For many dates at once, use the bulk converter.

The astronomical Julian Date

For the continuous astronomical count this tool uses the standard algorithm from Jean Meeus, which also accounts for the time of day. Add a UTC time in the input to get the exact fractional Julian Date: midnight UTC ends in .5 and noon in .0. Learn more on the Julian Day reference page.

Related tools

Frequently asked questions

How do I turn today’s date into a Julian date?

Click "Use today" or enter the month, day and year. The converter shows the day-of-year code along with the astronomical Julian Date and MJD. Today’s code in every format is also on the home page.

How is the day of year calculated?

Add up the lengths of all the months before the date, then add the day of the month. January 1 is day 1. In leap years, any date from March 1 onward is one higher than in a common year because February has 29 days.

What is the Julian date of February 29?

February 29 is day 060, so it is 2024060, 2028060 and so on. It exists only in leap years. In a common year day 060 is March 1.

How do I convert a date to a Julian date in Excel?

With the date in A1, =TEXT(A1,"yyyy")&TEXT(A1-DATE(YEAR(A1),1,0),"000") returns the 7-digit YYYYDDD code as text. Replace "yyyy" with "yy" for the 5-digit YYDDD form. DATE(year,1,0) is December 31 of the previous year, so the subtraction gives the day of the year.

What is the difference between the day-of-year code and the astronomical JD?

The day-of-year code restarts at 1 every January. The astronomical Julian Date never restarts: it is a single continuous count of days from 4713 BC used in astronomy, and passed 2,461,000 in November 2025.