Calculator Problems

How to Calculate the Number of Days Between Two Dates

Finding the difference between two dates sounds simple, but the answer depends on whether you count the end date and on what unit you need. Decide the rule first, then calculate.

Last updated: 2 November 2026

Open Date Calculator →

Step-by-step

  1. Enter the earlier date as the start and the later date as the end.
  2. Run the Date Calculator and read the difference.
  3. Decide whether your use needs the end date included. Add one day if it does.
  4. For weeks, divide the days by seven. For months, remember that month lengths vary, so a day count is more exact.
  5. Check any result that crosses a leap day or a daylight saving change.

A worked example

From 2 November 2026 to 25 December 2026 is 53 days when you count the days between the two dates without including the start. Count both ends and you get 54.

Leap years

A leap year adds 29 February every four years, with the century exceptions. Date tools handle this, but if you calculate by hand, check whether the range crosses 29 February.

Time zones and clock times

When you compare dates with times, a daylight saving change can make a day 23 or 25 hours long. For whole dates, compare the dates in the same time zone.

USE THE TOOL

Finish the task with DevUtilityKits

Use the relevant online utility, check the result, and continue with your development workflow.

Open Date Calculator →Open Business Days Calculator →
FAQ

Frequently asked questions

How many days are between two dates?

Subtract the earlier date from the later one. Add one if you want to include both the start and end date.

Does the calculation handle leap years?

Date tools do. If you calculate by hand, check whether the range includes 29 February.

Why are months hard to compare?

Months have 28 to 31 days, so a month count can differ from a day count. Use days when you need precision.

How do I count only working days?

Use the Business Days Calculator, which counts Monday to Friday.