CURRENT EPOCH · EPOCHTIME.TOOLS · A PRECISION INSTRUMENT FOR TIME
Converter Batch Difference Blog
Languages
JavaScript Python TypeScript Go Rust Java PHP SQL Bash
Specialty
LDAP Timestamp .NET Ticks Chrome/WebKit Cocoa / Core Data Discord Timestamp Excel OADate Unix Hex
Standards
ISO 8601 Guide Year 2038 NTP Timestamp GPS Time Julian Day
01 Input
Paste a Julian Day (JD), Modified Julian Day (MJD), or date
JD epoch: noon UTC on Jan 1, 4713 BC. MJD = JD − 2400000.5 (starts at midnight 1858-11-17).
02 Output
Julian Day (JD)
Modified Julian Day (MJD)
Julian Day Number (JDN, integer)
Unix seconds
ISO 8601 (UTC)
Human-readable

What is a Julian Day?

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.

JD vs MJD vs JDN

VariantDefinitionExample (2025-01-01 00:00 UTC)
JD
Julian Day
Days + fraction since noon UTC, 4713 BC Jan 12460676.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)

Why MJD is more useful day-to-day

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.

Where you'll encounter JD

Conversion formulas

Unix seconds → JD

JD = (unix_seconds / 86400) + 2440587.5

The constant 2440587.5 is the JD for the Unix epoch (1970-01-01 00:00 UTC).

JD → Unix seconds

unix_seconds = (JD - 2440587.5) * 86400

JD ↔ MJD

MJD = JD - 2400000.5
JD = MJD + 2400000.5

Code examples

Python

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

JavaScript

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; }

A note on calendar systems

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.