Julian Day Number
Continuous day count used by astronomers to compare dates.
Formula
Variables
Example
2000-01-01 12:00 UT ⇒ JDN 2,451,545
How it works
The Julian Day Number is a running count of whole days measured from a fixed historical starting point, so it lets astronomers compare dates without worrying about month lengths, leap years, or calendar reforms. The formula works by converting the calendar date into a day offset: the 365.25 term counts complete years, the 30.6001 term converts months into their day contribution, and the correction term B adjusts for the Gregorian calendar when needed. Using floor makes the result an integer day count, which is why it is so useful for date arithmetic and ephemerides.
When to use it
Use this when you need to convert a civil calendar date into an absolute day count for astronomy, historical date comparison, or computing day differences across months and leap years. It is especially helpful in orbital calculations, observation logs, and any problem where dates must be compared on a continuous time scale.
Worked example, step by step
Example: 2024-03-15 at 0:00 UT Step 1: Identify values Y = 2024, M = 3, D = 15 Since this is after February, no month shift is needed. Step 2: Compute the Gregorian correction B A = floor(Y/100) = floor(2024/100) = 20 B = 2 - A + floor(A/4) = 2 - 20 + floor(20/4) = 2 - 20 + 5 = -13 Step 3: Evaluate the year term floor(365.25(Y + 4716)) = floor(365.25(2024 + 4716)) = floor(365.25 6740) = floor(2,461,185) = 2,461,185 Step 4: Evaluate the month term floor(30.6001(M + 1)) = floor(30.6001(3 + 1)) = floor(30.6001 4) = floor(122.4004) = 122 Step 5: Add all parts JDN = 2,461,185 + 122 + 15 + (-13) - 1524 JDN = 2,459,785 Final answer: JDN = 2,459,785
Common mistakes to avoid
- Forgetting to shift January and February to months 13 and 14 of the previous year
- Using the Gregorian correction B for dates before the Gregorian reform without checking the calendar being used
- Confusing JDN, which is an integer day count, with the Julian Date, which includes fractional days
Did You Know?
Astronomers start each Julian Day at noon so a single night's observations never straddle a date change.
Share this formula
More in Time & Calendar
View allLeap Year Rule
BasicTests whether a Gregorian year has 366 days.
Clock Hand Angle
BasicAngle between the hour and minute hands of an analog clock.
Zeller's Congruence
AdvancedFinds the day of the week for any Gregorian date.
Day of the Week from a Birthdate
IntermediateGauss's weekday formula — find which day of the week any birthdate fell on.
Days Between Two Dates
IntermediateNumber of days separating two calendar dates.
Age in Years
BasicWhole years elapsed since a birth date.