TimeCalculator

Date Calculator

Count the days between two dates, or add and subtract years, months, weeks and days from any date.

How many days between two dates

Count the days, weeks, months and working days from one calendar date to another.

Days between

0

Choose two dates.

  • Inclusive or exclusive counting
  • Working days split out
  • Leap years handled correctly
  • Free, private, no sign-up

Quick answer

A date calculator does two jobs: it counts how many days lie between two calendar dates, and it moves a date forward or backward by a given number of years, months, weeks or days. Both are harder than they look. Counting days is ambiguous until you decide whether the last day counts, and adding a month is ambiguous until you decide what happens when the target month is too short. The tool above makes both choices explicit so the answer is never a guess.

days between = end date − start date 2 Jan 2026 − 1 Jan 2026 = 1 day inclusive = (end − start) + 1 both endpoints counted = 2 days new date = start date + offset 1 Jan 2026 + 30 days = 31 Jan 2026

What a date calculator does

Calendar arithmetic is not ordinary arithmetic. Months are 28, 29, 30 or 31 days long. Years are 365 or 366 days long, and the rule that decides which is not simply "every fourth year". Weeks do not divide evenly into months or years. Add all of that together and a question as innocent as "how many days until the deadline" has at least two defensible answers depending on how you count.

The tool above has two tabs. Days Between Dates takes a start date and an end date and reports the gap in days, weeks, months, years, working days, weekend days, hours and minutes, with a checkbox that switches between exclusive and inclusive counting. Add or Subtract takes a start date, a direction, and separate boxes for years, months, weeks and days, then returns the resulting date along with its day of the week, the total days moved, the day of the year, the ISO week number, and whether the target year is a leap year.

Internally, both tabs do the same thing that every reliable date library does. Each calendar date is converted to a single integer, a serial day number counted from a fixed epoch. Once dates are integers, the difference between two of them is a subtraction and moving a date is an addition. Month lengths, leap days and the awkwardness of the calendar are all baked into the conversion, so they cannot be forgotten halfway through a calculation. Only the month and year offsets need special handling, because a month is not a fixed number of days and so cannot be expressed as a serial offset at all.

The distinction that matters most in practice is between a duration and a count. A duration is how much time passes: from 1 January to 2 January, one day passes. A count is how many dated things you touch: 1 January and 2 January are two dates. Contracts, hotel bills, hospital stays, court deadlines and school terms are split roughly evenly between the two conventions, which is why the calculator shows both rather than picking one for you.

If you want the gap expressed in hours, minutes and seconds rather than whole days, the Time Duration Calculator takes times as well as dates. If you want a live count that ticks down on screen, use the Countdown Timer. And if the two dates are a birth date and today, the Age Calculator already applies the years, months and days breakdown that people expect for an age.

365.2425Days in the average Gregorian year
97Leap years per 400 year cycle
146,097Days in a 400 year cycle
60Day of year for 1 March, common year
53Maximum ISO weeks in a year
Step by step

How to use the date calculator

Four steps, under a minute. Every result updates as soon as both dates are valid, and each figure is labelled so you know exactly which convention it uses.

  1. Choose a tab

    Use Days Between Dates when you already know both dates and want the gap. Use Add or Subtract when you know one date and an offset, and want to find the other date.

  2. Enter the dates

    Type or pick a start date, then an end date. The order does not matter for the size of the gap, but entering them the right way round keeps the sign and the wording of the result sensible.

  3. Set the counting rule or the offset

    Tick include the end date to count both endpoints, which adds exactly one day. On the second tab, choose add or subtract and fill in any combination of years, months, weeks and days.

  4. Read the result

    You get the total in days, weeks, months and years, plus working days, weekend days, hours and minutes. Adding or subtracting also returns the weekday, the day of the year and the ISO week number.

Blank offset boxes count as zero. On the Add or Subtract tab you can fill in one box or all four. Filling in several applies them in a fixed order: years first, then months, then weeks, then days. That order matters more than you would expect, and the reason is explained in the section on month-end clamping below.

The off by one

Inclusive versus exclusive day counting

The single most common source of a wrong answer in date arithmetic. Both conventions are correct; they answer different questions.

Exclusive counting measures the gap between two dates. Inclusive counting counts the dates themselves. From 1 January to 2 January is 1 day exclusive and 2 days inclusive. Neither number is a rounding error and neither is a mistake. They are answers to two different questions that happen to be phrased almost identically in English.

Exclusive counting is the default almost everywhere in software, because it is what subtraction naturally produces. Convert both dates to serial day numbers, subtract, and you get the number of midnights crossed. That figure behaves properly under addition: if 1 January to 2 January is 1 and 2 January to 3 January is 1, then 1 January to 3 January must be 2, and it is. Inclusive counts do not add up this way, which is exactly why programmers avoid them.

Inclusive counting is the default in most human contexts that involve occupying or consuming days. A conference running from Monday to Wednesday is a three day conference. A prescription of "take one tablet a day from the 4th to the 10th" needs seven tablets, not six. Court filing deadlines, notice periods, statutory holiday entitlements and hospital length of stay rules all specify their counting convention in writing, precisely because the difference is a day of somebody's life or money.

exclusive days = end − start inclusive days = (end − start) + 1 1 Jan 2026 to 2 Jan 2026: exclusive = 1, inclusive = 2 1 Jan 2026 to 8 Jan 2026: exclusive = 7, inclusive = 8

A quick test

Ask yourself whether you are counting nights or days. A hotel booking from the 3rd to the 5th is two nights, which is the exclusive count. The same stay covers three calendar days, which is the inclusive count. If the thing being counted happens overnight, or is measured by midnights crossed, you want exclusive. If it is something you do on each date, you want inclusive.

A fence, not a gap

The classic name for this is the fence post problem. A straight fence 10 metres long with a post every metre needs 11 posts, not 10, because both ends need one. Dates are fence posts and the days between them are the panels. Exclusive counting counts panels; inclusive counting counts posts.

The same two dates, counted two ways

Calendar grid for early January 2026 showing exclusive and inclusive counts between 1 and 2 January A Monday start calendar grid runs from 29 December 2025 to 11 January 2026. One January is highlighted as the start date and two January as the end date. Exclusive counting gives one day because one step is taken between them. Inclusive counting gives two days because two dated boxes are touched. MONTUEWEDTHUFRISATSUN 293031 12 34 Dec 2025Dec 2025Dec 2025 STARTEND Jan 2026Jan 2026 567891011 EXCLUSIVE counts the steps taken between the dates 1 day INCLUSIVE counts every dated box that is touched 2 days exclusive = 2 Jan − 1 Jan = 1 inclusive = 1 + 1 = 2
One step, two boxes. The gap between 1 and 2 January 2026 is a single day, but the two dates together account for two days of the calendar. Ticking the include the end date box in the calculator adds exactly one to the exclusive figure, never more.

Read the wording of any deadline carefully. Phrases such as "within 30 days of receipt", "not less than 30 clear days" and "30 days from the date of this notice" can all resolve to different final dates. "Clear days" in particular normally excludes both the first and the last day, which makes it one day longer than a plain exclusive count. When money or a legal right depends on the answer, count the days on a calendar and confirm the convention in writing.

Date arithmetic

Adding and subtracting years, months, weeks and days

Days and weeks are easy because they are fixed lengths. Months and years are not, and that is where the surprises live.

Days and weeks: pure addition

Adding days to a date is the simple case. Convert the date to its serial day number, add the offset, convert back. A week is exactly seven days by definition, everywhere and always, so adding weeks is just adding a multiple of seven. Because seven days is a whole number of weeks, adding or subtracting any multiple of seven always lands on the same weekday you started on. Adding 30 days does not, which is why "in 30 days" and "in a month" so often name different weekdays.

serial(new) = serial(start) + (weeks × 7) + days 1 Jan 2026 + 30 days = 31 Jan 2026 1 Jan 2026 + 4 weeks = 29 Jan 2026 1 Jan 2026 + 1 month = 1 Feb 2026

Three offsets that people treat as interchangeable, three different answers, spread across three days of the calendar. If a contract says thirty days, use thirty days. If it says one month, use one month. They are not the same instruction.

Months and years: clamping

Adding one month keeps the day number and increments the month, except when the target month is too short, in which case the day is clamped down to the last day of that month. This is the rule used by essentially every date library, spreadsheet and financial system, and it is the rule the calculator above applies.

So 31 January 2026 plus one month is 28 February 2026, because February 2026 has no 29th, 30th or 31st. In 2024, a leap year, the same calculation lands on 29 February 2024. The offset described as "one month" moved the date by 28 days in the first case and 29 in the second, and neither is 30 or 31.

Clamping is not reversible

Add one month to 31 January 2026 and you get 28 February 2026. Subtract one month from that and you get 28 January 2026, not the 31st you started with. Information is destroyed by the clamp, so month arithmetic does not undo itself. Always calculate from the original date rather than stepping forward and back.

Clamping is not injective

29, 30 and 31 January 2026 all land on 28 February 2026 when you add a month. Three distinct start dates collapse onto one target. If you are generating a monthly billing schedule from a start date, this is why the 31st of the month silently becomes the 28th in February and stays sensible only if you always recompute from the original anchor date.

Order changes the answer

Take 30 January 2026. Add one month, then one day: 28 February becomes 1 March. Add one day, then one month: 31 January becomes 28 February. Same inputs, different order, four days apart. This is why the calculator applies years, then months, then weeks, then days, in a fixed and documented sequence.

What happens when the target month is too short

Diagram showing 29, 30 and 31 January 2026 all mapping to 28 February 2026 when one month is added Three start dates, 29 January 2026, 30 January 2026 and 31 January 2026, all clamp to 28 February 2026 because February 2026 has only 28 days. Further examples show 31 March becoming 30 April, 31 May becoming 30 June, 31 August becoming 30 September and 31 January 2024 becoming 29 February 2024. ADD ONE MONTH TO AND YOU LAND ON 29 January 2026 30 January 2026 31 January 2026 28 February 2026 the last day of the month February 2026 has only 28 days, so the day number is clamped 31 Mar → 30 Apr 31 May → 30 Jun 31 Aug → 30 Sep 31 Jan 24 → 29 Feb 24 target day = min(source day, number of days in the target month)
Three January dates, one February landing spot. Clamping keeps the result a real date, but it means the phrase "one month later" can describe a move of 28, 29, 30 or 31 days. Whenever an exact interval matters, specify it in days and use the Days Between Dates tab to check it.
Adding one month to a month end dateWhat clamping does, and how many days the date actually moves
Start datePlus one monthDays actually movedWhy
31 January 202628 February 202628February 2026 is a common year February with 28 days.
31 January 202429 February 2024292024 is a leap year, so February reaches the 29th.
30 January 202628 February 202629Clamped to the 28th, the same target as the 29th and 31st.
29 January 202628 February 202630Still clamped, because 29 February 2026 does not exist.
31 March 202630 April 202630April has 30 days, so the 31st cannot be preserved.
31 May 202630 June 202630June has 30 days.
31 August 202630 September 202630September has 30 days.
31 October 202630 November 202630November has 30 days.
15 March 202615 April 202631No clamping needed, so the move is the full length of March.

Note the middle of the table: adding "one month" to three consecutive January dates moves them 30, 29 and 28 days respectively. If you need a fixed interval, count in days or weeks instead. For spans measured in hours rather than dates, the Hours Calculator and the Time Calculator handle base 60 arithmetic the same way this page handles the calendar.

Reference

How many days are in each month

Four lengths, no pattern you can derive from first principles. This is a lookup table, and it always has been.

Seven months have 31 days, four have 30, and February has 28 or 29. The irregular sequence is a historical accident rather than a design, inherited from the Roman calendar by way of the Julian reform of 46 BC. There is no arithmetic shortcut, which is why every calendar system in software carries the month lengths as a hard coded list of twelve numbers with a single conditional for February.

Two mnemonics survive because they work. The verse begins "Thirty days hath September, April, June and November; all the rest have thirty one, excepting February alone". The other is the knuckle method: make a fist and count across the knuckles and the dips between them starting at January on the first knuckle. Knuckles are 31 day months, dips are shorter ones. July and August both land on knuckles because you restart at the first knuckle of the other hand, which is why they are the only two consecutive 31 day months in the year.

The consequence for date arithmetic is that a quarter is not a fixed length either. The first quarter of a common year is 90 days and 91 in a leap year, the second is 91 days, and the third and fourth are 92 days each. Quarterly reporting periods therefore differ in length by up to two days, which is enough to matter for daily rate calculations and interest accruals.

Days in each monthCommon years and leap years, with running totals
MonthDaysLeapTotal to dateLeap total
January31313131
February28295960
March31319091
April3030120121
May3131151152
June3030181182
July3131212213
August3131243244
September3030273274
October3131304305
November3030334335
December3131365366

The total to date columns are cumulative and count the days elapsed at the end of each month. They are the figures a calculator uses to turn a date into a day of the year, described in detail further down this page.

Because month lengths vary, the "months" figure that the Days Between Dates tab reports has to be defined carefully. There are two reasonable definitions and they give different numbers. The calendar decomposition counts whole months first and then leftover days: 14 February 2026 to 25 December 2026 is 10 months and 11 days, because 14 February plus ten months is 14 December and there are 11 more days to the 25th. The average month divides the total days by 30.436875, the mean Gregorian month, giving 314 divided by 30.436875, or 10.32 months. The first is what people mean in conversation, the second is what you want for smooth interpolation and charting.

Working days

Counting business days, and why holidays are separate

A working day count is a weekday count. Public holidays are a local overlay that no general calculator can guess.

The calculator counts working days as Monday to Friday and weekend days as Saturday and Sunday, with no holiday deductions. That is the only definition that is universally applicable, and it is what the phrase "business days" means in most commercial correspondence before local holidays are subtracted.

The arithmetic is straightforward once you see the structure. Any span of N days contains floor(N ÷ 7) complete weeks, and each complete week contributes exactly five working days and two weekend days regardless of where it starts. The remainder, between zero and six days, is the only part that depends on which weekday you began on. So a 30 day span always contains at least 20 working days and never more than 22.

working days = floor(N ÷ 7) × 5 + extra weekend days = floor(N ÷ 7) × 2 + (remainder − extra) 30 days = 4 complete weeks (20 working days) + 2 leftover days → 20, 21 or 22 working days depending on the start weekday

A full year works out the same way. A 365 day year is 52 weeks plus one day, so it holds 260 weekdays plus one more if that leftover day is a weekday. A 366 day leap year is 52 weeks plus two days, so it holds 260 plus zero, one or two. In practice a Gregorian year contains 260, 261 or 262 weekdays. 2024 had 262, 2025 had 261 and 2026 has 261.

Why holidays must be handled separately

There is no universal holiday calendar. Federal, national, provincial, state, regional, religious and company holidays all differ, they differ within a single country, and several of them move each year because they are tied to lunar or ecclesiastical rules. Some are observed on a substitute weekday when they fall at a weekend, and some are not. A calculator that guessed would be confidently wrong for most of its users.

The practical method

Get the plain weekday count from the calculator, then list the holidays that fall inside the span and land on a weekday, and subtract that count by hand. A holiday that falls on a Saturday or Sunday has already been excluded, so subtracting it again double counts. This two step method is quick, auditable, and correct wherever you happen to be.

Working days in a spanThe range depends only on which weekday the span starts on
Total daysComplete weeksLeftover daysWorking daysWeekend days
71052
1420104
2130156
304220 to 228 to 10
456331 to 3312 to 14
608442 to 4416 to 18
9012664 to 6525 to 26
180255128 to 13050 to 52
365521260 to 261104 to 105

Spans that are exact multiples of seven have a single answer because there are no leftover days to argue about. That is a good reason to express service level agreements and notice periods in weeks rather than days when you can. If you need to turn those working days into paid hours, the Time Card Calculator takes a week of shifts at a time.

The 4, 100 and 400 rule

Leap years, and the two exceptions people forget

Every fourth year is a leap year, except every hundredth, except every four hundredth. Both exceptions are real and both have caught software out.

A Gregorian year is a leap year if it is divisible by 4, unless it is divisible by 100, unless it is also divisible by 400. So 1996 and 2024 are leap years, 1900 and 2100 are not, and 1600 and 2000 are. The year 2000 being a leap year is the reason a generation of programmers who only implemented the divisible by 100 exception got away with it: their code was wrong, but the first year it would have produced a wrong answer was 2100.

is_leap(y) = (y mod 4 == 0) AND (y mod 100 != 0 OR y mod 400 == 0) 1896 → 1896 ÷ 4 exact, not a century year → LEAP 1900 → century year, 1900 ÷ 400 not exact → COMMON 2000 → century year, 2000 ÷ 400 exact → LEAP 2100 → century year, 2100 ÷ 400 not exact → COMMON

The reason for the double exception is that the Earth does not take a whole number of days to orbit the Sun. The mean tropical year is roughly 365.2422 days. The Julian calendar approximated this as 365.25 by adding one day every four years, which overshoots by about 11 minutes a year, or one full day roughly every 128 years. Over the 1,600 years the Julian calendar was in use in Europe, that drift accumulated to about ten days.

The Gregorian fix drops three leap days every four centuries. That gives 97 leap years in each 400 year cycle instead of 100, and a mean year of exactly 365.2425 days. The residual error is about 0.0003 days a year, which takes roughly 3,200 years to accumulate into a single day. No further correction is scheduled, and none is needed within any planning horizon that matters.

One pleasing consequence of the 400 year cycle: it contains 146,097 days, and 146,097 divided by 7 is exactly 20,871. The Gregorian calendar therefore repeats perfectly every 400 years, weekdays included. It also means the days of the month are not evenly spread across weekdays. Over a full cycle the 13th of the month falls on a Friday 688 times, slightly more often than on any other weekday.

The leap year decision, as a flow

Flow chart of the Gregorian leap year rule using divisibility by 4, 100 and 400 A year not divisible by 4 is a common year. A year divisible by 4 but not by 100 is a leap year. A year divisible by 100 but not by 400 is a common year, such as 1900 and 2100. A year divisible by 400 is a leap year, such as 1600 and 2000. Year ÷ 4 ? ÷ 100 ? ÷ 400 ? Yes Yes Yes No No No COMMON 2023, 2026 LEAP 1996, 2024 COMMON 1900, 2100 LEAP 1600, 2000
Only century years take the second and third branches. Ninety six years out of every hundred are settled by the first test alone, which is why the two exceptions stay invisible for decades at a time and then break something.
The leap year rule appliedSix century and non century years, tested step by step
YearDivisible by 4Divisible by 100Divisible by 400ResultDays in February
1896YesNoNot testedLeap year29
1900YesYesNoCommon year28
1996YesNoNot testedLeap year29
2000YesYesYesLeap year29
2024YesNoNot testedLeap year29
2100YesYesNoCommon year28

1896 and 1904 were both leap years, but 1900 was not, which makes the gap between them eight years rather than the usual four. The same eight year gap will happen again between 2096 and 2104, because 2100 is a common year. Anyone born on 29 February 1896 had to wait until 1904 for a birthday on the right date, a wrinkle the Age Calculator deals with explicitly.

Ordinal dates

Day of the year numbering

1 January is day 1. 31 December is day 365, or day 366 in a leap year. Everything in between is a lookup plus an addition.

The day of the year, sometimes called the ordinal date or the Julian day in agriculture and aviation, numbers each day from 1 to 365 or 366 within its own year. It is used wherever a compact date is needed without month names: crop and weather records, aircraft maintenance logs, satellite telemetry, batch codes on manufactured goods and the ISO 8601 ordinal date format, which writes 2026-205 for the 205th day of 2026.

Computing it is a two step operation. Take the cumulative day count at the end of the previous month from the table below, then add the day of the month. For 15 April in a common year: March ends on day 90, so 15 April is 90 plus 15, which is day 105. In a leap year March ends on day 91, so the same date is day 106.

day of year = cumulative days before the month + day of month 15 April, common year = 90 + 15 = 105 15 April, leap year = 91 + 15 = 106 1 March, common year = 59 + 1 = 60 1 March, leap year = 60 + 1 = 61

The crucial detail is that a leap year and a common year agree exactly until the end of February and then differ by one for the rest of the year. In a common year 1 March is day 60; in a leap year it is day 61. Any code, spreadsheet or mental shortcut that uses a single day of year table for both kinds of year will be one day out from 1 March to 31 December, which is 306 days out of every 366. That is the most common day of year bug there is.

Day of the year for the first of each monthCommon years and leap years side by side
Month1st, common year1st, leap yearLast day, commonLast day, leapDifference from 1 March
January113131Identical in both
February32325960Identical until the 28th
March60619091Leap year is 1 higher
April9192120121Leap year is 1 higher
May121122151152Leap year is 1 higher
June152153181182Leap year is 1 higher
July182183212213Leap year is 1 higher
August213214243244Leap year is 1 higher
September244245273274Leap year is 1 higher
October274275304305Leap year is 1 higher
November305306334335Leap year is 1 higher
December335336365366Leap year is 1 higher

Worth memorising: 1 July is day 182 in a common year and day 183 in a leap year, so the midpoint of the year falls at noon on 2 July in a common year. 1 October is day 274, which is a useful anchor for fiscal years that begin then.

ISO 8601

Week numbers, and why a year can have 53 of them

The international standard defines week 1 by where its Thursday falls, not by where 1 January falls. That one decision explains every oddity that follows.

Under ISO 8601, weeks begin on Monday, and week 1 of any year is the week containing that year's first Thursday. An equivalent and often easier phrasing: week 1 is the week that contains 4 January. Another equivalent: week 1 is the first week with at least four of its days in the new year.

The Thursday rule exists to make the assignment unambiguous and to keep each week wholly inside one week numbering year. A week has seven days, and Thursday is the middle day, so whichever year owns the Thursday owns the majority of the week. No week is ever split between two years, and no week is ever numbered twice.

The price is that the first and last few days of a calendar year can belong to a neighbouring week year. Monday 29 December 2025 is in week 2026-W01, because that week's Thursday is 1 January 2026. Friday 1 January 2027 is in week 2026-W53, because that week's Thursday is 31 December 2026. Both facts look wrong at first glance and both are correct.

A year has 53 ISO weeks when 1 January is a Thursday, or when it is a leap year and 1 January is a Wednesday. Every other year has 52. Equivalently, a year has 53 weeks if it contains 53 Thursdays. This happens 71 times in every 400 year cycle, so roughly once every 5.6 years, in an irregular pattern of five and six year gaps.

The practical consequence turns up in retail and payroll every few years: a 53 week financial year, an extra pay period in a weekly payroll, or a year on year comparison that is quietly comparing 371 days against 364. If your reporting is built on ISO weeks, plan for the 53rd week rather than discovering it in December.

52 or 53 ISO weeksThe rule tested against real years
Year1 January falls onLeapISO weeks
2004ThursdayYes53
2009ThursdayNo53
2015ThursdayNo53
2020WednesdayYes53
2021FridayNo52
2024MondayYes52
2025WednesdayNo52
2026ThursdayNo53
2027FridayNo52
2032ThursdayYes53
2037ThursdayNo53

2020 is the instructive row: 1 January 2020 was a Wednesday, which alone is not enough, but 2020 was also a leap year, so the extra day pushed 31 December 2020 onto a Thursday and produced a 53rd week. A common year starting on a Wednesday, such as 2025, has only 52.

Where week 1 begins in two different years

Two calendar week strips showing how ISO week 1 is assigned for 2026 and 2027 In 2026 the first Thursday is 1 January, so the week from Monday 29 December 2025 to Sunday 4 January 2026 is week 2026-W01. In 2027 the first Thursday is 7 January, so the week from Monday 28 December 2026 to Sunday 3 January 2027 belongs to 2026 as week 53, and 2027 week 1 does not begin until Monday 4 January. 2026: the first Thursday of the year is 1 January MONTUEWEDTHUFRISATSUN 293031234 1 Dec 2025Dec 2025Dec 2025Jan 2026Jan 2026Jan 2026 1st THU This whole week is 2026-W01, although three of its days are in December 2025. 2027: the first Thursday of the year is 7 January MONTUEWEDTHUFRISATSUN 282930123 31 Dec 2026Dec 2026Dec 2026Jan 2027Jan 2027Jan 2027 Dec THU This week's Thursday is still in 2026, so it is 2026-W53. Week 2027-W01 starts on Monday 4 January 2027.
Follow the Thursday, not the 1st of January. In 2026 the Thursday is 1 January, so the week is claimed by the new year even though it starts in December. In 2027 the Thursday is 31 December 2026, so the same calendar position is claimed by the old year instead.
Quick lookup

Common "days from now" intervals

The intervals that turn up most often in contracts, returns policies, notice periods and medical follow ups, converted once so you do not have to.

Days, weeks and months comparedAverage months use the Gregorian mean of 30.436875 days
DaysWeeksWeeks and daysMonths, averageWorking daysShare of a 365 day year
71.0001 week0.2351.92%
142.0002 weeks0.46103.84%
213.0003 weeks0.69155.75%
304.2864 weeks 2 days0.9920 to 228.22%
456.4296 weeks 3 days1.4831 to 3312.33%
608.5718 weeks 4 days1.9742 to 4416.44%
9012.85712 weeks 6 days2.9664 to 6524.66%
10014.28614 weeks 2 days3.2970 to 7227.40%
12017.14317 weeks 1 day3.9485 to 8632.88%
18025.71425 weeks 5 days5.91128 to 13049.32%
27038.57138 weeks 4 days8.87192 to 19473.97%
36552.14352 weeks 1 day11.99260 to 261100.00%

Notice that 30 days is 0.99 average months and 365 days is 11.99 average months, not exactly 1 and 12. That is the whole reason "one month" and "30 days" are different instructions. The working day column is a range because it depends on which weekday the span starts on, and it excludes public holidays.

30 days

Standard invoice payment terms, most consumer returns windows, and the notice period in many month to month tenancy agreements. Four weeks and two days.

90 days

Probation periods, warranty windows, travel visa limits and clinical follow up appointments. Twelve weeks and six days, and just under three average months.

180 days

Roughly half a year at 49.32 percent, common in passport validity rules and medium term contract clauses. Twenty five weeks and five days.

365 days

A common year, and exactly 52 weeks plus one day. That leftover day is why a fixed date moves forward one weekday each year, and two after a leap year.

Worked examples

Six date calculations, step by step

Each one is reproducible in the calculator above. The working is shown so you can check your own method against it.

Counting a stay two ways Inclusive

A guest arrives on 1 June 2026 and leaves on 15 June 2026. How many nights, and how many days?

  1. Exclusive count: 15 minus 1 is 14 days, which is the number of nights.
  2. Inclusive count: 14 plus 1 is 15 days, the number of dated days touched.
  3. 14 days is exactly 2 weeks, so both dates fall on the same weekday, a Monday.
  4. Working days in the exclusive span: 10. Weekend days: 4.
  5. In hours: 14 × 24 = 336 hours, or 20,160 minutes.

14 nights · 15 calendar days · 10 working days

A 90 day contract deadline Business

A notice dated 24 July 2026 gives 90 days to respond. What is the last day, and how many working days is that?

  1. 24 July 2026 is a Friday and is day 205 of the year.
  2. Add 90 days: 205 plus 90 is day 295 of 2026.
  3. Day 295 falls in October, because October begins on day 274.
  4. 295 minus 273 (the last day of September) gives 22 October 2026, a Thursday.
  5. The 90 day span contains 64 working days and 26 weekend days before any public holidays.

= Thursday 22 October 2026

One month from 31 January Clamping

A subscription starting 31 January renews monthly. What is the renewal date in 2026, and in 2024?

  1. Keep the day number, increment the month: the target is 31 February, which does not exist.
  2. Clamp to the last day of the target month.
  3. February 2026 has 28 days, so the answer is 28 February 2026, a move of 28 days.
  4. 2024 is a leap year and February 2024 has 29 days, so the answer is 29 February 2024, a move of 29 days.
  5. Always recompute the next renewal from 31 January, not from 28 February, or the date drifts permanently.

2026 → 28 Feb · 2024 → 29 Feb

Day of the year and week number Ordinal

What is the day of the year and the ISO week number for 15 April 2026?

  1. 2026 is not divisible by 4, so it is a common year with 365 days.
  2. Cumulative days to the end of March in a common year: 90.
  3. Day of year = 90 + 15 = day 105, written 2026-105 in ISO ordinal format.
  4. 15 April 2026 is a Wednesday.
  5. Counting Monday start weeks from 2026-W01, which began on 29 December 2025, that Wednesday falls in 2026-W16.

Day 105 of 365 · ISO 2026-W16-3

Order of operations trap Careful

Start at 30 January 2026. Add one month and one day. Does the order matter?

  1. Month first: 30 January plus one month clamps to 28 February 2026.
  2. Then add one day: 28 February becomes 1 March 2026.
  3. Day first: 30 January plus one day is 31 January 2026.
  4. Then add one month: 31 January clamps to 28 February 2026.
  5. The two routes end one day and one clamp apart, from identical inputs.

1 March 2026 or 28 February 2026

A long span in four units Planning

How long is it from 14 February 2026 to 25 December 2026?

  1. Day of year for 14 February 2026: 31 + 14 = day 45.
  2. Day of year for 25 December 2026: 334 + 25 = day 359.
  3. Exclusive days: 359 minus 45 = 314 days. Inclusive: 315.
  4. In weeks: 314 divided by 7 is 44 weeks and 6 days.
  5. Calendar decomposition: 10 months and 11 days. Average months: 314 ÷ 30.436875 = 10.32.
  6. Working days: 224. Weekend days: 90. Hours: 7,536.

314 days · 44 w 6 d · 10 months 11 days

Historical footnote

The Julian to Gregorian changeover

Dates before the late 1500s are not straightforward, and dates between the 1580s and the 1920s depend on where you are standing.

The Gregorian calendar was introduced by a papal bull issued on 24 February 1582, and countries adopted it over the following 341 years. To correct the drift the Julian calendar had accumulated, ten days were deleted outright: in the countries that adopted first, Thursday 4 October 1582 was followed directly by Friday 15 October 1582. The weekday sequence was deliberately left unbroken. Only the date labels moved.

Britain and its colonies, including what would become Canada and the United States, held out until 1752. By then the drift had grown to eleven days, so Wednesday 2 September 1752 was followed by Thursday 14 September 1752. The same legislation moved the start of the legal year in England from 25 March to 1 January, which is why documents from that era sometimes carry double years such as 1750/51.

Other adoptions came much later. Russia switched in February 1918, dropping thirteen days, which is why the October Revolution of 1917 is commemorated in November. Greece was the last European country to change, in 1923, also dropping thirteen days. Sweden attempted a gradual transition between 1700 and 1712, abandoned it halfway, and returned to the Julian calendar by inserting a 30 February 1712, a date that has existed exactly once.

For everyday date arithmetic none of this matters, and the calculator above uses the proleptic Gregorian calendar throughout, meaning it applies Gregorian rules to every date including those before 1582. That is the standard behaviour of ISO 8601 and of virtually every software date library, and it keeps the arithmetic consistent. It does mean that a date printed in a document from 1650 in England and the same date entered here refer to different actual days, by about ten or eleven days. For genealogy, historical research or anything involving pre 1923 records from a specific country, check which calendar the source was using before you compute anything.

When countries changed calendarsThe last Julian date and the first Gregorian one
WhereLast Julian dayNext Gregorian dayDays dropped
Spain, Portugal, Papal StatesThu 4 Oct 1582Fri 15 Oct 158210
Britain and its coloniesWed 2 Sep 1752Thu 14 Sep 175211
Russia31 Jan 1918Thu 14 Feb 191813
Greece15 Feb 1923Thu 1 Mar 192313

The weekday cycle was never interrupted at any changeover. Only the numbering of the days changed.

The Julian calendar is still drifting. It adds a leap day every four years with no exceptions, giving a mean year of 365.25 days against a tropical year of about 365.2422. That is an error of roughly one day every 128 years. The Gregorian mean of 365.2425 days reduces the error to about one day in 3,200 years, which is why no further reform is planned.

Avoid these

Seven mistakes that produce the wrong date

Almost every incorrect answer in calendar arithmetic traces back to one of these.

Common date calculation errorsWhat goes wrong, and the correction
MistakeWhat it looks likeThe fix
Getting inclusive and exclusive backwards 1 Jan to 2 Jan called 1 day for a two day event Decide first whether you are counting gaps or dates. Add 1 to the exclusive figure to include both ends.
Treating a month as 30 days 1 Jan + 1 month read as 31 Jan One month from 1 January is 1 February. Only three months in the year are actually 30 days long.
Ignoring month end clamping 31 Jan + 1 month expected to be 31 Feb The day clamps down to the last valid day, giving 28 or 29 February. Recompute from the anchor date each time.
Assuming a century year is a leap year 2100 assumed to have 29 February 2100 is divisible by 100 but not 400, so it is a common year. 2000 was divisible by 400 and was a leap year.
Using one day of year table for both year types 1 March always treated as day 60 1 March is day 60 in a common year and day 61 in a leap year. The two diverge from 1 March onward.
Assuming every year has 52 ISO weeks A 53rd week breaking a report A year has 53 weeks when 1 January is a Thursday, or it is a leap year starting on a Wednesday. 2026 has 53.
Subtracting weekend holidays twice A Saturday holiday removed from a weekday count Weekend days are already excluded from a working day count. Only deduct holidays that fall Monday to Friday.

An eighth trap belongs to clocks rather than calendars: a day on which daylight saving time starts or ends is 23 or 25 hours long, so a span expressed in hours can be an hour out even when the day count is right. The Time Zone Converter handles offsets, and the Time Duration Calculator works to the second across dates and times together.

Definitions

Date calculation glossary

The vocabulary you will meet in contracts, scheduling software and technical documentation about dates.

Exclusive counting
Counting the days between two dates as the difference alone, so that 1 January to 2 January is 1 day. It measures elapsed time and is the default in software because differences add up correctly.
Inclusive counting
Counting both the start date and the end date, so that 1 January to 2 January is 2 days. It is the convention for events, stays, tablet counts and many legal deadlines. It equals the exclusive count plus one.
Serial day number
An integer that identifies a calendar date by counting days from a fixed epoch. Converting dates to serial numbers turns date arithmetic into ordinary integer arithmetic and removes month length problems entirely.
Month end clamping
Reducing the day number to the last day of the target month when the original day does not exist there. 31 January plus one month clamps to 28 February in a common year and 29 February in a leap year.
Leap year
A year of 366 days containing 29 February. Under the Gregorian rule a year is a leap year if divisible by 4, unless divisible by 100, unless also divisible by 400. There are 97 in every 400 years.
Common year
A year of 365 days with no 29 February. There are 303 in every 400 year Gregorian cycle. 1900, 2100, 2200 and 2300 are all common years despite being divisible by 4.
Day of the year
The position of a date within its own year, numbered from 1 on 1 January to 365 or 366 on 31 December. Also called the ordinal date. 1 March is day 60 in a common year and day 61 in a leap year.
ISO week
A Monday to Sunday week numbered under ISO 8601, where week 1 is the week containing the year's first Thursday, equivalently the week containing 4 January. Written as 2026-W16.
Week year
The year an ISO week belongs to, which can differ from the calendar year of its individual days. 29 December 2025 sits in week year 2026, and 1 January 2027 sits in week year 2026.
Working day
Any day from Monday to Friday. Also called a business day. Public holidays are deducted separately because there is no calendar of them that applies everywhere.
Proleptic Gregorian calendar
The Gregorian calendar extended backwards to dates before its adoption in 1582. It is what ISO 8601 and almost all software use, so historical dates computed here will not match documents written under the Julian calendar.
Mean Gregorian year
Exactly 365.2425 days, being 146,097 days divided by 400 years. The mean Gregorian month of 30.436875 days is that figure divided by 12, and it is what "average months" means in the results above.

Where to go next

If the gap you care about involves times of day as well as dates, the Time Duration Calculator works to the second across both. To watch a deadline approach live rather than reading a number, set up the Countdown Timer. For a date difference expressed as somebody's age in years, months and days, the Age Calculator applies the conventions people expect for birthdays, including 29 February. When the span crosses regions, the Time Zone Converter sorts out the offsets first. For hours worked rather than days elapsed, use the Hours Calculator, and for general arithmetic on hours, minutes and seconds, the Time Calculator covers the base 60 side of the problem.

Questions

Frequently asked questions

Direct answers to the questions people ask most about this calculation.

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

Convert both dates to a serial day number and subtract the earlier from the later. That gives the exclusive count, the number of midnights crossed. From 1 January 2026 to 2 January 2026 is 1 day. If you want to count both endpoints, add one, giving 2 days. The calculator above shows the exclusive figure by default and adds the end date when you tick the include the end date box.

Is 1 January to 2 January one day or two days?

Both, depending on what you are counting. The gap between them is 1 day, which is the exclusive count and the answer subtraction gives. The two dates together account for 2 calendar days, which is the inclusive count and the answer you want for an event, a hotel stay counted in days rather than nights, or a course that runs on both dates. State which convention you mean whenever money or a deadline depends on it.

What date will it be in 30 days?

Add 30 to the day of the year and look up where it lands. Thirty days is 4 weeks and 2 days, so the result always falls two weekdays later than your start day: a Friday start gives a Sunday. Thirty days is not the same as one month. From 1 January, 30 days gives 31 January but one month gives 1 February, and from 1 February, 30 days lands in March.

Why is 31 January plus one month 28 February?

Because 31 February does not exist, so the day number is clamped down to the last day of the target month. In 2026 that is 28 February, and in a leap year such as 2024 it is 29 February. Every mainstream date library and spreadsheet behaves this way. The side effect is that 29, 30 and 31 January all land on the same date, and subtracting a month afterwards will not return you to the 31st.

How do I count business days between two dates?

Count the complete weeks and multiply by five, then add the working days in the leftover part. A 30 day span is 4 complete weeks, giving 20 working days, plus 0, 1 or 2 more depending on the start weekday, so the answer is between 20 and 22. The calculator does this automatically. Public holidays are not deducted, so list any that fall on a weekday inside the span and subtract them yourself.

Why does the calculator not subtract public holidays?

Because there is no holiday calendar that is correct for everyone. Holidays differ by country, by province or state, by industry and by employer, several move each year because they follow lunar or ecclesiastical rules, and rules about substitute days when a holiday falls at a weekend are not consistent. Getting the weekday count from the tool and deducting your own local holidays takes seconds and is always right.

Is 2100 a leap year?

No. 2100 is divisible by 4, which would normally make it a leap year, but it is also divisible by 100 and not by 400, so the century exception applies and it is a common year with 28 days in February. The year 2000 was divisible by 400 and so was a leap year, and 1900 was not. That means the gap between the leap years 2096 and 2104 will be eight years rather than four.

What exactly is the leap year rule?

A Gregorian year is a leap year if it is divisible by 4, unless it is divisible by 100, unless it is also divisible by 400. That gives 97 leap years in every 400 years and a mean year of exactly 365.2425 days, against a tropical year of about 365.2422. The residual error takes roughly 3,200 years to accumulate to a single day, so no further correction is scheduled.

What day of the year is today's date?

Take the cumulative day count for the end of the previous month and add the day of the month. In a common year the cumulative totals are 31, 59, 90, 120, 151, 181, 212, 243, 273, 304 and 334 through to the end of November. So 15 April in a common year is 90 plus 15, which is day 105. In a leap year every total from the end of February onward is one higher.

Why is 1 March day 60 in some years and day 61 in others?

Because February has 28 days in a common year and 29 in a leap year. January always ends on day 31. Adding February gives day 59 as the last day of February in a common year and day 60 in a leap year, so 1 March is day 60 or day 61 respectively. A single day of year table used for both kinds of year is wrong for 306 days out of 366.

How does ISO 8601 week numbering work?

Weeks run Monday to Sunday, and week 1 is the week containing the year's first Thursday. An equivalent test is the week containing 4 January. Because whole weeks are never split between years, a week can start in December and belong to the next year: Monday 29 December 2025 falls in week 2026-W01. Weeks are written as 2026-W16, with a day number appended as 2026-W16-3 for Wednesday.

Can a year have 53 weeks?

Yes. A year has 53 ISO weeks when 1 January falls on a Thursday, or when it is a leap year and 1 January falls on a Wednesday. Everything else has 52. It happens 71 times in every 400 years, roughly once every five or six years. 2020 and 2026 have 53 weeks, and 2032 and 2037 will too. Retail and payroll calendars built on weeks need to plan for the extra period.

How many working days are there in a year?

Between 260 and 262, before public holidays. A 365 day year is 52 weeks plus one day, giving 260 weekdays plus one more if the leftover day is a weekday. A 366 day leap year is 52 weeks plus two days, so it can reach 262. In practice 2024 had 262 weekdays, 2025 had 261 and 2026 has 261. Deduct your own statutory holidays from these figures.

Does the calculator handle dates before 1582?

Yes, but it uses the proleptic Gregorian calendar, meaning it applies today's rules to every date including those from before the Gregorian calendar existed. That matches ISO 8601 and standard software behaviour, and it keeps the arithmetic consistent. It also means a date recorded in an English document from 1650 will differ from the same label here by ten or eleven days, because that document was using the Julian calendar.