Date Calculator

Count the days between two dates, add or subtract days, weeks, months or business days from a date, and find the week number, in your browser.

Calculates in your browser. Dates you enter are not uploaded or stored.

Days Between Two Dates

Add or Subtract Days from a Date

Week Number and Day of the Year

How to Count the Days Between Two Dates

The number of days between two dates is the number of midnights you cross going from one to the other. From Friday 30 October 2026 to Monday 2 November 2026 that is 3 days: you pass midnight into Saturday, Sunday and Monday. This date calculator counts exactly that, on the calendar, so leap days are included when they fall inside the range and never when they do not. From 1 January 2024 to 1 January 2025 is 366 days; from 1 January 2025 to 1 January 2026 is 365.

Whether to count the end date is the question behind most "off by one" disagreements. The default answer, and the one calendars, spreadsheets and programming languages all give, is no: 1 January to 31 January is 30 days, because that is the number of days you move forward. If you instead want to know how many dates appear on a list that runs from the 1st to the 31st, both ends count, and the answer is 31. Tick Include the end date for that: it adds one day to every figure in the card, including the business-day count. Hotel nights, loan interest and "days until" countdowns use the default; "days of leave taken" and "days a sign was on display" usually include both ends.

Under the day count the card shows the same span as weeks and days, as whole years, months and days on the calendar, as business days and weekend days, and as hours (days × 24, midnight to midnight, since a date on its own has no time of day). If the end date comes before the start date the calculator swaps them, counts, and says so, rather than showing a negative number.

Days Between Dates: Worked Examples

Each row was entered into the calculator above and the figures copied from it. The last column is the same range with Include the end date ticked.

StartEndDaysWeeksCalendarBusiness daysBoth days counted
1 Jan 202631 Dec 202636452 weeks11 months, 30 days260365 days, 261 business
28 Oct 202625 Dec 2026588 weeks, 2 days1 month, 27 days4259 days, 43 business
28 Oct 20261 Jan 2027659 weeks, 2 days2 months, 4 days4766 days, 48 business
1 Jan 20241 Jan 202536652 weeks, 2 days1 year262367 days, 263 business
Fri 30 Oct 2026Mon 2 Nov 202630 weeks, 3 days3 days14 days, 2 business
Mon 5 Oct 2026Fri 9 Oct 202640 weeks, 4 days4 days45 days, 5 business
1 Jan 200028 Oct 20269,7971,399 weeks, 4 days26 years, 9 months, 27 days6,9989,798 days, 6,998 business

The business-day column counts Mondays to Fridays among the days counted — the day after the start date through the end date, or both ends when the box is ticked. So Friday to Monday is 3 days but 1 business day (the Monday), and a working week from Monday to Friday is 4 days and 4 business days, or 5 and 5 with both ends counted. Public holidays are not known to the calculator; see business days below.

A long range shows why counting on the calendar matters. 1 January 2000 to 28 October 2026 is 9,797 days, which the card also gives as 26 years, 9 months and 27 days. Dividing 9,797 by 365.25 gives 26.82 "years" — close, but it tells you nothing about the months and days, and on the exact anniversary it comes out a fraction under a whole number. Our age calculator is this same calendar arithmetic specialised for dates of birth, with a next-birthday countdown.

30, 60, 90 and 180 Days from Today

The second card answers "what date is N days from today?" — the start date is set to today from your device's clock, so the quick buttons always give a current answer. The table below was produced with the calculator on Wednesday 28 October 2026, so it is correct for that day and shows the shape of the answers: whole weeks land on the same weekday, and the common deadlines do not.

From 28 Oct 2026DateWeekdayWhy people ask
7 days4 Nov 2026WednesdayOne week; same weekday as the start
14 days11 Nov 2026WednesdayTwo weeks; cooling-off and return windows
28 days25 Nov 2026WednesdayFour weeks; many prescriptions and billing cycles
30 days27 Nov 2026FridayNet-30 invoices, free trials, notice periods
45 days12 Dec 2026SaturdayNet-45 terms, some tax and filing deadlines
60 days27 Dec 2026SundayNet-60 terms, probation periods
90 days26 Jan 2027TuesdayQuarterly reviews, visa-free stays, warranties
120 days25 Feb 2027ThursdayExtended payment terms
180 days26 Apr 2027MondaySix-month deadlines, passport validity rules
365 days28 Oct 2027ThursdayA year of days; a weekday later because 2027 is not a leap year
30 days before28 Sep 2026Monday"30 days ago" for statements and look-back periods

Note that 30, 60 and 90 days are not the same as one, two and three months. From 28 October 2026, 90 days lands on 26 January 2027, while 3 months is 28 January 2027. Contracts that say "90 days" mean the day count; contracts that say "three months" mean the calendar. The Unit selector gives you both, and the line under the result shows how many calendar days a month or year span turned out to be.

Business Days Between Dates and Working Days from Today

A business day here is any Monday to Friday. Choose business days as the unit and the calculator steps forward (or back) one weekday at a time, skipping Saturdays and Sundays, so the result is always a weekday. From Wednesday 28 October 2026, 10 business days after is Wednesday 11 November 2026 — 14 calendar days later — and 30 business days after is Wednesday 9 December 2026, 42 calendar days later. Five business days before 28 October is Wednesday 21 October.

Starting on a weekend is handled the way a deadline would be: one business day after Saturday 31 October 2026 is Monday 2 November, and so is one business day after Friday 30 October. The Saturday itself is never counted as a working day. Zero business days from a Saturday is the Saturday, because nothing was added.

Public holidays are not included. They differ by country, region, year and even employer, and a calculator that quietly assumed one country's calendar would be wrong for everyone else. If a holiday falls inside your range, take one business day off the result for each. The Business days figure in the first card is the number of weekdays among the days counted, so for "how many working days until the deadline" leave the end-date box unticked (today does not count, the deadline does), and tick it when you want Excel's NETWORKDAYS figure, which counts both ends.

Adding Months and Years: What Happens on the 31st

Days and weeks are fixed lengths, so adding them is plain counting. Months are not. One month after 31 January there is no 31 February, so some rule has to decide what the answer is. This calculator uses the rule spreadsheets and most date libraries use: the day is kept where it exists and otherwise clamped to the last day of the target month.

StartAddResultCalendar days
31 Jan 20261 monthSat 28 Feb 202628
31 Jan 20262 monthsTue 31 Mar 202659
31 Aug 20261 monthWed 30 Sep 202630
31 May 20266 monthsMon 30 Nov 2026183
31 Mar 20261 month beforeSat 28 Feb 202631
29 Feb 20241 yearFri 28 Feb 2025365
29 Feb 20244 yearsTue 29 Feb 20281,461
28 Oct 20261 yearThu 28 Oct 2027365

Two consequences are worth knowing. First, adding one month twice is not the same as adding two months: 31 January + 1 month is 28 February, and 28 February + 1 month is 28 March, but 31 January + 2 months is 31 March. The calculator always adds the whole span to the original date, so it gives 31 March. Second, the calendar difference in the first card follows the same rule in reverse, which is why 31 January 2026 to 28 February 2026 reads as exactly 1 month: 28 February is where the 31st lands in a 28-day month. Tools that do not clamp report that range as 0 months and 28 days instead; neither is wrong, but a contract should say which rule it means.

What Week of the Year Is It? ISO vs US Week Numbers

There are two common ways to number weeks, and they disagree for a few days at each end of the year. The third card shows both.

DateWeekdayISO weekUS weekDay of year
28 Oct 2026WednesdayWeek 44 of 2026 (26 Oct – 1 Nov)Week 44 of 2026301 of 365
1 Jan 2026ThursdayWeek 1 of 2026 (29 Dec – 4 Jan)Week 1 of 20261 of 365
4 Jan 2026SundayWeek 1 of 2026Week 2 of 20264 of 365
31 Dec 2026ThursdayWeek 53 of 2026Week 53 of 2026365 of 365
1 Jan 2027FridayWeek 53 of 2026 (28 Dec – 3 Jan)Week 1 of 20271 of 365
31 Dec 2024TuesdayWeek 1 of 2025 (30 Dec – 5 Jan)Week 53 of 2024366 of 366
1 Jan 2028SaturdayWeek 52 of 2027Week 1 of 20281 of 366

So on 28 October 2026 the two systems agree — it is week 44 either way — but on 1 January 2027 one says week 53 of 2026 and the other week 1 of 2027. The ISO card also shows the Monday-to-Sunday range of the week, and both cards show the day of the year (28 October 2026 is day 301, with 64 days left) and the quarter. Python's %U is a third variant that starts the year at week 0, so it prints 43 for 28 October 2026 where Excel prints 44.

Common Mistakes When Calculating Dates

If your dates arrive as epoch values rather than calendar dates, convert them first with our Unix timestamp converter; a timestamp counts seconds, and the calendar date is what a day count is made from. For a job that must run on the date you have just calculated, our cron expression generator turns a day and month into a schedule and lists its next run times.

How to Calculate Days Between Dates in Code

In JavaScript, compare UTC midnights so daylight saving changes cannot shift the count:

function daysBetween(a, b) {
  const utc = d => Date.UTC(d.getFullYear(), d.getMonth(), d.getDate());
  return Math.round((utc(b) - utc(a)) / 86400000);
}

daysBetween(new Date(2026, 9, 28), new Date(2026, 11, 25)); // 58

// N days from a date, in local time:
const d = new Date(2026, 9, 28);
d.setDate(d.getDate() + 90); // Tue Jan 26 2027

In Python, date objects subtract to a timedelta whose .days is already a whole-day count, and isocalendar() gives the ISO week:

from datetime import date, timedelta

(date(2026, 12, 25) - date(2026, 10, 28)).days   # 58
date(2026, 10, 28) + timedelta(days=90)          # 2027-01-26
date(2026, 10, 28).isocalendar()                 # (2026, 44, 3): year, week, weekday
date(2027, 1, 1).isocalendar()                   # (2026, 53, 5)
date(2026, 10, 28).strftime('%j')                # '301', day of the year

In SQL, subtracting two DATE values gives an integer number of days in PostgreSQL (DATE '2026-12-25' - DATE '2026-10-28' is 58), and MySQL has DATEDIFF(end, start) with the same meaning. Both exclude the end date, like the calculator's default. Dates stored as strings have to be cast first; our SQL formatter makes those casts easier to read in a long query.

In Excel and Google Sheets, dates are day numbers, so =B1-A1 is the days between two cells. =NETWORKDAYS(A1, B1) counts the weekdays from A1 to B1 including both (tick Include the end date to match it), =WORKDAY(A1, 30) is 30 business days after A1, =EDATE(A1, 1) adds a month with the same end-of-month clamping as this page, =WEEKNUM(A1) is the US week and =ISOWEEKNUM(A1) the ISO week.

Whatever the language, the dates in an API payload are usually strings until you parse them. A ^\d{4}-\d{2}-\d{2}$ pattern in our regex tester confirms they are all in the one format your parser expects, and our JSON formatter makes a date-heavy response readable while you check which fields are dates and which are timestamps.

Frequently Asked Questions

How do I calculate the number of days between two dates?
Enter the start and end dates in the first card. The calculator counts the calendar days from one to the other — 58 days from 28 October 2026 to 25 December 2026 — and also shows the span as weeks, as years, months and days, as business days and as hours.
Does the day count include the start and end dates?
By default it counts the days you move forward, so the end date is reached but the start date is not counted: 1 to 31 January is 30 days. Tick Include the end date to count both dates, which gives 31.
What date is 90 days from today?
Press the 90 days button in the second card; the start date is set to today from your device's clock. On 28 October 2026 the answer is Tuesday 26 January 2027. 30 days from that date is Friday 27 November 2026, 60 days is Sunday 27 December 2026 and 180 days is Monday 26 April 2027.
How many weeks are between two dates?
The Weeks box shows whole weeks and the days left over: 28 October 2026 to 25 December 2026 is 58 days, or 8 weeks and 2 days. To add or subtract a number of weeks instead, choose weeks as the unit in the second card.
What counts as a business day?
Monday to Friday. Saturdays and Sundays are skipped and public holidays are not known to the calculator, so subtract one business day for each holiday in your range. 10 business days after Wednesday 28 October 2026 is Wednesday 11 November 2026.
What week of the year is it?
Enter today's date in the third card. It shows the ISO 8601 week (weeks start on Monday; week 1 contains the first Thursday) and the US week (weeks start on Sunday; week 1 contains 1 January). On 28 October 2026 both say week 44, but 1 January 2027 is ISO week 53 of 2026 and US week 1 of 2027.
What is one month after the 31st?
The last day of the next month when it is shorter: 31 January 2026 plus 1 month is 28 February 2026, and 31 August 2026 plus 1 month is 30 September 2026. The day is kept whenever it exists, so 31 January plus 2 months is 31 March.
Does the calculator handle leap years?
Yes. It counts real calendar days, so 1 January 2024 to 1 January 2025 is 366 days and 1 January 2025 to 1 January 2026 is 365. One year after 29 February 2024 is 28 February 2025, and four years after it is 29 February 2028.
Why does my code give a different number of days?
Usually daylight saving time. Subtracting two local-time dates in JavaScript gives 47 or 49 hours across a DST change, so dividing by 24 hours and rounding down loses a day. Compare dates at UTC midnight, or count calendar days as this page does.
Are the dates I enter sent anywhere?
No. Every calculation runs in your browser in JavaScript. Nothing you enter is uploaded or stored.