๐Ÿ“š Date & time ยท Guide

How to Calculate the Days Between Two Dates (Exact Date Difference)

Find the exact time between two dates in years, months and days, plus total days, weeks, hours and minutes. Learn how to count inclusive dates, handle leap years and use it for deadlines, service and projects.

By RexBD Team 24 Nov 2026 7 min read 1,516 words
How to Calculate the Days Between Two Dates (Exact Date Difference)

How many days until the exam? How long have you worked at your company? How many days late is a payment? How many weeks did a project take? When does a 90-day warranty run out? Questions about the time between two dates come up constantly at work, at school and at home.

Counting on a calendar is slow and surprisingly error-prone, because months have different lengths, leap years add a day and it is easy to forget whether to count the first or last day. The free Date Difference Calculator on RexBD gives the exact answer instantly. This guide shows how to use it and how to avoid the classic counting mistakes.

What the calculator shows

Enter a start date and an end date, and the Date Difference Calculator shows the gap between them:

  • In years, months and days, such as 2 years, 3 months and 14 days.
  • As total days.
  • As total weeks (and remaining days).
  • As total hours and minutes.

You get both the human-friendly version and the precise totals at once.

๐Ÿ“… Free tool ยท no sign-upTry the Date Difference CalculatorFind the exact time between two dates in years, months and days, plus total days, weeks, hours and minutes. Open tool โ†’

How to use it

Step 1: Enter the start date

Pick the first date, such as a joining date, an order date or today.

Step 2: Enter the end date

Pick the second date, such as a deadline, a leaving date or an event date.

Step 3: Read the result

The calculator shows the difference in all its forms. Everything happens in your browser.

Inclusive or exclusive: the most common mistake

Suppose a hotel stay runs from 10 March to 13 March. How many days is that?

  • Counting the difference, it is 3 days (10โ†’11, 11โ†’12, 12โ†’13). That is also 3 nights.
  • Counting every calendar date involved (10, 11, 12 and 13), it is 4 days.

Both answers are correct for different purposes. Date difference calculators, including this one, normally give the first answer: the number of days from one date to the other. If your rule counts both the first and the last day, such as leave applications that say "from 10 to 13 March inclusive", add one day to the result.

Always check how the rule you are following counts. Contracts, leave policies, rental agreements and legal deadlines may define it explicitly.

Ad Kothay

Months and years are tricky

Days and weeks are fixed lengths, but months are not. A "month" can be 28, 29, 30 or 31 days. That makes the years-months-days result a little subtle:

  • From 31 January to 28 February is generally counted as 28 days, but is it "one month"? Calculators treat this kind of edge case using standard calendar rules, and different systems can differ slightly.
  • From 15 January to 15 March is exactly 2 months, though the number of days depends on whether February has 28 or 29 days.

For legal or financial calculations based on months, such as interest periods or notice periods, check the exact convention used in your contract. For most everyday purposes, the calculator's result is exactly what you need.

Leap years

A leap year has 366 days, with 29 February added. Leap years occur every four years, except century years not divisible by 400. So 2024 and 2028 are leap years, 2000 was, but 2100 will not be.

The calculator includes leap days automatically. If your date range crosses 29 February in a leap year, the total days include it.

A worked example: length of service

Sumaiya joined a company on 1 July 2019 and is leaving on 15 November 2026. Her final settlement includes benefits based on length of service.

Entering the dates gives 7 years, 4 months and 14 days, or 2,694 days in total. The HR officer now has an exact figure to apply to the company's policy, instead of an estimate like "about seven and a half years". If the policy counts both the joining and leaving dates, the figure becomes 2,695 days.

Everyday uses

Situation Start date End date
Days until an exam or event Today Event date
Length of employment Joining date Today or leaving date
Project duration Kick-off Delivery
Days a payment is overdue Due date Today
Pregnancy or baby's age Relevant date Today
Warranty or return window remaining Purchase date Today
Loan or deposit period Start Maturity
Visa or permit validity Today Expiry date

For counting forward or backward, such as "what date is 90 days after 1 March?", use Add / Subtract Days instead. For working days only, excluding weekends and holidays, use the Business Days Calculator.

Working days versus calendar days

Many deadlines are set in working days, not calendar days. "Reply within 7 working days" is longer than "within 7 days" because weekends do not count. In Bangladesh, the standard weekend is Friday and Saturday for government offices and many businesses, while international companies may follow Saturday and Sunday. Public holidays also affect working-day counts.

The Date Difference Calculator counts every calendar day. If your rule says working days, use the Business Days Calculator, which lets you choose weekend days and exclude holidays.

Time zones and exact times

The calculator works with dates. If you need the difference between two specific moments, for example from 9:30 PM on one day to 6:15 AM two days later, use the Time Calculator. If the two moments are in different time zones, such as a flight departing Dhaka and arriving in London, convert them to the same zone first with the Time Zone Converter.

Other calendars

In Bangladesh, people also use the Bangla calendar (Bangabda) and the Hijri calendar. To calculate a difference involving those dates, convert them to Gregorian dates first:

Then enter the Gregorian dates in the calculator.

Planning with date differences

Date differences are a quiet but powerful planning tool:

  1. Work backwards from deadlines. If a visa application needs 30 days and your trip is in 45 days, you have 15 days to prepare documents.
  2. Track streaks and habits, such as days since starting an exercise routine.
  3. Plan study time. Divide the days until an exam by the number of chapters to set a daily target.
  4. Set reminders before renewals such as domain names, insurance, trade licences and vehicle papers.
  5. Measure how long tasks really take, to plan future projects more accurately.

For a live countdown on screen, the Countdown Timer counts down to any date and time.

Counting by hand: a reliable method

If you ever need to count without a calculator, this method avoids most errors:

  1. Count whole years first. From 12 April 2021 to 12 April 2026 is exactly 5 years.
  2. Then count whole months. From 12 April 2026 to 12 September 2026 is 5 months.
  3. Then count the remaining days. From 12 September to 30 September is 18 days.
  4. Combine them: 5 years, 5 months and 18 days.

For total days, you can add up the days in each month, remembering that April, June, September and November have 30 days, February has 28 (29 in a leap year) and the rest have 31. The old rhyme "Thirty days hath Septemberโ€ฆ" or the knuckle method (counting months on your knuckles, where knuckles are 31-day months) still helps. But for anything important, use the calculator and compare.

Frequently asked questions

Does the calculator include the start and end dates?

It calculates the difference from the start date to the end date, so 10 to 13 March is 3 days. If your rule counts both dates, add one.

Does it handle leap years?

Yes. Leap days are included automatically.

How do I count only working days?

Use the Business Days Calculator, which excludes weekends and holidays you choose.

Can I calculate days until a future date?

Yes. Use today as the start date and the future date as the end date.

How many days are left in the year?

Set the start date to today and the end date to 31 December. Add one if you want to count today as well.

How many weeks are between two dates?

The calculator shows the total weeks and remaining days. For example, 100 days is 14 weeks and 2 days. Pregnancy, project sprints and course schedules are often counted this way.

Is my data stored?

No. The calculation runs in your browser.

Is the Date Difference Calculator free?

Yes. It is free with no sign-up.

Found this useful?Share it with a friend or colleague who needs it.

Keep reading

More date & time articles
321 free tools, one placeSEO, text, images, code, money, units and design. Private, fast and almost all in your browser.
Ad Kothay