Date to Julian Day Converter
Convert between calendar dates and Julian Day Numbers used in astronomy and programming. Enter values for instant results with step-by-step formulas.
Formula
JDN = day + โ(153m+2)/5โ + 365y + โy/4โ - โy/100โ + โy/400โ - 32045
The Julian Day Number is computed from the Gregorian calendar date by adjusting January and February as months 13-14 of the prior year, then applying the formula that accounts for leap years. The full Julian Day adds the time fraction (hour-12)/24.
Worked Examples
Example 1: Moon Landing Date to Julian Day
Problem: Convert the Apollo 11 Moon landing date, July 20, 1969, at 20:17 UT, to Julian Day.
Solution: Year = 1969, Month = 7, Day = 20, Hour = 20, Minute = 17\na = floor((14-7)/12) = 0\ny = 1969 + 4800 - 0 = 6769\nm = 7 + 0 - 3 = 4\nJDN = 20 + floor((153*4+2)/5) + 365*6769 + floor(6769/4) - floor(6769/100) + floor(6769/400) - 32045\nJDN = 2440423\nJD = 2440423 + (20-12)/24 + 17/1440 = 2440423.345
Result: JD = 2440423.345 | MJD = 40422.845 | Day of week: Sunday
Example 2: Julian Day to Calendar Date
Problem: Convert Julian Day 2451545.0 (the J2000.0 standard epoch) back to a calendar date.
Solution: JD = 2451545.0\nz = floor(2451545.0 + 0.5) = 2451545\nalpha = floor((2451545 - 1867216.25)/36524.25) = 16\na = 2451545 + 1 + 16 - 4 = 2451558\nb = 2451558 + 1524 = 2453082\nc = floor((2453082-122.1)/365.25) = 6715\ndd = floor(365.25*6715) = 2452888\ne = floor((2453082-2452888)/30.6001) = 6\nDay = 2453082 - 2452888 - floor(30.6001*6) = 11 โ adjusted = 1\nMonth = 6-1 = 5 โ adjusted = 1\nYear = 6715-4716 = 1999 โ adjusted = 2000
Result: January 1, 2000 at 12:00 UT (noon) โ the J2000.0 epoch
Frequently Asked Questions
What is a Julian Day Number (JDN)?
The Julian Day Number is a continuous count of days that has been running since the beginning of the Julian Period on January 1, 4713 BC in the proleptic Julian calendar (November 24, 4714 BC in the Gregorian calendar). It was devised by Joseph Justus Scaliger in 1583 and named after his father Julius Caesar Scaliger, not after the Julian calendar. Astronomers use JDN because it provides a single continuous number for any date, eliminating complications from varying month lengths, leap years, and calendar reforms. The Julian Day starts at noon Universal Time, so JD 2451545.0 corresponds to January 1, 2000, at 12:00 UT (noon).
Why do astronomers use Julian Days instead of regular dates?
Astronomers use Julian Days because they provide a uniform, continuous timescale that avoids all the complications of civil calendars. Regular calendars have variable month lengths (28-31 days), leap years, different calendar systems (Julian vs. Gregorian), and historical inconsistencies like the missing days when the Gregorian calendar was adopted in 1582. Calculating the number of days between two historical dates using regular calendars requires handling all these edge cases. With Julian Days, finding the interval between any two dates is simply a subtraction. Julian Days are also essential for astronomical ephemerides, satellite tracking, and coordinating observations across different time zones and locations worldwide.
How is the Julian Day calculated from a calendar date?
The conversion from a Gregorian calendar date to Julian Day Number uses an algorithm that accounts for the varying month lengths and leap year rules. The standard formula involves adjusting the year and month so that January and February are treated as months 13 and 14 of the previous year. The core formula is: JDN = day + floor((153*m+2)/5) + 365*y + floor(y/4) - floor(y/100) + floor(y/400) - 32045, where y and m are the adjusted year and month. To get the full Julian Day with time, add (hour-12)/24 + minute/1440 + second/86400. The subtraction of 12 hours accounts for the Julian Day starting at noon rather than midnight.
What are common uses of Julian Day Numbers in programming?
In programming, Julian Day Numbers serve several practical purposes. Database systems like SQLite and Oracle use Julian Days internally for date arithmetic because simple subtraction gives the exact number of days between dates. Many satellite tracking systems (TLE format) use Julian dates for orbital element epochs. Financial applications use Julian dates for calculating day-count fractions in bond pricing. Scientific data logging often stores timestamps as Julian Days for precision and unambiguity. The Unix timestamp (seconds since January 1, 1970) can be converted to JD by the formula: JD = unix_seconds/86400 + 2440587.5. Julian Days are also used in GPS systems, where the GPS epoch (January 6, 1980) corresponds to JD 2444244.5.
How do I get the most accurate result?
Enter values as precisely as possible using the correct units for each field. Check that you have selected the right unit (e.g. kilograms vs pounds, meters vs feet) before calculating. Rounding inputs early can reduce output precision.
Is Date to Julian Day Converter free to use?
Yes, completely free with no sign-up required. All calculators on NovaCalculator are free to use without registration, subscription, or payment.