Time & Dates
Days between two dates
The difference between two day numbers is the exact number of days between the dates.
Last updated
The Formula
Days = JDN(to) - JDN(from)
The difference between two day numbers is the exact number of days between the dates.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| JDN from | From day number | day | The Julian day number of the starting date. |
| JDN to | To day number | day | The Julian day number of the ending date. |
What Each Symbol Means
JDN fromday
From day number
The Julian day number of the starting date.
JDN today
To day number
The Julian day number of the ending date.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate days between dates page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate Days Between Dates, filed under Everyday Life. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Days between two dates?
The formula for Days between two dates is Days = JDN(to) - JDN(from). The difference between two day numbers is the exact number of days between the dates.
What units should I use with Days between two dates?
Substitute JDN from in day, JDN to in day. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Days between two dates?
Forgetting leap years. A leap day is added every four years, except in century years not divisible by four hundred. The day-number method handles this automatically; manual counting usually does not.