Time & Calendar
Intermediate

Days Between Two Dates

Number of days separating two calendar dates.

Formula

Δ=JDN2−JDN1\Delta = JDN_2 - JDN_1

Live Calculator

Members

Variables

JDN_1,JDN_2Julian Day Numbers of the dates

Example

From 2000-01-01 to 2000-12-31 ⇒ 365 days

How it works

This formula finds the gap between two calendar dates by converting each date into a Julian Day Number (JDN), which counts days on a continuous scale. Once both dates are on the same day-count timeline, subtracting the earlier JDN from the later one gives the exact number of whole days between them, with leap days automatically included if they occurred in the interval. The result is a signed difference: positive if the second date is later, negative if it is earlier.

When to use it

Use this when you need an exact day count between dates in scheduling, billing, project timelines, loan periods, or age calculations. It is especially useful in science and programming because it avoids errors from differing month lengths and leap years.

Worked example, step by step

Find the number of days from 2024-02-10 to 2024-03-05. JDN_1 = 2460350 for 2024-02-10 JDN_2 = 2460374 for 2024-03-05 Δ = JDN_2 - JDN_1 Δ = 2460374 - 2460350 Δ = 24 So, there are 24 days between the two dates.

Common mistakes to avoid

  • Subtracting calendar dates directly without converting to a continuous day count
  • Forgetting that leap days can change the result in spans that include February 29
  • Mixing up the order of subtraction and getting the sign reversed

Did You Know?

Converting both dates to a single running day count sidesteps every leap-year and month-length headache.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026