internettoolbox
← Back to Tools

Date Calculator

Days Between Two Dates

Weeks and days0 weeks
Total days0
Working days (Mon–Fri)0
Months0
Years0

Add or Subtract from a Date

ResultWednesday, 2026-09-30

Date Information

Day of weekWednesday
Full dateSeptember 23, 2026
ISO week numberWeek 39
Day of year266 / 365
Leap yearNo
Unix timestamp1790121600

How it works

The page holds three independent calculators. Days Between Two Dates measures the span from one date to another. Add or Subtract from a Date moves a starting date forwards or backwards by a number of days, weeks, months or years. Date Information takes a single date and tells you everything the calendar knows about it. Nothing is shared between the three panels, so you can use one and ignore the rest.

Days Between counts the nights, not the calendar squares. From 1 January to 31 January is 30 days, because the start date is not counted and the end date is. This is the same convention as a hotel stay, a bank interest period, or JavaScript's own date arithmetic, and it is what you want for deadlines: a contract signed on the 1st with a 30-day term expires on the 31st. If you need the inclusive count (how many calendar days the range touches, which is what you want when counting holiday entitlement or days of attendance), add one to the total.

Working days counts every day in the range that is not a Saturday or a Sunday. It does not know about public holidays, because those differ by country, region and sometimes by employer, and a wrong holiday list is worse than none. If your jurisdiction has, say, eight public holidays in the period, subtract eight from the figure shown. The same caveat applies to the Skip weekends option in the Add panel: it steps over Saturdays and Sundays only.

The Weeks, Months and Years figures are calendar-based, not divisions of the day count. Months are counted as whole calendar months elapsed, so 31 January to 1 March is 1 month, not 1.03 months. The tool checks whether the day-of-month has been reached, exactly the way an anniversary or a billing cycle works. Weeks are the whole number of seven-day periods in the total; if weeks are the unit you actually want, the Weeks Between Dates Calculator on this site answers that question directly.

Adding months and years clamps to the end of the target month. 31 January plus one month is 28 February (29 February in a leap year), because 31 February does not exist. Adding a further month from there gives 28 March, not 31 March, because the clamp is not remembered. Every date library and every accounting system has to make this choice, and clamping is the one nearly all of them make.

Date Information returns the day of the week, the full written date, the ISO 8601 week number, the day of the year out of 365 or 366, whether the year is a leap year, and the Unix timestamp for midnight UTC on that date. The day-of-year figure is useful for anything that runs on Julian day numbering: crop planning, some scientific data sets, and a lot of legacy mainframe date formats.

All arithmetic runs in UTC. This matters more than it sounds: doing date maths in local time is the classic source of off-by-one-day bugs, because a day is 23 or 25 hours long when the clocks change. By pinning every date to midnight UTC the tool gives the same answer in March as in July, and the same answer in Auckland as in Los Angeles.

For a countdown to a holiday rather than a span between two dates you type, the Days Until Calculator on this site has presets for Christmas, Easter, Thanksgiving and Halloween.

Everything is computed by JavaScript in your browser. There is no backend and no request is made when you change a date. Open DevTools, go to the Network tab, and use the tool to confirm.

Frequently Asked Questions

Does the day count include the start date?

No. The count is exclusive of the start date and inclusive of the end date, so 1 January to 31 January is 30 days. That matches how notice periods, interest periods and hotel nights are counted. If you want the inclusive count (the number of calendar days the range covers), add 1 to the result.

Does it exclude weekends from working days?

Yes. The working-days figure counts only Monday to Friday, so a two-week span shows 10 working days rather than 14. The Skip weekends checkbox in the Add or Subtract panel does the same thing in reverse: adding 5 working days to a Friday lands on the following Friday, not on the Wednesday.

Are public holidays excluded?

No, only Saturdays and Sundays. Public holidays vary by country, by region within a country, and sometimes by employer, and there is no single correct list to apply. Subtract the holidays that fall inside your range from the working-days figure to get the true business-day count.

What is an ISO week number?

ISO 8601 numbers the weeks of a year from 1 to 52 or 53, with weeks running Monday to Sunday. Week 1 is the week containing the first Thursday of January, which is the same as the week containing 4 January. A consequence is that 1, 2 and 3 January can belong to the last week of the previous year, and 29, 30 and 31 December can belong to week 1 of the next. ISO weeks are the standard in European business, manufacturing and project planning.

What happens when I add a month to 31 January?

You get 28 February, or 29 February in a leap year. The result is clamped to the last valid day of the target month because 31 February does not exist. Adding two months to 31 January gives 31 March, but adding one month twice gives 28 March. Month arithmetic is not associative, which is a property of calendars rather than of this tool.

Which years are leap years?

Years divisible by 4 are leap years, except century years, which must also be divisible by 400. So 2024 and 2000 are leap years, but 1900 and 2100 are not. This is the Gregorian rule, giving an average year of 365.2425 days against the true 365.2422, an error of about one day every 3,200 years.

Does daylight saving time affect the result?

No. All arithmetic is done in UTC at midnight, so the 23-hour and 25-hour days that occur when the clocks change never enter the calculation. Date maths done in local time is the usual cause of results that are one day out, and this tool sidesteps it entirely. If you need to convert an actual time of day between zones, use the Time Zone Converter instead.

Can I calculate a date in the past?

Yes. Choose Subtract in the Add or Subtract panel, or put the later date in the Start field of the Days Between panel. A negative result means the end date comes first. The calculator handles the full range of dates JavaScript supports, roughly 271,821 BC to 275,760 AD, so historical and far-future dates both work.

Is my data safe?

Yes. The tool is a static client-side app with no backend. Your input is processed by JavaScript running inside your browser tab and is never transmitted anywhere. You can confirm by opening DevTools and watching the Network tab: using the tool produces zero outbound HTTP requests.

Day-count conventions: which one you actually want

The same two dates give different answers depending on what you are counting. This tool uses the exclusive convention; the others are one step away.

Convention1 Jan → 31 JanCounts start day?Typical use
Exclusive (this tool)30 daysNoNotice periods, interest, deadlines, hotel nights
Inclusive31 daysYesHoliday entitlement, days of attendance, jury service
Working days, exclusive20–22 daysNoDelivery estimates, SLA windows, court deadlines
Whole weeks4 weeksNoSprint planning, payroll cycles
Calendar months0 monthsn/aBilling anniversaries, tenancy terms, age
30/360 (banking)30 daysNoBond coupons, some loan interest accruals

The 30/360 convention pretends every month has 30 days and every year 360, which keeps coupon payments equal. It is a finance convention, not a calendar one, and is not implemented here.

Days per month and day-of-year offsets

The day number of the 1st of each month, for converting between calendar dates and day-of-year (Julian day) numbering.

MonthDaysDay-of-year of the 1st (common year)Day-of-year of the 1st (leap year)
January3111
February28 / 293232
March316061
April309192
May31121122
June30152153
July31182183
August31213214
September30244245
October31274275
November30305306
December31335336

A common year has 365 days, a leap year 366. From 1 March onwards the leap-year offset is one higher. Mnemonic for month lengths: knuckles and gaps across both fists, knuckle = 31 days.

Tool switcher

Search and jump to any tool