Add hours to a time
Add hours to a time of day and get the new clock time plus the number of midnights crossed: 14:30 plus 5 hours is 19:30 the same day. Fractions work too, so 1.5 hours adds 90 minutes. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Time
- 14:30
- Hours
- 5
- Time
- 14:30:00
- Result time
- 19:30:00
- Day offset
- 0
- Hour
- 19
Adding hours to a time of day is a daily chore: a shift that starts at fourteen thirty and lasts eight hours, a roast that needs three and a half hours after a ten-fifteen start, a meeting that runs six hours past nine in the morning, a parking window that expires after two hours. This adding-hours calculator takes a clock time and a number of hours, then returns the new clock face and how many midnights you crossed. It is not a duration summer and not a calendar-date adder: the day is a circle of twenty-four hours, the offset is a signed day count, and nothing consults a system clock, a time zone, or daylight-saving tables.
What adding hours to a clock time actually computes
Adding hours to a clock is modular arithmetic on a twenty-four-hour circle, not a stopwatch sum and not a calendar walk. You begin with a time of day — fourteen thirty, nine fifteen, twenty-two forty-five — convert that clock to seconds after midnight, add the hour offset converted to seconds, then split the total with floor division. Fractional hours become minutes and seconds: one and a half hours after fourteen hundred is fifteen thirty.
Duration tools that add ninety minutes to seventy-five minutes answer a different search: they produce a length, not a clock face. Calendar tools that add ten days to a date answer another search: they move a civil date, not a time of day. This page is only the clock-plus-hours problem, with a signed midnight count you can show next to the result.
Where a clock-plus-hours calculator earns its keep
Shift planners add eight or twelve hours to a start clock to print a finish time and to flag whether the block spilled into the next calendar day. Kitchen timers and parking apps add a fractional roast or meter window to a start clock without dragging in a timezone library. Travelers add a layover or a drive length to a departure clock to see a local arrival face and a day wrap, then pair that result with a dedicated timezone tool if they also changed offsets.
Nurses and caregivers add dosing intervals to a last-taken clock and need the next clock plus a next-day flag when the interval crosses midnight. Teachers and exam-prep sites need a deterministic oracle that marks 22:00 plus five hours as 03:00 the next day, not as a twenty-seven-hour clock. Pair this calculator with a duration summer when you need to combine stopwatch blocks, and with a date-plus-days tool when you need a civil date rather than a clock face.
What you can do with it
Shift finish times and overnight flags
Add a planned shift length to a start clock and show the finish time plus a next-day flag when the block crosses midnight.
Kitchen, parking, and dosing timers
Add a roast, meter window, or medication interval to a start clock and read the new face without a timezone library.
FAQ
How do I add hours to a time of day?
Send time as a clock string (14:30, 14:30:00, or 2:30 PM) and hours as a finite number.
Can I subtract hours or add a fraction of an hour?
Yes. Negative hours walk backward. Fractional hours become minutes and seconds after rounding hours times 3600, so 1.5 hours after 14:00 is 15:30:00.
Which time formats does the adding-hours calculator accept?
Twenty-four-hour HH:MM or HH:MM:SS from 00:00 to 23:59, and twelve-hour clocks with AM or PM.
What happens when the result passes midnight?
The clock wraps around and the result tells you how many days it moved. For example, 22:00 plus 5 hours gives 03:00 with a day offset of one, meaning the next day.
Does the calculator adjust for time zones or daylight saving time?
No. It treats the day as a plain 24-hour circle and never looks at time zones or daylight saving rules. If you also changed time zones, adjust the result with a dedicated time zone tool.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/life/adding-hours \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"time":"14:30","hours":5}'const res = await fetch("https://api.kit.forhosting.com/life/adding-hours", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"time": "14:30",
"hours": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/life/adding-hours",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"time": "14:30",
"hours": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/life/adding-hours", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"time":"14:30","hours":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"time":"14:30","hours":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/life/adding-hours", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"time": "14:30",
"hours": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "life.adding_hours",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs_hours | 100000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Invalid clocks and non-numeric hour offsets fail with invalid_input and are not billed. Successful API calls use the published $0.002 base price.
What adding hours to a clock time actually computes
The remainder becomes the new clock; the quotient becomes day_offset. Five hours after twenty-two hundred is three in the morning on the next day, so result_time is 03:00:00 and day_offset is one. Five hours before two in the morning is twenty-one hundred on the previous day, so day_offset is negative one. Forty-eight hours after ten o'clock is still ten o'clock, but day_offset is two.
Input contract, wrapping midnight, and the response shape
Negative hours subtract and walk backward through midnight. The absolute magnitude of hours is capped at one hundred thousand so a typo cannot request a century of wraps. Missing time, a clock such as 25:00 or 9:70, or hours that is not a number are typed failures and are not billed. POST a JSON body with two required fields. time is the base clock as a string: twenty-four-hour HH:MM or HH:MM:SS from 00:00 to 23:59, or a twelve-hour clock with AM or PM such as 2:30 PM. Aliases start_time, clock, base_time, and from are accepted so spreadsheets and typed forms can reuse the same contract. hours is a finite number of hours to add; aliases add_hours, h, and hours_to_add are accepted. Integers, decimals, scientific notation, and numeric strings all parse; booleans, arrays, objects, empty strings, Infinity, and NaN fail with invalid_input naming hours. Zero hours returns the same normalized clock with day_offset zero. On success the body echoes the normalized twenty-four-hour time, the parsed hours value, result_time as HH:MM:SS, day_offset as a signed integer, the broken-out hour, minute, and second, added_seconds after rounding hours times three thousand six hundred, and a short day_label (same day, next day, previous day, or N days later or earlier). Example: time 14:30 and hours 5 yields result_time 19:30:00 and day_offset 0. Example: time 22:00 and hours 5 yields result_time 03:00:00 and day_offset 1.
Where a clock-plus-hours calculator earns its keep
On this page the work runs entirely in your browser; through the API each successful wrap costs $0.002, failed validation is not charged, and nothing is stored after the response returns.
Integration use cases
Homework keys and roster fixtures
Assert result_time and day_offset in exam keys and continuous-integration fixtures that must not depend on the machine clock.
Technical questions
What happens when the result passes midnight?
The clock wraps on a twenty-four-hour circle. 22:00 plus five hours is 03:00:00 with day_offset 1 (next day). Negative hours that cross midnight yield a negative day_offset.
What does adding hours to a time cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.