Skip to main content
Viralrang
Dates & TimeFree · no sign-up

Date Difference Calculator

How many days between two dates — with the weeks, months, and working-day counts alongside.

Last updated

Order doesn't matter — the gap is the same either way.

Days between

358days

11 months, 24 days

Weeks
51 weeks, 1 days
Whole months
11
Working days
256
Weekend days
102

The count runs from the start date up to — but not including — the end date, which is how contracts, notice periods, and shipping windows are normally quoted. Add one day if you need both endpoints counted.

How to use the date difference calculator

Put a start date in the first box and an end date in the second, and the tool reports the gap between them straight away. Both fields are native date inputs, so you can type the numbers or use your device's calendar picker — whichever is quicker. The example already loaded, January 1 to December 25, 2026, shows the tool working before you touch anything.

The order you enter them in does not matter. The calculator sorts the pair before it counts, so an end date that sits before the start date gives the same answer rather than a negative number or a zero. That means you can paste two dates out of an email in whatever order they appeared and still get the right gap.

The headline number is total days, and it counts the start date but not the end date — the span runs from the start date up to, but not including, the end date. That is how notice periods, rental nights, contract windows, and shipping estimates are normally quoted, and it is why a Monday-to-Tuesday booking is one night, not two. When you want both endpoints included — "how many days am I off, counting my first day and my last day?" — add one to the total yourself.

Underneath the total sit the same span described other ways. The calendar breakdown gives you years, months, and days, which answers a different question from the raw day count: it follows the calendar, so its months are real months of unequal length rather than blocks of thirty days. Weeks and whole months are shown alongside for when a project plan or an invoice is measured in those units.

The last two lines split the span by day of week. Working days counts every Monday through Friday inside the window, and weekend days counts every Saturday and Sunday — together they always add back up to the total. Whatever you change, the address bar updates to match, so copying the URL hands someone else the exact same two dates and the exact same answer.

The formula

The total is an exact day count, not an estimate. Both dates are converted to UTC midnights before subtracting, so a daylight-saving transition in the middle of the span — an hour lost in spring, an hour gained in autumn — cannot round the answer up or down a day the way a local-time subtraction can:

total days = (end at UTC midnight − start at UTC midnight) ÷ 86,400,000 ms
           counts the start date, excludes the end date

whole months = (end.year − start.year) × 12 + (end.month − start.month)
               − 1 if this month's anniversary has not arrived yet
years = whole months ÷ 12 (rounded down) · months = whole months mod 12
days  = day count from that anniversary date to the end date
Days between two datesJan 1, 2026 to Dec 25, 2026 is 358 days, of which 256 are working days.START COUNTS, END DOES NOTfromJan 1, 2026toDec 25, 2026THE SPANcalendar breakdown0y 11m 24dfull weeks51working days256total days358
The span counts the start date and stops before the end date — 358 days, not 359.

Worked example with the defaults — Thursday, January 1, 2026 to Friday, December 25, 2026. 2026 is not a leap year, so it runs 365 days: January 1 to December 31 is 364 days, and December 25 is six days earlier, which leaves 358 days. The calendar breakdown anchors on the monthly anniversary — January 1 to December 1 is 11 whole months, and December 1 to December 25 is 24 more days, so 11 months, 24 days. As weeks that is 51 weeks and 1 day, because 51 × 7 = 357 with one day left over.

The working-day split falls out of the same 358: 51 full weeks contribute 51 × 5 = 255 weekdays and 51 × 2 = 102 weekend days, and the single leftover day is Thursday, December 24 — a weekday — so the totals are 256 working days and 102 weekend days, which add back to 358.

The anchored-anniversary method is what keeps the years/months/days breakdown honest at awkward month ends. Counting whole months first and then measuring the remaining days from the clamped anniversary date means January 31 to March 1 comes out as one month and one day, instead of the negative day count you get from borrowing February's 28 days. Leap years need no special case at all: February 29 is simply a day that exists in the subtraction, or does not.

Frequently asked questions

How Are Loan Payments Calculated? Amortization, Explained

One level payment, front-loaded interest — the formula worked by hand, the two levers you control, and why the smaller payment is often the costlier loan.

July 23, 2026 · 13 min read

How Does Inflation Work? The Math That Shrinks Money

One growth factor, two answers — what today's money will buy later, and how many future dollars it takes to keep up.

July 23, 2026 · 13 min read

How Is Sales Tax Calculated? Rates, Rules, and the Reverse Math

The combined-rate reality, the one-multiplication forward formula, and the division that pulls the tax back out of any total.

July 23, 2026 · 13 min read