Dates formula
Days Between Two Dates
The number of days between two dates is the one date measure with no doubt about the size of its unit. The only decision is whether the first and the last date are both counted, and that single day causes most disagreements about deadlines, gaps and lengths of service.
Formula
days between = end date − start date (the start day is not counted and the end day is; add 1 to count both ends, subtract 1 to count neither)
- start date
- the earlier date; in the plain difference it is the point you count from, so it is not itself counted
- end date
- the later date, which is counted as the last step
- days between
- the number of steps from one date to the next between the two dates; consecutive dates are 1 day apart
- inclusive days
- days between + 1, used when you were present, employed or on leave on both the first and the last date
- days strictly between
- days between − 1, the full days that lie after the start date and before the end date
- leap day
- 29 February, which exists only in leap years and adds one day to any period that contains it
What it means
Subtracting one date from another counts steps, not squares on a calendar page. From a Monday to the Wednesday of the same week is two steps, although three dates are involved. That is the right count for "how far away is it?", such as the time left until a deadline or a start date, because today is already partly used and is not a full day you still have.
It is the wrong count when both ends are days on which something happened. A contract that starts on the 1st and ends on the 10th covers ten days of employment, yet 10 − 1 = 9. For attendance, employment, leave and hire periods, add 1. The opposite case is a gap: if you leave one job on a Friday and start the next on the Monday, the plain difference is 3, but only the 2 days of the weekend were spent between jobs, so subtract 1. Decide which of the three counts you need before you do any arithmetic.
By hand, the work is adding month lengths, and they are uneven: April, June, September and November have 30 days, February has 28, or 29 in a leap year, and the other seven have 31. Count what is left of the first month, add each complete month in between, then add the day number of the end date. A leap year normally comes every fourth year (2024, 2028), except that century years count only when they divide by 400. A period that crosses 29 February is one day longer than the same dates in another year.
A total in days is exact in a way that months and years are not, which is why documents that need precision often state a number of days. It still depends on how the period is worded. "Within 30 days of" an event, "30 days after" it and "30 days including" it can differ by a day. This page gives the arithmetic; the document that sets a deadline decides which convention applies, so read its wording or ask.
Other forms
- Counting both the first and the last day
- inclusive days = end date − start date + 1
- Full days strictly between the two dates
- days strictly between = end date − start date − 1
- End date from a start date and a number of days
- end date = start date + number of days
- Last day of a period of N days that includes its first day
- last day = first day + N − 1
- Start date from an end date and a number of days
- start date = end date − number of days
Worked example
A fixed-term contract ran from Monday 6 November 2023 to Friday 12 April 2024, and a form asks how many days it lasted.
- Rest of November 2023: 30 − 6 = 24 days
- Complete months: December 31 + January 31 + February 29 (2024 is a leap year) + March 31 = 122 days
- Days in April up to the end date: 12
- Days between: 24 + 122 + 12 = 158
- Counting both the first and the last day of the contract: 158 + 1 = 159
- Check in weeks: 158 ÷ 7 = 22 weeks with 4 days left over, and Monday plus 4 days is Friday
Result: The two dates are 158 days apart, and the contract covered 159 days of employment because you worked on both the first and the last date. Without the leap day the same dates would give 157 and 158.
Where it is used
Your last day in one job was Friday 26 June 2026 and you start the next on Monday 17 August 2026. Subtracting the dates gives 52 days. You were employed on both of those dates, though, so the time spent out of work is the days strictly between them: 52 − 1 = 51, which is the figure the Career Gap Calculator reports. That is a little over seven weeks. A resume that shows months and years will read "June 2026" and "August 2026", and a gap of that size rarely needs explaining. If a form asks for exact dates, give the dates and let the reader do the subtraction.
Common mistakes
- Subtracting the dates and reporting the answer as days worked or days of leave, when both ends were used and the true count is one higher.
- Adding 1 for a countdown to a deadline, which makes the time you have left look a day longer than it is.
- Treating every month as 30 days, which loses five days over a full year, or six in a leap year.
- Forgetting 29 February when a period crosses it, or adding it in a year that is not a leap year.
- Measuring the gap between two jobs with the plain difference, which counts the first day of the new job as if it were a day out of work.
Questions and answers
Do I count the first day, the last day or both?
It depends on the question. For how far apart two dates are, count the end date only, which is what plain subtraction does. For days on which you worked, attended or were on leave, count both and add 1. For the empty days separating two events, count neither and subtract 1.
How many days are there in a year?
A normal year has 365 days and a leap year has 366. Twelve months from any date is therefore 365 or 366 days, depending on whether a 29 February falls inside the period. For averages over many years, 365.25 is the usual figure.
How do I find the date a given number of days from now?
Add the number to the start date, moving through the months at their real lengths. Ninety days from 1 March is 30 May, not 1 June, because March, April and May together hold 92 days. If the period is meant to include its first day, the last day is one day earlier.
Does the time of day or the time zone matter?
Not for calendar dates. The calculation treats each date as a whole day with no clock time, so 23:00 on one day to 01:00 on the next still counts as 1 day. If a deadline names a time or a time zone, work from that exact moment as the document defines it.