Skip to content

Date Calculator

Creator

Muhammad Awais, Startup Mentor

Reviewer

Sufi Inam Ul Hassan, Founder
Updated

Days between two dates

Add or subtract from a date

Direction

This day calculator between two dates finds the number of days, weeks, months and years between two dates, giving a plain date calculator years months days breakdown of the same span, or works as a date add subtract calculator that adds and subtracts a duration from a single date to answer a simple what date will it be question and find the resulting day of the week. Both tools are stacked below as separate cards, each with its own Calculate button.

Nothing is uploaded anywhere: every date stays in your browser, and the rules used for the calendar math, including the Gregorian calendar's own leap-year rule, are explained below rather than hidden behind the calculator.

How "Days Between Two Dates" works, with a worked example

This tool counts the calendar days from a start date to an end date, working as a straightforward date difference calculator, then reads that same span back three ways: as a plain day total, as years, months and days, and as weeks and days.

By default the end date itself is not counted, matching how most people mean "how many days until." Switching on "include the end date" adds one more day, useful when the question is really about a span that was fully lived through rather than a countdown to a single day. Set the start date to today and it works as a plain days from today calculator or days until calculator counting down to something ahead, and set both dates in the past for a quick how many days between dates check on something that has already happened.

Worked example. Start date March 1, 2026 and end date March 31, 2026, with the end date not included, is exactly 30 days apart. Switching on "include the end date" adds March 31 itself to the count, for 31 days. The same 30-day span also reads as 0 years, 0 months and 30 days, the way a months between two dates calculator would break it down, or as 4 weeks and 2 days, the same figure a weeks between two dates calculator would show, two different ways of expressing an identical gap. For a June 1 to July 1, 2026 range (30 days, end date not included), ticking Juneteenth in Settings drops the count to 29 days, since June 19 falls inside that range and is excluded.

How adding months and years works

Months and years are not a fixed number of days, a month can be 28, 29, 30 or 31 days long, so this calculator handles them with calendar arithmetic rather than day counting, working as an add months to date calculator and an add years to date calculator together, since both need the same month-and-year-first handling. It moves the start date forward or backward by whole months first, based on the month and year alone, then checks whether the original day still exists in that new month.

Worked example. Take January 31, 2024 and add 1 month. Moving forward one calendar month lands on February, but February 2024 only has 29 days (2024 is a leap year), so there is no February 31. Rather than rolling past the end of February into March, or returning an error, the calculator clamps the day down to the last real day of the target month: the result is February 29, 2024. The same calculation in a common year, such as January 31, 2023 plus 1 month, clamps to February 28, 2023 instead, since 2023 is not a leap year and February only holds 28 days.

This clamping rule is the standard convention most calendar tools use, rather than rolling extra days into the next month. The same clamping applies across a leap day: February 29, 2024 plus 1 year lands on February 28, 2025, since 2025 has no February 29 for the day to land on.

How days and weeks are added on top

Once the month and year portion of the calculation is settled and the day has been clamped if needed, the calculator adds or subtracts the days and weeks portion as a straightforward day count on top of that date. A week is simply treated as 7 days for this step, so whether it is used as an add weeks to date calculator or a plain "add 2 weeks" versus "add 14 days" comparison, the two always give the identical result. This part of the calculation never depends on time zone, since every date here is a calendar day, not a specific time of day.

The order matters. Start from January 30, 2023 and apply "1 month and 1 day." Doing months first: January 30 plus 1 month clamps to February 28, 2023, then adding 1 day gives March 1, 2023. Doing days first instead: January 30 plus 1 day is January 31, 2023, and adding 1 month from there also clamps to February 28, 2023, since February has no 31st day. The two orders land a full day apart, purely because of which operation hit the shorter month first, so this calculator always applies months and years before days and weeks.

Date calculator vs. day counter calculator

This page and the day counter calculator both answer a "how many days" question, and the overlap is intentional rather than accidental: splitting it into a plain weekday counter and a fuller Days Between Two Dates tool matches how people actually search for it. Use the day counter calculator when what you need is a working-day count, Monday through Friday, with no holiday list involved. Use Days Between Two Dates, above, as a date calculator with holidays when a specific U.S. federal holiday might fall inside your range and needs excluding, or when you want that same span read back as years, months and days as well as weeks and days. The Add or Subtract from a Date tool in the second card below, effectively a date duration calculator in its own right, answers a third question instead: given one date and a length of time, what date do you land on.

A brief history of the Gregorian calendar

Every date this calculator works with follows the Gregorian calendar, the calendar in near-universal civil use today. It replaced the Julian calendar, introduced by Julius Caesar in 45 BC, which added a leap day every four years with no exception. That rule overcounted the true length of a year by about 11 minutes, a small drift that had added up to 10 days by the 1500s, pulling the calendar noticeably out of step with the seasons.

Pope Gregory XIII fixed it in 1582, in two parts. First, 10 days were dropped outright: in the countries that switched immediately, Thursday, October 4, 1582 was followed the next day by Friday, October 15, 1582. Second, the leap-year rule was tightened: a year divisible by 4 is still a leap year, but a century year, one divisible by 100, is a leap year only if it is also divisible by 400. That is why 2000 was a leap year but 1900 and 2100 are not, even though all three divide evenly by 4.

Adoption was slow and uneven. Catholic countries such as Spain, Portugal and Italy switched within the year; Britain and its American colonies held out until 1752, dropping 11 days instead of 10; Russia did not switch until 1918. That drawn-out, country-by-country adoption is part of why a single historical date can read differently depending on which calendar the original source used.

U.S. federal holidays for 2026 and 2027

The table below lists all 11 U.S. federal holidays for the next two years, doubling as a quick us holidays calculator reference and a holiday date calculator for whichever one you need, useful both for planning ahead and for the holiday-exclusion Settings on the tool above. Floating holidays such as Memorial Day and Labor Day are calculated from the actual calendar rather than looked up from a fixed list, so they stay correct in every future year too, not only these two.

US federal holidays in 2026 and 2027 with the weekday each falls on
Holiday20262027
New Year's DayThursday, January 1Friday, January 1
Martin Luther King Jr. DayMonday, January 19Monday, January 18
Presidents' DayMonday, February 16Monday, February 15
Memorial DayMonday, May 25Monday, May 31
JuneteenthFriday, June 19Saturday, June 19
Independence DaySaturday, July 4Sunday, July 4
Labor DayMonday, September 7Monday, September 6
Columbus DayMonday, October 12Monday, October 11
Veterans DayWednesday, November 11Thursday, November 11
ThanksgivingThursday, November 26Thursday, November 25
ChristmasFriday, December 25Saturday, December 25

Common uses for this calculator

Adding or subtracting a duration from a date comes up constantly, usually under time pressure:

  • Deadlines and due dates. "This invoice is due 30 days from today" is a plain add days to date question, the same one people mean when they search for a way to find date after adding days, and the month-end clamping matters whenever the start date falls near the end of a month.
  • Contract and lease terms. A one-year lease signed on February 29 needs a clear rule for its first anniversary in a year without one, exactly the clamping this calculator applies.
  • Reverse-engineering a past date. Subtracting works the same way in reverse, the same idea behind a days ago calculator, useful for medical, legal or financial questions that reference a window before a known event.

Frequently asked questions

Why does Jan 31 plus 1 month become Feb 28 or 29 instead of an error?

February never has a 31st day, so "Jan 31 plus 1 month" has no exact calendar match. This calculator follows the standard convention used by most date tools: it clamps the day down to the last real day of the target month, February 28 in a common year or February 29 in a leap year, rather than rolling forward into March or refusing to answer.

Does "Days Between Two Dates" count the start and end date, or just the days in between?

By default it counts from the start date up to, but not including, the end date, so January 1 to January 8 comes to 7 days. Turning on "include the end date" adds one more day to the count, 8 days for that same range, which is usually what you want when measuring a span you lived through rather than counting down to a single destination day. The start date itself is always the first day counted either way.

What does excluding a holiday in Settings actually remove from the day count?

Ticking a holiday removes exactly one day, that holiday's actual calendar date in whichever year your range spans, from the total, but only if that date falls inside the range you entered. It has no effect on the years/months/days or weeks/days breakdown, which always describes the plain calendar span, and it does not remove weekends, only the specific named holidays you tick. Ticking a holiday whose date falls outside your range changes nothing.

How is this different from the day counter calculator?

This page and the day counter calculator both count days between two dates, and that overlap is intentional: splitting it into a plain weekday counter and a fuller Days Between Two Dates tool matches how people actually search for it. Use the day counter calculator for a working-day count, Monday through Friday, with no holiday list involved. Use Days Between Two Dates, on this page, when a specific U.S. federal holiday might fall inside your range, or when you want the same span read back as years, months and days as well as weeks and days. The Add or Subtract from a Date card answers a third question: given one date and a length of time, what date results.

Does the order matter if I add both months and days?

Yes, on the Add or Subtract from a Date card. This calculator always applies months and years first, with day clamping, and then adds days and weeks on top of that already-clamped date. Doing it in the other order can land on a different final date whenever the calculation crosses a month with a different length, so the order is fixed rather than left to chance.

Can I subtract a duration instead of adding one?

Yes. On the Add or Subtract from a Date card, switch the toggle to "Subtract" and the same fields work backward: months and years are subtracted first with the same day-clamping rule, then days and weeks are subtracted from that intermediate date. That is exactly how to subtract days from date, weeks, months or years in one step, without doing the calendar arithmetic by hand.

Why does Thanksgiving fall on a different date every year?

Thanksgiving is defined as the fourth Thursday of November, not a fixed date, so it moves within a roughly week-long window depending on which weekday November 1 falls on. The same floating-date approach applies to several other holidays in the table above: Memorial Day is always the last Monday of May, Labor Day the first Monday of September, and Columbus Day the second Monday of October. Fixed-date holidays like Independence Day (July 4) and Christmas (December 25) do not move, but still land on a different day of the week each year.

How to find the days between two dates by hand?

Count the days left in the first month, add the days in every full month between, then add the days elapsed in the last month. Whether the start or end day counts is a convention, so decide it before you compare answers. The Days Between Two Dates card does all of it in one step.

What is the date 90 days from today?

Use the add or subtract card: choose Add, enter 90 days and read the result. For reference, 30 days from today, 60 days from today and 90 days from today land on the same weekday shifted by 2, 4 and 6 days, because 30, 60 and 90 leave remainders of 2, 4 and 6 when divided by 7.

Can this work as a business days calculator or a working days calculator?

Partly. The Days Between Two Dates card can exclude US federal holidays in Settings, which removes those days from the count. For weekdays only, subtract the weekend days yourself: a full week holds 5 working days and 2 weekend days.

How many weeks between two dates, and how many months between two dates?

Divide the day count by 7 for weeks, and read the months figure from the years-months-days breakdown, which counts whole calendar months. A date difference calculator that reports only days will not give the same months figure, because months have unequal lengths.

How to add months to a date when the day does not exist?

If the target month is shorter, the result lands on its last day: January 31 plus one month is February 28, or 29 in a leap year. That is how a date plus months calculator avoids an invalid date such as February 31.

Is there a date duration calculator that shows years, months and days?

Yes. The Days Between Two Dates card reports the span as years, months and days as well as total days, so it works as a date duration calculator.

Related tools: Hours Calculator, Time Calculator and Time Duration Calculator. More are grouped under Everyday Calculators, and every tool on the site is listed at all calculators.