ForHosting KIT · Dates & time

Difference in minutes between two datetimes

From midnight to half past one on 1 January 2024, both in UTC, 90 minutes pass. Enter two dates with times, with an offset such as +02:00 or a Z, and get the whole minutes between them and the direction. 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
Start
2024-01-01T00:00:00Z
End
2024-01-01T01:30:00Z
You get
Start epoch seconds
1,704,067,200
End epoch seconds
1,704,072,600
Total seconds
5,400
Signed minutes
90

This difference-in-minutes calculator takes two explicit ISO-8601 datetimes and returns how many whole minutes separate them when both instants are expressed in UTC. Offsets such as +02:00 are converted to UTC before subtraction so a local wall time and a Zulu stamp never silently mix.

Minutes between two moments, not two clocks

Two times written in different time zones cannot be compared until they sit on the same clock. The calculator first converts each one to UTC using the offset you write, such as +02:00, +05:30 or -0800, or a trailing Z for UTC itself. It then subtracts the two moments and divides by sixty, keeping only whole minutes. From midnight to half past one on 1 January 2024, both in UTC, the answer is 90 minutes. Nothing depends on your device's clock or time zone, so the same pair always gives the same number.

Where a minute count helps, and what it refuses

Service teams measure the whole minutes between an alert and its acknowledgment, and a negative signed value quickly shows when two clocks were out of order. Meeting planners turn local times with offsets such as +02:00 or -08:00 into a length that does not depend on anyone's computer. Seconds left over after the last full minute are dropped, not rounded. Dates that do not exist, such as 29 February 2023, hours above 23 and loose forms like 01/01/2024 3pm are refused rather than guessed, so a wrong figure never slips into a report.

What the signed minute count tells you

A signed whole-minute difference answers a different question from a multi-unit countdown, a pure calendar day span, or an age in years and months: it measures how far apart two absolute instants are when both are reduced to UTC epoch seconds and divided by sixty. Date-only values are treated as midnight UTC so a pure day pair still yields a multiple of one thousand four hundred forty minutes.

Full datetimes may include a T or space separator, optional seconds, optional fractional seconds that are truncated to whole seconds, and either a trailing Z or a numeric offset such as +05:30 or -0800. If you need whole calendar days only, a days-hours-minutes-seconds breakdown, or relative parsing of phrases like tomorrow, use those dedicated tools; this page answers only the signed whole-minute UTC distance between two validated ISO datetimes.

SLA and response windows

Measure whole minutes between an alert timestamp and the acknowledgment stamp, including negative signed values when clocks are out of order.

Offset-safe meeting length

Convert local ISO datetimes with +02:00 or -08:00 offsets to UTC first, then report a signed minute length that does not depend on the host clock.

What does the difference-in-minutes calculator cost?

It is free in your browser on this page.

Does the tool use the current time?

No. Only the two explicit datetimes you provide are used. There is no Date.now and no wall-clock dependency.

What happens with time zone offsets?

Numeric offsets and Z are converted to UTC before subtraction. Date-only values are treated as midnight UTC.

What if the end time is earlier than the start?

You still get the plain number of minutes, but the signed result turns negative and the direction reads backward. Reversing the example pair, from half past one back to midnight, gives −90.

Can I enter dates without a time?

Yes. A date on its own is read as midnight UTC, so two plain dates always differ by a whole multiple of 1,440 minutes, the length of a day.

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/date/diff-in-minutes

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/date/diff-in-minutes \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"start":"2024-01-01T00:00:00Z","end":"2024-01-01T01:30:00Z"}'
{
  "start": "2024-01-01T00:00:00Z",
  "end": "2024-01-01T01:30:00Z"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "date.diff_in_minutes",
  "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.

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.

Classic checks include 2024-01-01T00:00:00Z to 2024-01-01T01:30:00Z yielding ninety minutes forward, the reverse pair yielding negative ninety, and identical endpoints yielding zero.

What a signed minute difference means and what the response contains

You supply a start datetime and an end datetime as ISO-8601 strings; order does not have to be chronological because the minutes field is always non-negative while signed_minutes preserves direction when the end is earlier than the start. The calculator returns the echoed start and end strings, start_epoch_seconds and end_epoch_seconds for debugging, total_seconds as the raw second delta, signed_minutes as trunc of that delta over sixty, minutes as the absolute value, a direction label of forward, backward, or zero, and a short formula reminder. There is no live countdown against the current clock, no locale-dependent week start, and no floating approximation of a minute length: either both inputs are valid absolute times inside the supported year window and the span is fully determined, or the request fails with invalid_input. Rejected cases include a missing start or end field, wrong shapes such as 01/01/2024 3pm, impossible months, days that do not exist such as 2023-02-29, hours outside zero through twenty-three, and years outside one through 9999.

How start and end are read and how the minute count stays reproducible

Each string is trimmed, then matched against a strict ISO pattern: four-digit year, month, day, optional time with hours and minutes, optional seconds and fraction, and optional Z or signed offset. After parsing, each year must fall between 1 and 9999, each month between 1 and 12, and each day between 1 and the true length of that month in that year, with leap years following the Gregorian rule of divisible by four except century years not divisible by four hundred. Hours run from 0 to 23 and minutes and seconds from 0 to 59. The preferred first field is start, but aliases from, a, begin, and start_date are accepted so spreadsheets, query strings, and typed forms can reuse the same contract without renaming columns. The preferred second field is end, with aliases to, b, finish, and end_date for the same reason. Internally the engine converts each civil triple plus local time of day to a proleptic Gregorian serial day count, multiplies by 86400, adds the local second-of-day, and subtracts the offset in minutes times sixty so every value becomes UTC epoch seconds. signed_minutes is then Math.trunc of end epoch minus start epoch over sixty, which discards a partial trailing minute while keeping the sign of the full second delta. Identical instants yield zero; reversing the pair flips only the sign of signed_minutes and total_seconds and leaves minutes unchanged. Pair the free browser run on this page with the priced API when you need the identical minute span inside an automated pipeline.

Where minute-span arithmetic fits in operations, logs, and software tests

Operations and support teams measure minutes between two datetimes when an SLA is defined as a response window of thirty or sixty minutes, when a cooldown must elapse between retries, or when an incident timeline needs a signed gap between acknowledgment and resolution stamps. Analysts correlating logs use the same distance to label how many whole minutes separate an error line from the preceding deploy marker, including negative values when the second stamp is earlier than the first and must still be kept for direction-aware reports. Pair it with days-between, countdown-between, or timezone helpers when you need related calendar steps, and with other free deterministic tools when you are assembling a small lab of time utilities. Educators and standards writers use the tool to demonstrate that 2024-01-01T00:00:00+02:00 and 2023-12-31T22:00:00Z are the same UTC instant and therefore zero minutes apart, or that a ninety-minute meeting from 09:00 to 10:30 yields signed_minutes of ninety regardless of wall-clock language. On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a one-off check to a pipeline without changing the mathematical result.

Deterministic CI fixtures

Generate reproducible minute deltas for unit tests and property checks without Date.now, timezone env vars, or leap-second tables.

How are signed minutes defined?

Both datetimes are converted to UTC epoch seconds, then signed_minutes = trunc((end − start) / 60). minutes is the absolute value; total_seconds is the raw second delta.

What if end is earlier than start?

minutes stays non-negative. signed_minutes is negative and direction is backward, so chronological order is preserved when you need it.

Read the full KIT documentation →