CalcThis CalcThis
An open three-month paper calendar on a desk with a start date and an end date circled and a ruler measuring the gap between them
Blog ยท Math & Numbers ยท 6 min read

How to Calculate the Number of Days Between Two Dates

Counting the days between two dates sounds like it should be subtraction, and across a single month it is. The moment the span crosses a month boundary โ€” or a year, or a 29 February โ€” you need a method that keeps track of how long each month actually is. Here are the two that work by hand, plus the choice that quietly changes the answer.

The two ways to count

There are two honest answers to "how many days from 4 July to 25 December", and they differ by one:

Neither is wrong. Decide which one the question is asking before you start, because every method below gives you the "between" figure and you add one at the end if you need the inclusive count.

+1
the difference between "days between" and "days including both ends"
2
methods that work by hand โ€” count forward, or subtract day-numbers

Method 1: count forward through the calendar

Best when the two dates are close together, or in the same year. Move from the start date to the end date in chunks and add the chunks up:

For 4 July to 25 December 2026: July has 31 days, so 31 โˆ’ 4 = 27 days left in July. The full months between are August (31), September (30), October (31) and November (30) โ€” that's 122. Then 25 days into December. Total: 27 + 122 + 25 = 174 days.

A hand tracing along a row of dates on a wall calendar page, counting days, with the current week bracketed in amber marker
Counting forward: days left in the first month, plus whole months, plus the day-number in the last month.

Method 2: convert each date to a day-number and subtract

Best when the dates are far apart or in different years. Give each date its ordinal day of the year โ€” 1 for 1 January, 32 for 1 February, and so on โ€” then subtract.

days between = (end day-of-year โˆ’ start day-of-year) + 365 × (full years in between) Add 1 for each 29 February that falls inside the span

4 July 2026 is day 185 of the year. 25 December 2026 is day 359. Same year, so: 359 โˆ’ 185 = 174 days โ€” the same answer Method 1 gave.

Across years, add 365 for each full year between the dates and then add one more day for every 29 February inside the span. From 1 March 2023 to 1 March 2025 is 365 + 366 = 731 days, because 2024 was a leap year and its 29 February sits inside the range.

Counting in weeks, months and years instead

Once you have the day count, weeks is just division: 174 รท 7 = 24 weeks with 6 days left over.

Months and years are different โ€” you can't divide, because months aren't all the same length. You count them the calendar way: whole years first, then whole months, then leftover days. 4 July to 25 December is 0 years, 5 months, 21 days (July 4 โ†’ December 4 is five months; December 4 โ†’ 25 is 21 days). This is the same borrow-and-carry idea used to work out an exact age.

Business days only โ€” excluding weekends and holidays

A monthly calendar with the Saturday and Sunday columns shaded grey and two weekdays marked with an amber holiday dot, leaving the working days clear
Working days = total days, minus weekends, minus any public holidays that land on a weekday.

For contracts, notice periods and "net 30" invoice terms, what's often meant is working days. The shortcut: every 7-day block contains exactly 5 weekdays. So for a span of N days, start with 5 × (N รท 7), then add the leftover weekdays from the partial week, and finally subtract any public holidays that fall on a weekday inside the range.

174 days is 24 whole weeks (120 working days) plus 6 leftover days. Depending on which weekday the span starts on, those 6 add 4 or 5 more working days โ€” so roughly 124-125 before holidays. Independence Day 2026 falls on a Saturday and Christmas Day on a Friday, so only Christmas comes out of the count here. Hand estimates get fiddly fast, which is what the calculator's business-day mode is for.

Leap years, and why two calculators disagree by a day

A year is a leap year if it divides by 4 โ€” unless it's a century year, which must divide by 400. 2000 was a leap year; 1900 and 2100 are not. Any span that steps over a 29 February is one day longer than the same span in a common year, and forgetting that is the single most common hand-count error.

When two tools disagree by a day for the same two dates, it's almost always one of these:

A worked example, start to finish

Question: how many days from 4 July 2026 to 25 December 2026, and how many working days?

StepWorkingResult
Days left in July31 โˆ’ 427
Whole months between31 + 30 + 31 + 30122
Days into Decemberโ€”25
Calendar days between27 + 122 + 25174
Including both ends174 + 1175
In weeks174 รท 724 weeks, 6 days
In monthscalendar count5 months, 21 days

The date calculator returns all of these at once, marks the span on a timeline, and gives the business-day figure with or without US federal holidays.

Free Tool
Date Calculator
Enter two dates for the exact gap in days, weeks, months and years โ€” plus the weekday of each date, a business-days count, and a live span timeline. Or switch to add and subtract days from a date.
Calculate now

Frequently asked questions

How do I calculate the number of days between two dates?

Either count forward โ€” days left in the start month, plus the whole months between, plus the day-number in the end month โ€” or give each date its day-of-year number and subtract, adding 365 for each full year between and one more day for each 29 February in the span.

Should I count both the start and end date?

By default, no โ€” the standard "days between" figure counts the nights, so the start date is excluded and the end date included. Add one day when you need both the first and last day counted, such as the length of a trip or a rental period.

How many days are there between two dates in different years?

Take the end date's day-of-year minus the start date's day-of-year, then add 365 for every full year between them. Add one extra day for each 29 February that falls inside the range.

How do I count only the working days between two dates?

Multiply the whole number of weeks in the span by 5, add the leftover weekdays from the partial week, then subtract any public holidays that land on a weekday inside the range. A calculator with a business-day mode does the weekday and holiday bookkeeping for you.

Why do two date calculators give me different answers?

Usually one includes the end date and the other doesn't, one missed a leap day, or they're using different time zones. For the years-months-days breakdown, they can also borrow a different month's length and land a day apart.