Date and Time Calculator

Use this free time date calculator to calculate datetime duration between any two moments. Pick a start date and time and an end date and time, and the calculator instantly shows the exact gap as days, hours, minutes and seconds — plus handy totals like total hours and total minutes. Whether you call it a datetime calculator, a time and date calculator or a day estimator, the job is the same: no manual counting, no mistakes.

Quick answer: To calculate datetime duration, subtract the earlier moment from the later one and split what remains into days, hours, minutes and seconds. From January 1, 2026, 9:00 AM to January 15, 2026, 6:30 PM is exactly 14 days, 9 hours and 30 minutes — the calculator above works this out instantly for any two moments.

How to use this calculator

  1. Enter the start date and time.
  2. Enter the end date and time.
  3. Read the result — the breakdown and the totals update instantly.
  4. Use "Swap dates" if you entered them the wrong way round, or "Set end to now" to measure from a past moment until right now.

Example

From January 1, 2026 at 9:00 AM to January 15, 2026 at 6:30 PM is 14 days, 9 hours and 30 minutes — that is 345 total hours, 20,730 total minutes and 1,243,800 total seconds.

What this day estimator can work out

  • Days between two dates, including the time of day
  • Total hours, minutes or seconds between two moments
  • How long until a deadline, event or appointment
  • How much time has passed since a date (project timelines, billing periods and more)

How the duration is worked out

To calculate datetime duration, this calculator measures the exact time between the two moments you enter. It first finds the whole days between them, then breaks what is left into hours, minutes and seconds, so you can read the answer at whatever size you need.

The totals underneath restate the same span in a single unit — total hours, total minutes or total seconds — which is handy when you calculate datetime duration for billing, logging and planning. If the end moment is earlier than the start, the calculator still shows the distance between the two moments and tells you the order was reversed, instead of showing a negative number. Times are counted exactly as entered, in one place, so daylight-saving changes do not distort the result.

The simple method behind the calculation

Every duration is really one long count of seconds. To find the gap between two moments, the calculator turns each moment into a total: the days counted from a fixed starting point, multiplied out into hours, minutes and seconds, plus the time of day. Subtracting the smaller total from the larger one gives the whole gap in seconds. That single number is then divided back into days (86,400 seconds each), hours (3,600 seconds), minutes (60 seconds) and whatever seconds remain. This is why the answer never drifts: there is no rounding until the final display, and partial days are kept exactly instead of being rounded up or down. It is the same method computers use internally whenever they store a date and time, often written in the standard ISO 8601 format.

Worked examples

A project starts on March 3, 2026 at 10:00 AM and ends on March 17, 2026 at 4:45 PM. The gap is 14 days, 6 hours and 45 minutes — 342.75 hours in total, or 20,565 minutes.

A flight leaves at 9:40 PM and lands at 6:15 AM the next morning. The flying time is 8 hours and 35 minutes: 2 hours 20 minutes until midnight, plus 6 hours 15 minutes after it.

And direction does not matter. From June 1, 2026 at noon to June 10, 2026 at noon is exactly 9 days — and entered the other way round, June 10 back to June 1, it is still 9 days, with a note that the order was reversed.

Common mistakes to avoid

The first is the clock: forgetting whether a time is AM or PM moves the answer by 12 hours. The second is the calendar: assuming every month has 30 days throws a count off by one to three days, because real months run from 28 to 31 days. The third is rounding — treating 1 day and 20 hours as "about 2 days" loses 4 hours, which matters for billing and deadlines. And the fourth is date format: 03/04 means March 4 in the United States but 3 April in much of the rest of the world, so always check which way round a written date is meant.

Pro tips

  • When a period crosses midnight, count the date change as well as the hours — most datetime mistakes come from forgetting that the day rolled over.
  • For deadlines, work backwards from the end date instead of forwards from today — it is much easier to spot a weekend or holiday sitting in the middle.

Frequently asked questions

How do I calculate datetime duration between two dates?

Enter both dates with their times above. The calculator subtracts the earlier moment from the later one and breaks the answer into days, hours, minutes and seconds, with totals for each unit.

Does this calculator count partial days?

Yes. Because it uses the exact times you enter, a gap of 1 day and 6 hours is shown as exactly that — not rounded up to 2 days.

What if the end date is earlier than the start date?

The calculator still shows the duration between the two moments and adds a small note so you know the order was reversed.

Is this date and time calculator free?

Yes, it is completely free and works on phones, tablets and computers with no sign-up.

Can I calculate how many hours are between two dates?

Yes — the results table includes total hours (and total minutes and seconds) between any two dates and times.

More calculators

Try our other free tools: Add Days Calculator, Days Until Calculator, Time Calculator, Count Days Calculator, Time Card Calculator

See all of our Date and Time Calculators