Desmarto

Formula

End Time − Start Time = Duration

If end time is earlier than start time and 'Crosses midnight' is enabled, 24 hours are added to the end time. Equal start and end times produce zero duration.

Example: Standard Work Day

Start09:00
End17:30
Result8h 30m

Tips

  • The parser accepts both 12-hour and 24-hour formats regardless of the output setting.
  • Enable 'Crosses midnight' for overnight shifts or events.
  • Enable 'Include seconds' for precise timing.
  • Results update automatically as you type.

Frequently Asked Questions

How do I calculate overnight duration?

Enable the 'Crosses midnight' option. This tells the calculator that the end time is on the following day, so it adds 24 hours to the end time before calculating the difference.

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

If 'Crosses midnight' is enabled, the calculator assumes the end time is the next day. If disabled, it will show an error asking you to enable 'Crosses midnight'.

Can I use AM/PM format?

Yes. The parser accepts both 12-hour (AM/PM) and 24-hour formats regardless of the output format setting. The format toggle only controls how results are displayed.

How accurate is the calculation?

The calculation is exact to the second. Enable 'Include seconds' to see seconds in the result. The internal calculation uses integer seconds to avoid floating-point errors.

Can I share my calculation?

Yes. Click 'Share Link' to copy a URL that includes your inputs. Anyone with the link will see the same calculation.

Related Tools

Last reviewed: July 17, 2026