Julian Day and Modified Julian Day Calculator

Julian Day and Modified Julian Day Calculator

Growing AI Skill PRO

Enter Calculation

Formula

JD=⌊365.25(y+4716)⌋+⌊30.6001(m+1)⌋+Day+B−1524.5where{Y=Year(AD),1−Year(BC)(y,m)=(Y−1,Month+12) if Month≤2,else (Y,Month)A=⌊y/100⌋,B=2−A+⌊A/4⌋\begin{gathered} JD = \lfloor 365.25\,(y+4716) \rfloor + \lfloor 30.6001\,(m+1) \rfloor + \text{Day} + B - 1524.5 \\[1.5em] \text{where}\quad \left\{ \begin{aligned} Y &= \text{Year} \;(\text{AD}), \quad 1-\text{Year}\;(\text{BC}) \\ (y,\,m) &= (Y-1,\;\text{Month}+12) \;\text{ if Month} \le 2,\; \text{else } (Y,\;\text{Month}) \\ A &= \lfloor y/100 \rfloor,\quad B = 2 - A + \lfloor A/4 \rfloor \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Julian Day (JD)
2,451,710.5
days since 4713-01-01 BC 12:00 (proleptic Julian)
Modified Julian Day (MJD) 51,710 days
MJD formula JD − 2400000.5
Time of day 00:00 (start of civil day)

Report an error on this page

What is the Julian Day?

The Julian Day (JD) is a continuous count of days used by astronomers and chronologists worldwide. It starts at JD 0.0 at noon on 1 January 4713 BC in the proleptic Julian calendar, so any date can be expressed as a single number regardless of calendar reforms. The Modified Julian Day (MJD) is simply JD minus 2400000.5, placing its zero point at midnight on 17 November 1858 to give smaller, more manageable numbers for modern dates. This is a universal tool with no national rules.

Timeline showing a continuous day count starting from a fixed origin point in the distant past, with later calendar dates mapped onto increasing numbers
The Julian Day is a continuous count of days from a fixed epoch far in the past.

How to use it

Pick the calendar your date is expressed in (Julian or Gregorian), choose the era (AD or BC), then enter the year, month and day. The tool computes JD and MJD for 00:00 (the start of the civil day), so every result ends in .5 because JD epochs begin at noon. The Gregorian calendar was historically adopted from 15 October 1582; for earlier dates the Julian calendar is normally appropriate, but you may select either.

The formula explained

First the year is mapped to an astronomical year \(Y\): for AD, \(Y = \text{year}\); for BC, \(Y = 1 - \text{year}\) (because there is no historical year 0, the year after BC 1 is AD 1). If the month is January or February it is treated as the 13th or 14th month of the previous year: \(y = Y - 1\), \(mo = \text{month} + 12\). For the Gregorian calendar a century correction \(B = 2 - A + \lfloor A/4 \rfloor\) with \(A = \lfloor y/100 \rfloor\) is applied; for the Julian calendar \(B = 0\). Then $$JD = \lfloor 365.25\,(y+4716) \rfloor + \lfloor 30.6001\,(mo+1) \rfloor + d + B - 1524.5.$$

Advertisement
Diagram showing the relationship between Julian Day and Modified Julian Day as a simple offset of 2400000.5
MJD is simply JD shifted by a constant offset and reset to start at midnight.

Worked example

For Gregorian AD 2000-01-01: \(Y = 2000\), and since month \(\le 2\), \(y = 1999\), \(mo = 13\). \(A = 19\), \(B = 2 - 19 + 4 = -13\). $$JD = \lfloor 365.25 \times 6715 \rfloor + \lfloor 30.6001 \times 14 \rfloor + 1 - 13 - 1524.5 = 2452653 + 428 + 1 - 13 - 1524.5 = 2451544.5.$$ \(MJD = 2451544.5 - 2400000.5 = 51544\). This matches the standard JD for 2000-01-01 00:00 UT.

Common Julian Day Reference Epochs

The table lists well-known instants with their Julian Day (JD) and Modified Julian Day (MJD). Unless a time is stated, values are for 00:00 (midnight) at the start of the date. MJD = JD − 2400000.5.

Event Calendar JD MJD
JD 0 epoch: 1 Jan 4713 BC at 12:00 noon (astronomical year −4712) Julian 0.0 −2400000.5
Same date at 00:00 (the midnight before the epoch) Julian −0.5 −2400001
1 Jan AD 1 Julian 1721423.5 −678577
1 Jan AD 1 (proleptic) Gregorian 1721425.5 −678575
15 Oct 1582, first day of the Gregorian calendar Gregorian 2299160.5 −100840
17 Nov 1858, MJD 0 Gregorian 2400000.5 0
1 Jan 1970, Unix epoch Gregorian 2440587.5 40587
1 Jan 2000 at 00:00 Gregorian 2451544.5 51544
1 Jan 2000 at 12:00, J2000.0 (TT) Gregorian 2451545.0 51544.5

The Julian calendar day before the Gregorian reform, 4 Oct 1582, has JD 2299159.5. The reform skipped 10 calendar days, but JD continues without a break.

Constants Used in the Conversion

Constant Value Role
Days per Julian year 365.25 Counts days in whole years, including the leap-day cycle of 4 years.
Month factor 30.6001 Approximates the irregular month lengths when the year starts in March. The extra 0.0001 guards against rounding errors in the floor operation.
Year offset 4716 Shifts the year so the count starts at the JD epoch (4713 BC plus the adjustment for the March-based year).
Final offset 1524.5 Aligns the result to the JD zero point; the .5 puts the result at midnight rather than noon.
JD − MJD offset 2400000.5 MJD = JD − 2400000.5.
Gregorian reform JD 2299160.5 JD at 00:00 on 15 Oct 1582, the first Gregorian day.
1 Jan AD 1 1721423.5 JD at 00:00 on 1 Jan AD 1 in the Julian calendar. The proleptic Gregorian date 1 Jan AD 1 is 2 days later, at 1721425.5.
Seconds per day 86400 Converts seconds into a fraction of a day.
J2000.0 epoch 2451545.0 Noon on 1 Jan 2000, the standard astronomical reference epoch.

The century correction is \(B = 2 - A + \lfloor A/4 \rfloor\) with \(A = \lfloor y/100 \rfloor\). It is applied for Gregorian dates, and \(B = 0\) for Julian dates.

Advertisement

Interpreting JD and MJD Values

  • Integer part and fraction. The integer part counts whole days since the JD epoch. The fractional part is the time of day. Because JD days begin at noon, a fraction of .0 means noon and .5 means midnight. A calendar date at 00:00 therefore always ends in .5.
  • Time as a fraction of a day. \(\text{fraction} = \dfrac{h + m/60 + s/3600}{24} = \dfrac{\text{seconds since midnight}}{86400}\). For example, 18:00 is 0.75 day, so 1 Jan 2000 at 18:00 is JD 2451544.5 + 0.75 = 2451545.25.
  • MJD starts at midnight. Since MJD = JD − 2400000.5, it is a whole number at 00:00 and its fraction is simply the elapsed part of the civil day. The same instant, 1 Jan 2000 at 18:00, is MJD 51544.75. MJD also has fewer digits, which avoids precision loss in software.
  • Astronomical year numbering. The calculation uses a year 0, equal to 1 BC. So 2 BC is year −1 and 44 BC is year −43. This is why the formula uses \(Y = 1 - \text{year}\) for BC dates.
  • Proleptic calendars. Dates before 15 Oct 1582 can be extended backward in the Gregorian calendar (proleptic Gregorian) or given in the Julian calendar. The two differ by days, so choose the calendar that the source used. Countries adopted the Gregorian calendar at different times. Italy, Spain and Portugal did so in 1582, Britain and its colonies in 1752, Russia in 1918 and Greece in 1923. A historical date from one of these places may need the Julian calendar.
  • UT versus TT. JD is a continuous day count that can be attached to different time scales. Civil and observational dates are normally in UT (or UTC), while astronomical ephemerides use Terrestrial Time (TT), which runs ahead of UT by ΔT. In the 2020s ΔT is about a minute. Over a day this is a difference of only about 0.0008 in JD, but you should state the scale when high precision matters.

FAQ

Why does the answer end in .5? JD is counted from noon, while this tool reports the start of the civil day at 00:00, which is half a day before noon.

What is the difference between Julian Day and the Julian calendar? They are unrelated despite the shared name: the Julian Day is a day count, while the Julian calendar is a leap-year scheme. The calendar radio only chooses how your input date is interpreted.

How is BC handled? Historical numbering is used, so BC 1 maps to astronomical year \(Y = 0\) via \(Y = 1 - \text{year}\), reproducing JD 1721057.5 for BC 1-01-01.

Last updated:

Most popular in Time and Date

View all Time and Date calculators