Time & Calendar
Advanced

Julian Day Number

Continuous day count used by astronomers to compare dates.

Formula

JDN=⌊365.25(Y+4716)⌋+⌊30.6001(M+1)⌋+D+B−1524JDN = \left\lfloor 365.25(Y+4716) \right\rfloor + \left\lfloor 30.6001(M+1) \right\rfloor + D + B - 1524

Variables

YYear
MMonth (Jan/Feb → 13/14 of prior year)
DDay
BGregorian correction

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

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026