{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"time-duration"},"result":{"entity_type":"calculator","id":"time-duration","calculator_id":"time-duration","canonical_url":"https://tttkmbb.com/everyday/time-duration","name":"Time Duration Calculator","title":"Time Duration Calculator – Hours and Minutes Between Two Clock Times","category":"everyday","category_name":"Everyday Life","tool_name":"calculate_time_duration","featured_mcp_tool":false,"description":"Computes the elapsed time between a start and an end clock time (24-hour HH:MM), optionally minus a break, handling intervals that cross midnight, and reports it as hours and minutes and as decimal hours.","use_when":"You need the length of a shift, meeting, trip or any interval given two clock times on the same or consecutive days.","do_not_use_when":"The interval spans more than 24 hours or several days (use date-difference), or you need weekly hours and pay (use work-hours).","inputs":[{"name":"start_time","label":"Start time","type":"string","required":true,"description":"Start clock time in 24-hour HH:MM format.","example":"09:30"},{"name":"end_time","label":"End time","type":"string","required":true,"description":"End clock time in 24-hour HH:MM format. An end time earlier than the start time is taken as the next day.","example":"17:45"},{"name":"break_minutes","label":"Break","type":"integer","unit":"min","required":false,"default":0,"min":0,"max":1440,"description":"Unpaid or excluded minutes to subtract from the interval.","example":30}],"outputs":[{"name":"total_minutes","label":"Duration","type":"integer","unit":"min","decimals":4,"description":"Elapsed minutes after subtracting the break."},{"name":"hours","label":"Hours","type":"integer","unit":"h","decimals":4,"description":"Whole hours of the duration."},{"name":"minutes","label":"Minutes","type":"integer","unit":"min","decimals":4,"description":"Minutes beyond the whole hours."},{"name":"decimal_hours","label":"Decimal hours","type":"number","unit":"h","decimals":2,"description":"total_minutes / 60, e.g. for timesheets."},{"name":"duration_text","label":"Duration","type":"string","decimals":4,"description":"Duration as 'h h m min'."},{"name":"gross_minutes","label":"Interval before break","type":"integer","unit":"min","decimals":4,"description":"Minutes from start_time to end_time before subtracting the break."},{"name":"crosses_midnight","label":"Crosses midnight","type":"boolean","decimals":4,"description":"true when end_time is earlier than start_time and was taken as the next day."}],"input_schema":{"type":"object","properties":{"start_time":{"description":"Start clock time in 24-hour HH:MM format.","type":"string","examples":["09:30"]},"end_time":{"description":"End clock time in 24-hour HH:MM format. An end time earlier than the start time is taken as the next day.","type":"string","examples":["17:45"]},"break_minutes":{"description":"Unpaid or excluded minutes to subtract from the interval. Unit: min.","type":"integer","minimum":0,"maximum":1440,"default":0,"examples":[30],"x-unit":"min"}},"additionalProperties":false,"required":["start_time","end_time"]},"output_schema":{"type":"object","properties":{"total_minutes":{"description":"Elapsed minutes after subtracting the break. Unit: min.","type":"integer","x-unit":"min"},"hours":{"description":"Whole hours of the duration. Unit: h.","type":"integer","x-unit":"h"},"minutes":{"description":"Minutes beyond the whole hours. Unit: min.","type":"integer","x-unit":"min"},"decimal_hours":{"description":"total_minutes / 60, e.g. for timesheets. Unit: h.","type":"number","x-unit":"h"},"duration_text":{"description":"Duration as 'h h m min'.","type":"string"},"gross_minutes":{"description":"Minutes from start_time to end_time before subtracting the break. Unit: min.","type":"integer","x-unit":"min"},"crosses_midnight":{"description":"true when end_time is earlier than start_time and was taken as the next day.","type":"boolean"}}},"formula":"gross_minutes = end − start (+ 1440 if end < start); total_minutes = gross_minutes − break_minutes; decimal_hours = total_minutes / 60","method":"Identical start and end times give 0 minutes, not 24 hours. Daylight-saving transitions are ignored.","sources":[{"name":"ISO 8601 – Date and time format (Wikipedia)","url":"https://en.wikipedia.org/wiki/ISO_8601","type":"reference","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"09:30 to 17:45 with a 30-minute break","inputs":{"start_time":"09:30","end_time":"17:45","break_minutes":30},"expected":{"total_minutes":465,"hours":7,"minutes":45,"decimal_hours":7.75,"duration_text":"7 h 45 min","gross_minutes":495,"crosses_midnight":false},"url":"https://tttkmbb.com/api/v1/calculate/time-duration?start_time=09%3A30&end_time=17%3A45&break_minutes=30"},{"name":"Night shift 22:00 to 06:30","inputs":{"start_time":"22:00","end_time":"06:30"},"expected":{"total_minutes":510,"hours":8,"minutes":30,"decimal_hours":8.5,"duration_text":"8 h 30 min","crosses_midnight":true},"url":"https://tttkmbb.com/api/v1/calculate/time-duration?start_time=22%3A00&end_time=06%3A30"}],"faq":[{"q":"How do I enter 12-hour times?","a":"Convert to 24-hour clock first: 5:45 PM is 17:45, 12:30 AM is 00:30."},{"q":"What if the break is longer than the interval?","a":"The calculator returns a CALCULATION_ERROR; check the times or the break length."}],"tags":["time duration","hours between times","time difference","shift length","elapsed time"],"related":[{"calculator_id":"work-hours","reason":"Weekly and monthly hours and pay from the same shift times."},{"calculator_id":"date-difference","reason":"Intervals spanning several days."}],"links":{"html":"https://tttkmbb.com/everyday/time-duration","markdown":"https://tttkmbb.com/everyday/time-duration.md","json":"https://tttkmbb.com/everyday/time-duration.json","api":"https://tttkmbb.com/api/v1/calculate/time-duration","schema":"https://tttkmbb.com/api/v1/calculators/time-duration","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:25:00Z","next_actions":[{"tool":"run_calculator","calculator_id":"time-duration","reason":"Run Time Duration Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/everyday/time-duration.md"}}