Astronomical Algorithms All-sky disk · zenith at centre · animate time with Play

Julian Day

Continuous day count from noon UT on 1 January 4713 BC — the astronomer's calendar.

The Julian Day number or more simply the Julian Day is a continuous count of days and fractions thereof from the beginning of year −4712.

By tradition the Julian day begins at Greenwich mean noon — that is, at 12h Universal Time.

If the Julian Day corresponds to an instant measured in the uniform scale of Dynamic Time, the expression Julian Ephemeris Day (JDE) is often used. For example:
1977 April 26.4 UT = JD 2443259.9
1977 April 26.4 TD = JDE 2443259.9

The Gregorian calendar was not at once officially adopted by all countries. This should be kept in mind when making historical research. In Great Britain, for instance, the change was made as late as in 1752, and in Turkey not before 1927. The Julian calendar was established in the Roman Empire by Julius Caesar in the year −45 and reached its final form about the year +8. Nevertheless, we shall follow the astronomers' practice consisting of extrapolating the Julian calendar indefinitely to the past.

There is a disagreement between astronomers and historians about how to count the years preceding the year 1. Astronomers count the year before +1 as year zero; the year historians call 585 B.C. is actually −584. (Do not write "−584 B.C." — the "B.C." is incorrect with negative years.)

Calculation formula

Valid for positive and negative years, but not for negative JD.

Let Y = year, M = month (1–12), D = day (with decimals).

If M ≤ 2, replace Y by Y − 1 and M by M + 12.

Gregorian calendar:
A = INT(Y/100), B = 2 − A + INT(A/4)
(Julian calendar: B = 0)

JD = INT(365.25(Y + 4716)) + INT(30.6001(M + 1)) + D + B − 1524.5

Interactive calculator

Select date and time (UTC) to compute the Julian Day:

UTC
Julian Day JD =

JavaScript example

function toJulianDay(year, month, day) {
      if (month <= 2) { year -= 1; month += 12; }
      const A = Math.floor(year / 100);
      const B = 2 - A + Math.floor(A / 4);
      return Math.floor(365.25 * (year + 4716))
           + Math.floor(30.6001 * (month + 1)) + day + B - 1524.5;
    }
    // Example: 1977-04-26.4 UT → ~2443259.9