Calculate duration between start and end dates in days, business days, hours, or months
Calculate elapsed time between two date columns in days, working days, or hours.
Interactive Sample Data
| ticket_id | opened_at | closed_at |
|---|---|---|
| T-101 | 2026-10-01 | 2026-10-08 |
| T-102 | 2026-10-02 | 2026-10-05 |
| T-103 | 2026-10-03 | 2026-10-18 |
How this tool works
Things that usually go wrong
- If start > end, the result is negative — this is correct and can signal data entry errors.
- Dates must be in ISO format (YYYY-MM-DD) or a recognised format. Standardise dates first.
Edge cases we tested
Returns negative duration or flags row for data validation review.
Outputs null or calculates duration relative to today's date.
Computes fractional days (e.g. 0.5 days for 12 hours).
Frequently Asked Questions
How are partial months counted?
Months are counted as complete calendar months. 2024-01-15 to 2024-03-14 is 1 full month (February), not 2.
Are time components (hours, minutes) included?
If both columns include timestamps, the difference includes the time component in the day count.
How are time components handled when computing date differences?
If timestamps include a time component (e.g. 14:30:00), the difference is computed to the nearest second and expressed as a decimal number of days (e.g. 1.5 = 36 hours).
Can I compute differences in business days (excluding weekends)?
Yes — enable 'Business days only' mode. The tool skips Saturdays and Sundays when counting. Public holidays are not currently excluded.
Related tools
Column to Comma-Separated List
Extract a CSV column and convert it to a comma-separated list for SQL IN clauses or code arrays.
Open Tool →Comma-Separated List to Column
Convert a comma-separated, line-separated, or SQL IN list into a single-column CSV.
Open Tool →Lines to CSV
Convert plain-text newline-delimited records into structured CSV tables.
Open Tool →