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.
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.
| Start | End | Days | Weeks | Calendar | Business days | Both days counted |
|---|---|---|---|---|---|---|
| 1 Jan 2026 | 31 Dec 2026 | 364 | 52 weeks | 11 months, 30 days | 260 | 365 days, 261 business |
| 28 Oct 2026 | 25 Dec 2026 | 58 | 8 weeks, 2 days | 1 month, 27 days | 42 | 59 days, 43 business |
| 28 Oct 2026 | 1 Jan 2027 | 65 | 9 weeks, 2 days | 2 months, 4 days | 47 | 66 days, 48 business |
| 1 Jan 2024 | 1 Jan 2025 | 366 | 52 weeks, 2 days | 1 year | 262 | 367 days, 263 business |
| Fri 30 Oct 2026 | Mon 2 Nov 2026 | 3 | 0 weeks, 3 days | 3 days | 1 | 4 days, 2 business |
| Mon 5 Oct 2026 | Fri 9 Oct 2026 | 4 | 0 weeks, 4 days | 4 days | 4 | 5 days, 5 business |
| 1 Jan 2000 | 28 Oct 2026 | 9,797 | 1,399 weeks, 4 days | 26 years, 9 months, 27 days | 6,998 | 9,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 2026 | Date | Weekday | Why people ask |
|---|---|---|---|
| 7 days | 4 Nov 2026 | Wednesday | One week; same weekday as the start |
| 14 days | 11 Nov 2026 | Wednesday | Two weeks; cooling-off and return windows |
| 28 days | 25 Nov 2026 | Wednesday | Four weeks; many prescriptions and billing cycles |
| 30 days | 27 Nov 2026 | Friday | Net-30 invoices, free trials, notice periods |
| 45 days | 12 Dec 2026 | Saturday | Net-45 terms, some tax and filing deadlines |
| 60 days | 27 Dec 2026 | Sunday | Net-60 terms, probation periods |
| 90 days | 26 Jan 2027 | Tuesday | Quarterly reviews, visa-free stays, warranties |
| 120 days | 25 Feb 2027 | Thursday | Extended payment terms |
| 180 days | 26 Apr 2027 | Monday | Six-month deadlines, passport validity rules |
| 365 days | 28 Oct 2027 | Thursday | A year of days; a weekday later because 2027 is not a leap year |
| 30 days before | 28 Sep 2026 | Monday | "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.
| Start | Add | Result | Calendar days |
|---|---|---|---|
| 31 Jan 2026 | 1 month | Sat 28 Feb 2026 | 28 |
| 31 Jan 2026 | 2 months | Tue 31 Mar 2026 | 59 |
| 31 Aug 2026 | 1 month | Wed 30 Sep 2026 | 30 |
| 31 May 2026 | 6 months | Mon 30 Nov 2026 | 183 |
| 31 Mar 2026 | 1 month before | Sat 28 Feb 2026 | 31 |
| 29 Feb 2024 | 1 year | Fri 28 Feb 2025 | 365 |
| 29 Feb 2024 | 4 years | Tue 29 Feb 2028 | 1,461 |
| 28 Oct 2026 | 1 year | Thu 28 Oct 2027 | 365 |
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.
- ISO 8601 week — weeks start on Monday, and week 1 is the week that contains the year's first Thursday (equivalently, the first week with at least four days in the new year). A date in late December or early January can therefore belong to a different ISO year than its calendar year, and an ISO year has 52 or 53 weeks. This is the numbering used in Europe, in most business software, and by
ISOWEEKNUMin Excel and%Vin Python and C. - US week — weeks start on Sunday, and week 1 is whichever week contains 1 January, however short. This is Excel's
WEEKNUMdefault. Years always have 53 weeks in this scheme, with the first and last usually partial.
| Date | Weekday | ISO week | US week | Day of year |
|---|---|---|---|---|
| 28 Oct 2026 | Wednesday | Week 44 of 2026 (26 Oct – 1 Nov) | Week 44 of 2026 | 301 of 365 |
| 1 Jan 2026 | Thursday | Week 1 of 2026 (29 Dec – 4 Jan) | Week 1 of 2026 | 1 of 365 |
| 4 Jan 2026 | Sunday | Week 1 of 2026 | Week 2 of 2026 | 4 of 365 |
| 31 Dec 2026 | Thursday | Week 53 of 2026 | Week 53 of 2026 | 365 of 365 |
| 1 Jan 2027 | Friday | Week 53 of 2026 (28 Dec – 3 Jan) | Week 1 of 2027 | 1 of 365 |
| 31 Dec 2024 | Tuesday | Week 1 of 2025 (30 Dec – 5 Jan) | Week 53 of 2024 | 366 of 366 |
| 1 Jan 2028 | Saturday | Week 52 of 2027 | Week 1 of 2028 | 1 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
- Subtracting timestamps and dividing by 86,400,000. In JavaScript,
new Date(2026, 2, 9) - new Date(2026, 2, 7)in New York is 47 hours, not 48, because daylight saving time started on 8 March 2026. Divided by a day in milliseconds that is 1.958, andMath.floorturns a 2-day span into 1. The two dates in this page's 58-day example straddle the end of DST, so the same subtraction gives 58.04 there. Count calendar days, or compare UTC midnights withDate.UTC(y, m, d), which gives exactly 2 and 58. - Parsing
YYYY-MM-DDwithnew Date().new Date('2026-10-28')is midnight UTC, andgetDate()in New York returns 27. Build local dates asnew Date(2026, 9, 28)(months start at 0) or keep year, month and day as plain numbers, as this page does. - Using
setMonthto add a month. In JavaScript,setMonthon 31 January 2026 gives 3 March 2026: the 31st overflows February and keeps counting. Clamp to the month's last day yourself, as the table above does, or use a library that does. - Counting both ends without meaning to. A list of dates from the 1st to the 31st has 31 entries, but moving from the 1st to the 31st is 30 days. Decide which question you are answering and tick or untick Include the end date to match.
- Treating months as 30 days. 1 February 2026 to 1 April 2026 is 59 days. On the calendar that is exactly 2 months; at 30 days a month it comes out as 1 month and 29 days.
- Assuming business-day tools know your holidays. Most do not, including this one. Excel's
NETWORKDAYSandWORKDAYonly skip holidays you pass in as a range.
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.