{"id":67140,"date":"2026-10-20T09:52:00","date_gmt":"2026-10-20T06:52:00","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=67140"},"modified":"2026-10-23T09:58:44","modified_gmt":"2026-10-23T06:58:44","slug":"time-duration-calculator","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/life\/time-duration-calculator\/","title":{"rendered":"Hours Calculator \u2013 Time Between Two Times"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Find the Time Between Two Times<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"67140\" data-favorite-title=\"Time Duration\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/life\/time-duration-calculator\/\" data-favorite-excerpt=\"Find the time between a start and end time, with optional dates and a break to subtract. Enter times in 24-hour or 12-hour (AM\/PM) format.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-date\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/life\/time-duration-calculator\/\" method=\"POST\" class=\"calculator\" id=\"calculator-67140\" data-post=\"67140\"><fieldset class=\"fieldset-input is-2\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field\" id=\"input-1\"><label for=\"field-1\">Time Format<\/label><div class=\"grid grid-cols-1\"><select id=\"field-1\" name=\"time_format\"><option value=\"24h\" selected>24-hour<\/option><option value=\"12h\">12-hour (AM\/PM)<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field\" id=\"input-2\"><label for=\"field-2\">Start Time<\/label><input type=\"text\" name=\"start_time\" id=\"field-2\" aria-describedby=\"calc-info-2\" placeholder=\"09:00 or 09:00:30\" step=\"any\" value=\"09:00\"\/><small id=\"calc-info-2\">Use HH:MM or HH:MM:SS. In 12-hour mode, add AM or PM, such as 9:00 AM.<\/small><\/div><div class=\"field\" id=\"input-3\"><label for=\"field-3\">End Time<\/label><input type=\"text\" name=\"end_time\" id=\"field-3\" aria-describedby=\"calc-info-3\" placeholder=\"17:30 or 17:30:45\" step=\"any\" value=\"17:30\"\/><small id=\"calc-info-3\">If both dates are blank and this time is earlier than the start time, it is treated as the next day.<\/small><\/div><div class=\"field\" id=\"input-4\"><label for=\"field-4\">Start Date (optional)<\/label><input type=\"date\" name=\"start_date_optional\" id=\"field-4\" aria-describedby=\"calc-info-4\" step=\"any\"\/><small id=\"calc-info-4\">Leave both dates blank for a time-only calculation. If you enter just one date, it is used for both times.<\/small><\/div><div class=\"field\" id=\"input-5\"><label for=\"field-5\">End Date (optional)<\/label><input type=\"date\" name=\"end_date_optional\" id=\"field-5\" aria-describedby=\"calc-info-5\" step=\"any\"\/><small id=\"calc-info-5\">Enter both dates for a multi-day duration. When a date is supplied, an end before the start produces an error.<\/small><\/div><div class=\"field\" id=\"input-6\"><label for=\"field-6\">Break to Subtract<\/label><input type=\"text\" name=\"break_to_subtract\" id=\"field-6\" aria-describedby=\"calc-unit-6 calc-info-6\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"30\"\/><div class=\"unit\" id=\"calc-unit-6\">min<\/div><small id=\"calc-info-6\">Whole minutes to subtract from the elapsed time; enter 0 for no break.<\/small><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"67140\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Your Time Duration<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>Duration (h:mm:ss)<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-2\"><span class=\"field-title\"><span>Total Hours (Decimal)<\/span><\/span><span class=\"field-value\" id=\"result-2\" data-unit=\"h\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-3\"><span class=\"field-title\"><span>Total Minutes<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-4\"><span class=\"field-title\"><span>Total Seconds<\/span><\/span><span class=\"field-value\" id=\"result-4\" data-unit=\"s\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-5\"><span class=\"field-title\"><span>Days, Hours and Minutes<\/span><\/span><span class=\"field-value\" id=\"result-5\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-6\"><span class=\"field-title\"><span>Date and Break Details<\/span><\/span><span class=\"field-value\" id=\"result-6\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"67140\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>Time Duration Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[T=86{,}400(D_e-D_s)+(t_e-t_s)-60B\\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(T\\) \u2014 duration after subtracting the break, in seconds<\/li>\n<li>\\(D_e-D_s\\) \u2014 number of calendar days between the end and start; when dates are blank, this is 1 if the end time is earlier than the start time, or 0 otherwise<\/li>\n<li>\\(t_e\\) and \\(t_s\\) \u2014 end and start times, measured in seconds after midnight<\/li>\n<li>\\(B\\) \u2014 break to subtract, in whole minutes<\/li>\n<\/ul>\n<p>The formula finds elapsed time across the relevant calendar days, then subtracts the break. Each calendar day is treated as exactly 24 hours.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>Time Duration \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> using the default values, a period starts at 09:00 and ends at 17:30 on the same day, with a 30-minute break.<\/p>\n<p>\\[T=(17\\times3{,}600+30\\times60)-(9\\times3{,}600)-30\\times60=28{,}800\\text{ seconds}\\]<\/p>\n<p><strong>Result:<\/strong> 8:00:00, or 8.00 total hours, 480.00 total minutes and 28,800 total seconds.<\/p>\n<p>\n\r\n<\/section>\n<h2>How to use the calculator<\/h2>\n<ol>\n<li>Choose <strong>Time Format<\/strong>: 24-hour or 12-hour (AM\/PM). Use the same format for both times.<\/li>\n<li>Enter <strong>Start Time<\/strong> and <strong>End Time<\/strong>. Use hours and minutes, such as <code>09:00<\/code> and <code>17:30<\/code>, or include seconds, such as <code>09:00:30<\/code>. In 12-hour mode, add AM or PM, as in <code>9:00 AM<\/code>.<\/li>\n<li>Leave <strong>Start Date (optional)<\/strong> and <strong>End Date (optional)<\/strong> blank for a time-only calculation. To measure an interval spanning multiple days, enter both dates. If you enter only one date, the calculator uses it for both times.<\/li>\n<li>Enter <strong>Break to Subtract<\/strong> in whole minutes. The default is 30 minutes; enter 0 if there is no break.<\/li>\n<li>Read <strong>Duration (h:mm:ss)<\/strong> for the time after the break. The results also show decimal hours, total minutes and total seconds. Check <strong>Date and Break Details<\/strong> to see how dates and any break were handled.<\/li>\n<\/ol>\n<h2>What a time duration means<\/h2>\n<p>A time duration is the amount of time between two points, rather than the clock time at either point. This calculator first measures the elapsed interval and then subtracts the break you entered. It can be useful for checking a shift, a study session, a journey or any other period where part of the elapsed time should not count.<\/p>\n<p>The <strong>Duration (h:mm:ss)<\/strong> result keeps hours as a running total: a 26-hour interval appears as 26:00:00, not 2:00:00. <strong>Total Hours (Decimal)<\/strong> expresses the same duration in hours rounded to two decimal places. For example, 8 hours 30 minutes is 8.50 hours, not 8.30 hours. Total minutes is also displayed to two decimal places, so seconds can contribute a fraction of a minute.<\/p>\n<p>When you provide dates, <strong>Days, Hours and Minutes<\/strong> separates the resulting duration into complete 24-hour days and the time remaining. It also includes seconds when needed. Without dates, this extra breakdown is hidden; use the h:mm:ss result even if an overnight interval crosses midnight.<\/p>\n<h2>Dates, overnight periods and practical limits<\/h2>\n<p>If both dates are blank and the end time is earlier than the start time, the calculator assumes the end is on the next day. For example, 22:00 to 02:00 is four hours before any break is subtracted. If the two times are identical and no dates are entered, the elapsed time is zero\u2014not a full day. To specify a full-day or longer interval, enter both dates.<\/p>\n<p>Once a date is supplied, there is no automatic next-day assumption. An end date and time earlier than the start produces an error, including when only one date is entered and the end time is earlier. The break must be a non-negative whole number of minutes and cannot exceed the elapsed time.<\/p>\n<p>Calendar days are treated as exactly 24 hours. The calculation does not account for time zones or daylight-saving clock changes, so an interval crossing one of those changes may differ from the actual time elapsed. For travel planning, you can compare a calculated journey length with the <a href=\"https:\/\/wpcalc.com\/en\/life\/road-trip-arrival-time-calculator\/\">Road Trip Arrival Time Calculator<\/a>. If you need to estimate a charge based on the length of a stop, see the <a href=\"https:\/\/wpcalc.com\/en\/life\/parking-cost-calculator\/\">Parking Cost Calculator<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find the time between a start and end time, with optional dates and a break to subtract. Enter times in 24-hour or 12-hour (AM\/PM) format.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6],"tags":[20],"class_list":["post-67140","post","type-post","status-publish","format-standard","hentry","category-life","tag-date"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=67140"}],"version-history":[{"count":2,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67140\/revisions"}],"predecessor-version":[{"id":67448,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67140\/revisions\/67448"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=67140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=67140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=67140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}