The guide
One number for any moment: the Julian day count and why it begins at noon
Astronomers count days from a single starting point, so the gap between two events is a subtraction and no month, leap year or calendar reform can get in the way.
- 2451545 Julian day number of noon on 1 January 2000
- 2299161 JDN of 15 October 1582, one day after 4 October
- 51544.0 modified Julian date at midnight, 1 January 2000
- 13 days Gregorian minus Julian date, 1901 to 2099
- 358 days from 1 January to 25 December 2026
Read the full guide Fold the guide
Ask how many days lie between 4 March 1601 and 19 September 1987 and you will find yourself counting months, checking which Februaries had a twenty-ninth day and wondering whether a calendar reform fell in between. Astronomers decided long ago that this was the wrong way to ask. They number the days instead, in one unbroken run, and subtract.
That run is the Julian day count. It has no months, no years and no leap days. Each day gets one whole number, and any moment gets that number plus a fraction. The name comes from the Julian calendar, not from the astronomer who proposed the period, and the count is a different thing from that calendar.
The count itself
The count starts on Monday, 1 January 4713 BC in the proleptic Julian calendar, which is 24 November 4714 BC if you extend the Gregorian calendar backwards. That day starts at noon Universal Time, and it is Julian day number 0. Every later day adds one.
The Julian day number, or JDN, therefore names a whole day: noon on 1 January 2000 falls in day 2451545. The Julian date, or JD, names an instant. It is the day number plus the part of a day that has passed since the preceding noon, written as a decimal.
A worked example you can reproduce on this page. Take 00:30 Universal Time on 1 January 2013. That moment lies half an hour after midnight, which is eleven and a half hours before the noon that gives the day its number. The Julian date is 2456293.520833, rounded to six decimals.
Move to 1 January 2000 and the pattern is easy to see. Noon is 2451545.0. Six hours later, at 18:00, the date is 2451545.25. Six hours before noon, at 06:00, it is 2451544.75. Midnight is always half a day away from the number of its day, so a JD that ends in .5 is a midnight.
Because the fraction is just elapsed time divided by 86,400 seconds, nothing about it depends on a calendar. This page keeps that fraction as an exact pair of whole numbers rather than a decimal. A double-precision decimal can hold a modern Julian date only to about 20 microseconds, according to the U.S. Naval Observatory, and a fraction such as one second in a day cannot be written exactly in decimal at all.
Why astronomers begin at noon
The odd start has a history, not a physical reason. In 1583, the year after the Gregorian reform, Joseph Scaliger proposed a Julian period of 7,980 years, the product of three cycles used in the Julian calendar: 28 years of the solar cycle, 19 of the lunar cycle and 15 of the indiction, a Roman tax cycle. Their first years last coincided in 4713 BC, so he began there. The Julian day count takes its epoch from that period and counts days where Scaliger counted years. The word Julian refers to the Julian calendar the period was built on.
Noon came later and by habit. Astronomers have started their working day at noon since Ptolemy, because the Sun crosses the local meridian at nearly the same apparent time every day, while sunrise and sunset wander by hours. A night of observing then carries a single date from dusk to dawn.
When astronomers switched to midnight days on 1 January 1925, to match the civil day, they kept the Julian days continuous with older practice. The noon start stayed.
Two calendars and a gap
The Julian calendar, proposed in 46 BC and in force from 1 January 45 BC, adds a leap day every fourth year without exception. Its average year is 365.25 days. The solar year is closer to 365.2422 days, so the calendar gains about three days every four centuries against the seasons.
By the sixteenth century the drift had reached ten days. Pope Gregory XIII issued the bull Inter gravissimas, signed on 24 February 1582, which kept the every-fourth-year rule but dropped the leap day in century years not divisible by 400. That gives 97 leap years in every 400, an average year of 365.2425 days and a cycle of 146,097 days, which is exactly 20,871 weeks.
Rome did not wait. Where the reform was adopted at once, including the Papal States, Spain, Portugal and Poland and Lithuania, Thursday 4 October 1582 was followed by Friday 15 October 1582. Ten dates simply never happened. In day numbers the break is invisible: 4 October is day 2299160 and 15 October is day 2299161, consecutive days. That is the clearest case for counting days rather than dates.
Other places moved later, and the missing days grew. France changed in December 1582. Great Britain and its colonies dropped eleven days in September 1752, Russia thirteen in February 1918, and Greece was the last European country to change for civil use, in March 1923. From 1901 to 2099 the Gregorian date equals the Julian date plus 13 days.
The two calendars also disagree about which years are leap years. The year 1900 had a 29 February in the Julian calendar and not in the Gregorian one, so the same labelled day can exist in one and be an error in the other.
Years before the reform raise a second question. The Gregorian rules can be extended backwards to give a proleptic calendar, which many computer systems use. Astronomers add year 0, which is 1 BC, so that a subtraction of years works across the divide. This page uses that numbering and says so wherever a negative year appears.
From a date to a number
The standard integer formula for a Gregorian date is short. Set a to the whole part of (14 minus the month) divided by 12, then y to the year plus 4800 minus a, and m to the month plus 12a minus 3. The day number is the day, plus the whole part of (153m plus 2) divided by 5, plus 365y, plus the whole parts of y/4 and y/400, minus the whole part of y/100, minus 32045.
For the Julian calendar the century terms drop out and the constant becomes 32083. The weekday follows from the day number: add one, divide by seven and keep the remainder, with 0 for Sunday. JDN 0 was a Monday, and 1 January 2000 was a Saturday.
A second example shows the point of the whole system. From 1 January to 25 December 2026 is 358 days, which is simply 2461400 minus 2461042. The 25th is day 359 of the year, one more than the gap, because the gap does not count its first day.
Every formula here was checked rather than trusted. They agree with the date ordinals in the Python standard library on every seventh day from year 1 to year 9999, and the Julian formula agrees with stepping through the Julian calendar one day at a time from JDN 0. Running the arithmetic on whole numbers avoids the rounding that a decimal would bring.
The modified count and the limits of Universal Time
Long Julian dates are awkward. The Smithsonian Astrophysical Observatory introduced the modified Julian date in 1957 to record the orbit of the first artificial satellite on a computer that stored the date in 18 bits. It subtracts 2400000.5, so it starts at midnight on 17 November 1858 and has fewer digits. Midnight on 1 January 2000 is MJD 51544.0.
The count is only as precise as the clock behind it. Universal Time follows the rotation of the Earth, which is irregular and slowly slowing. Coordinated Universal Time, the basis of civil clocks, is kept close to it by occasional leap seconds, so a UTC day can last 86,401 seconds, and a plain fraction of 86,400 then goes wrong on that day.
Precise work uses Terrestrial Time, a uniform scale that runs 32.184 seconds ahead of International Atomic Time. The gap between it and Universal Time, called delta T, has stayed within half a second of 69 seconds since 2017. The International Astronomical Union has recommended since 1997 that Julian dates be given in Terrestrial Time.
This page works in Universal Time only. It does not convert to Terrestrial Time, handle time zones, model leap seconds, or know the calendar changes that happened after 1582. For a date in Great Britain in 1700 you would pick the calendar by hand. Within those limits, the count does one thing exactly: it turns any date and time into a number that two people can subtract and agree on.
Sources
Every source consulted for this guide. Links checked November 10, 2026.
- Julian day Wikipedia (CC BY-SA)
- Julian calendar Wikipedia (CC BY-SA)
- Gregorian calendar Wikipedia (CC BY-SA)
- Inter gravissimas Wikipedia (CC BY-SA)
- Adoption of the Gregorian calendar Wikipedia (CC BY-SA)
- Proleptic Gregorian calendar Wikipedia (CC BY-SA)
- Universal Time Wikipedia (CC BY-SA)
- Terrestrial Time Wikipedia (CC BY-SA)
- Coordinated Universal Time Wikipedia (CC BY-SA)
- Delta T (timekeeping) Wikipedia (CC BY-SA)
- Calendars and their History NASA Goddard Space Flight Center eclipse site, reprinted from the Explanatory Supplement to the Astronomical Almanac (L. E. Doggett)
- Javascript Calendar Converter NASA Goddard Space Flight Center eclipse site (Fred Espenak)
- Julian Date Converter U.S. Naval Observatory, Astronomical Applications Department
- datetime - Basic date and time types Python Software Foundation, Python documentation (PSF License)
- BigInt - JavaScript MDN Web Docs (CC BY-SA)
- Web Workers API MDN Web Docs (CC BY-SA)