Julian Day Number Converter — JDN, MJD, Lilian Day & Code Snippets
Convert any Gregorian date to Julian Day Number (JDN) — the continuous astronomical day count from 1 January 4713 BCE. The result also shows the Modified Julian Day (MJD), the Lilian Day Number and the J2000 epoch offset simultaneously. Furthermore, the Code Snippets tab provides copy-ready JDN calculation code for Python, JavaScript, SQL and Excel.
| Day number type | Value |
|---|
| Format | Value |
|---|
How to use the Julian Day Number Converter
JDN, MJD, Lilian Day — what is the difference?
All three are continuous day counts — they count days from a fixed epoch without months or years. Furthermore, they differ only in their starting point (epoch) and the size of the resulting number.
| Day number | Epoch | Value on 1 Jan 2025 | Used by |
|---|---|---|---|
| JDN | 1 Jan 4713 BCE (Julian) | 2,460,676 | Astronomy, chronology, long-period calculations |
| MJD | 17 Nov 1858 (midnight) | 60,275.5 | Modern astronomy, satellite tracking, GPS |
| Lilian Day | 15 Oct 1582 (Gregorian reform) | 161,516 | IBM mainframes, some database systems |
| J2000 | 1 Jan 2000 noon (TT) | −1,826.5 | Space mission navigation, ephemeris calculations |
Why the JDN starts at noon, not midnight
Astronomers historically observed the sky at night. Furthermore, starting the day at noon meant a full night of observation fell within a single JDN — simplifying astronomical record keeping. The Julian Day Number still starts at noon UTC (or Terrestrial Time). Moreover, this is why JDN includes a ".5" offset when expressing a specific moment at midnight: 2 January 2000 midnight = JDN 2451544.5.
How the Julian Day Number is calculated
The JDN algorithm converts a Gregorian date to a day count from the Julian Period epoch. Furthermore, the algorithm handles the difference between Julian and Gregorian leap year rules automatically.
Y = year + 4800 − a
m = month + 12a − 3
MJD = JDN − 2,400,000.5
Lilian = JDN − 2,299,160 (JDN of 15 Oct 1582)
The Julian Period — why 4713 BCE?
Joseph Justus Scaliger chose the JDN epoch in 1583. Furthermore, he selected 1 January 4713 BCE (Julian calendar) because it is the last time three historical cycles — the 28-year solar cycle, the 19-year Metonic cycle and the 15-year Roman indiction cycle — all started simultaneously. Moreover, this date precedes all known historical records, ensuring all historical dates have positive JDN values.
Worked example: JDN for the moon landing
The Apollo 11 moon landing occurred on 20 July 1969. What is the Julian Day Number for this date?
| Day number type | Value for 20 July 1969 |
|---|---|
| Julian Day Number (JDN) | 2440423 |
| Modified Julian Day (MJD) | 40422.5 |
| Lilian Day | 141263 |
| J2000 days | −11122 (before J2000) |
| Days since moon landing | Use Date Difference Calculator |
What is a Julian Day Number?
The Julian Day Number is a continuous count of solar days from noon on 1 January 4713 BCE. Furthermore, it is the primary time-keeping system in astronomy and chronology. The JDN never resets — it increments by exactly 1 each day.
The key advantage of a continuous day count is simplicity. Furthermore, elapsed days between any two events require only subtraction. Moreover, the JDN works equally well with Gregorian, Julian, Hijri and any calendar expressed as a JDN.
Where JDN is used in practice
Astronomy software uses JDN for planet positions, eclipse predictions and spacecraft navigation. Furthermore, the GPS system uses a week count from 6 January 1980 — a direct descendant of the JDN concept. Moreover, many database systems store dates as day offsets from a fixed epoch — functionally identical to a modern JDN.
Modified Julian Day (MJD)
The Modified Julian Day was introduced in 1957 by the Smithsonian Astrophysical Observatory. Furthermore, MJD = JDN − 2,400,000.5 — producing smaller, more computer-friendly numbers. Moreover, MJD has become the standard in satellite tracking, GPS time calculations and modern astrophysics literature.
Why Julian Day Numbers matter
Historians and archaeologists use JDN to harmonise dates across calendar systems. Furthermore, an ancient Egyptian date and a Roman date can be expressed as JDNs and compared directly. Moreover, this enables rigorous chronology that would be impossible with calendar-specific dates alone.
Database engineers use day-count representations when date arithmetic performance matters. Furthermore, SQLite stores dates as JDN-derived integers internally. Oracle's date type uses a similar epoch day count. Moreover, month-spanning calculations reduce to simple integer arithmetic when expressed as day numbers.
How the code snippets save development time
The JDN formula is not immediately obvious and is easy to implement incorrectly — particularly around the year 1900 and before the Gregorian reform. Furthermore, the code snippets provide correct, tested implementations in four languages. Moreover, copying a working JDN formula from a reference tool takes under 10 seconds versus 30 to 60 minutes of research and debugging for a new implementation.
Frequently asked questions
Related Date & Time tools
Every tool on LazyTools runs in your browser. Nothing is uploaded or stored.
Julian to Gregorian Converter
Convert dates from the old Julian calendar to the Gregorian calendar. Furthermore, the 1582 reform and the lost 10 days are explained in detail.
→Unix Timestamp Converter
Convert Unix timestamps to readable dates. Furthermore, batch mode and code snippets for 5 languages are included.
→Excel Serial Date Converter
Convert Excel serial date numbers to Gregorian dates. Furthermore, batch mode converts 500 serial numbers at once.
→Milliseconds to Date
Convert millisecond timestamps to dates. Additionally, a duration calculator shows elapsed time between two timestamps.
→Date Difference Calculator
Exact gap between two dates in every unit. Additionally, milestone markers show every 100th and 1000th day.
→Online Date Format Converter
Convert dates between ISO, US, EU and 12 other formats. Furthermore, batch mode converts 100 dates at once.
→