ForHosting KIT · Dates & time

Time calculator

This time calculator turns 5400 seconds into 1:30:00, tidies overflowing hours and minutes, splits any seconds total into days, hours, minutes and seconds, and adds or subtracts two durations. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Operation
Normalize
Hours
1
Minutes
30
Seconds
0
You get
Total seconds
5,400
Days
0
Formatted result
1:30:00

A time calculator for durations, not calendar dates: normalize messy hours and minutes, convert total seconds, and add or subtract two stopwatch-style intervals.

Durations, not clock times

This calculator works with lengths of time, the kind a stopwatch measures, not with dates or times of day, which is why it never needs a calendar or a time zone. You can type the parts the way they come to you, such as ninety minutes, and the calculator reduces everything to a total of seconds before splitting it again into days, hours from 0 to 23, and minutes and seconds from 0 to 59. Parts you leave empty count as zero. The result also comes in a compact form such as 1:30:00, with minutes and seconds always written with two digits and the days in front once the total reaches a full day.

Four everyday jobs it handles

Tidy up an awkward total, such as a training log that adds up to ninety minutes, into one hour and thirty minutes. Turn a long counter of seconds from a recording, a kitchen timer or a sensor into hours and minutes you can read at a glance. Add two intervals, like the sets of a workout, or subtract the time already used from a planned block when one shift hands over to the next. Only whole numbers are accepted, so there is no rounding noise, and a subtraction that would go below zero is rejected rather than turned into a misleading answer.

Normalize any mix of hours, minutes and seconds

Feed hours, minutes and seconds that may exceed sixty — ninety minutes becomes one hour thirty minutes. The tool reduces everything to total seconds and then splits into days, hours zero through twenty-three, minutes and seconds zero through fifty-nine with a stable pretty string.

Workouts and intervals

Add set durations or normalize a total training time.

Media and recipes

Convert a long second counter into hours and minutes.

Shift handovers

Subtract remaining time from a planned block without a calendar.

Can minutes be greater than 59?

Yes on input. Output minutes are always normalized 0–59.

What does pretty look like?

H:MM:SS, or Nd HH:MM:SS when days are greater than zero.

Are floats allowed?

No. Counts must be non-negative integers or digit strings.

How do I subtract one duration from another?

Choose subtraction and enter both durations as hours, minutes and seconds; the second is taken away from the first. If the second is longer the result would be negative, so the calculator refuses it instead of showing a wrong time.

How do I turn a number of seconds into hours and minutes?

Use the option that starts from total seconds. 5400 seconds come back as 1 hour, 30 minutes and 0 seconds, written 1:30:00, and totals of a day or more also show the number of days.

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.

POSThttps://api.kit.forhosting.com/dev/time-calculator

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.

curl -X POST https://api.kit.forhosting.com/dev/time-calculator \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"op":"normalize","hours":0}'
{
  "op": "normalize",
  "hours": 0
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "dev.time_calculator",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_total_seconds999999999999
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Pure integer seconds, no system clock, identical results in browser and API.

From total seconds and back

from_seconds takes a non-negative total and returns the same breakdown and pretty form. That is ideal for logs and sensors that only store epoch-less second counters and need a human-readable duration without floating-point noise.

Add and subtract two durations

Defaults of zero let you omit unused components. No floats or booleans are accepted as counts. add sums two independent h/m/s triples; sub subtracts B from A and rejects a negative result with typed invalid_input.

Pretty format and hard errors

When days are zero, pretty looks like H:MM:SS with minutes and seconds zero-padded. With one or more days it uses Nd HH:MM:SS. Missing total_seconds in from_seconds, unknown ops, non-integers and negative components return invalid_input with stable match substrings.

Automated checks

Assert total_seconds and pretty in CI fixtures.

Is this a date difference tool?

No. It only handles durations. Use date_diff for calendar dates.

Can subtraction go negative?

No. It returns invalid_input.

Is it free in the browser?

Yes. The native app uses the API at $0.002.

Read the full KIT documentation →