The Julian Day (JD) is the number of days since noon UTC on January 1, 4713 BC (proleptic Julian calendar). Used by astronomers, historians, and anyone working with long-baseline time. This converter handles JD, Modified Julian Day (MJD), and Julian Day Number (JDN).
The Julian Day (JD) is a continuous count of days since the start of the Julian Period. Astronomers use it because it provides a single number for any moment in time — useful when working across centuries or comparing observations from different calendar systems.
The Julian Day system was invented by Joseph Scaliger in 1583. He chose January 1, 4713 BC (proleptic Julian calendar) because it was the earliest date at which three astronomical cycles coincided. It has nothing to do with Julius Caesar or the Julian calendar — confusingly named.
| Variant | Definition | Example (2025-01-01 00:00 UTC) |
|---|---|---|
| JD Julian Day | Days + fraction since noon UTC, 4713 BC Jan 1 | 2460676.5 |
| MJD Modified Julian Day | JD − 2400000.5 (starts at midnight 1858-11-17) | 60676 |
| JDN Julian Day Number | Integer JD (the day number, no fraction) | 2460677 (for the noon-noon day containing 00:00) |
The standard JD has two annoying properties: it starts at noon instead of midnight, and modern dates produce 7-digit numbers with a .5 fractional part. MJD fixes both — it starts at midnight on Nov 17, 1858 (a NASA convention), and modern MJD values are 5-digit integers, much friendlier for everyday use.
You'll see MJD in astronomical catalogs, satellite tracking, NASA mission data, and some scientific datasets.
JD = (unix_seconds / 86400) + 2440587.5
The constant 2440587.5 is the JD for the Unix epoch (1970-01-01 00:00 UTC).
unix_seconds = (JD - 2440587.5) * 86400
MJD = JD - 2400000.5
JD = MJD + 2400000.5
from datetime import datetime, timezone, timedelta
UNIX_EPOCH_JD = 2440587.5
def jd_to_datetime(jd: float) -> datetime:
unix_sec = (jd - UNIX_EPOCH_JD) * 86400
return datetime.fromtimestamp(unix_sec, tz=timezone.utc)
def datetime_to_jd(dt: datetime) -> float:
return (dt.timestamp() / 86400) + UNIX_EPOCH_JD
def jd_to_mjd(jd: float) -> float:
return jd - 2400000.5
const UNIX_EPOCH_JD = 2440587.5;
const MJD_OFFSET = 2400000.5;
function jdToDate(jd) {
return new Date((jd - UNIX_EPOCH_JD) * 86400 * 1000);
}
function dateToJd(date) {
return (date.getTime() / 1000 / 86400) + UNIX_EPOCH_JD;
}
function jdToMjd(jd) { return jd - MJD_OFFSET; }
function mjdToJd(mjd) { return mjd + MJD_OFFSET; }
JD is defined relative to the proleptic Julian calendar — that is, the Julian calendar extended backwards before its actual adoption. For dates before the Gregorian reform (October 1582), this differs from the date you'd see on a historical document. Astronomers usually use JD without calendar conversion; historians may want JD computed against the proleptic Gregorian calendar instead. For modern dates (after 1582), the two agree.