Hverdag · verktøy

Kalkulator for tidsvarighet

Velg start- og sluttid for å beregne varigheten mellom dem.

Kjøres i nettleseren. Ingen opplasting.

Start

End

Choose a start and end time.

Total days
—
Total hours
—
Exact duration
—

Om verktøyet

Kalkulator for tidsvarighet sem complicação.

For eksempel er 09.15 til 17.45 på samme dato 8 timer og 30 minutter. Velg begge datoene og klokkeslettene for et intervall over natten eller flere dager; pauser trekkes ikke fra automatisk.

Veiledning

Slik bruker du Kalkulator for tidsvarighet

The Time Duration Calculator measures how much time passes between a start and an end. Each side has a date and a clock time, so the gap can be a few minutes, a night or many days. The result is shown three ways: total days, total hours, and an exact split into days, hours, minutes and seconds. It reads the times as they are on your own device clock. It does not take off breaks, and it cannot add or subtract a time from another one. It only compares two moments.

Slik gjør du

  1. Click the Start box and choose a date and a time. Type the numbers or use the picker.
  2. Click the End box and choose a later date and time. For an overnight job, pick the next calendar date.
  3. Press Calculate duration. Total days, Total hours and Exact duration fill in below.
  4. Read Exact duration for a plain answer such as 3d 6h 30m 0s. Use Total hours when you need a single number.
  5. If a message says to choose valid times, check that both boxes are filled and the end is not before the start.
  6. Press Clear to empty both boxes and the three results.

Eksempler

A working day with half-hour minutes

Du skriver inn
Start
2026-05-04T09:15
Slutt
2026-05-04T17:45
Du får
Dager totalt
0.354167
Timer totalt
8.5
Nøyaktig
0d 8h 30m 0s

From a quarter past nine to a quarter to six is eight hours and thirty minutes. Written as a decimal, thirty minutes is 0.5 of an hour.

Kjørt med verktøyets egen kode.

A night that crosses midnight

Du skriver inn
Start
2026-05-04T22:00
Slutt
2026-05-05T06:00
Du får
Dager totalt
0.333333
Timer totalt
8
Nøyaktig
0d 8h 0m 0s

The end date is the next day, so the tool knows the clock passed midnight. Eight hours is one third of a day.

Kjørt med verktøyets egen kode.

A span of several days

Du skriver inn
Start
2026-06-01T08:00
Slutt
2026-06-04T14:30
Du får
Dager totalt
3.270833
Timer totalt
78.5
Nøyaktig
3d 6h 30m 0s

Three full days are 72 hours. Six and a half more hours bring the total to 78.5, and the split shows it as 3 days, 6 hours and 30 minutes.

Kjørt med verktøyets egen kode.

A whole year of hours

Du skriver inn
Start
2026-01-01T00:00
Slutt
2027-01-01T00:00
Du får
Dager totalt
365
Timer totalt
8,760
Nøyaktig
365d 0h 0m 0s

The year 2026 is not a leap year, so it has 365 days. Multiplying by 24 gives 8,760 hours, shown with a comma.

Kjørt med verktøyets egen kode.

Ending before the start

Du skriver inn
Start
2026-05-04T17:00
Slutt
2026-05-04T09:00
Du får
Melding
Choose valid times with the end after the start.

The tool refuses a negative gap. Swap the two boxes if you meant to measure the other direction.

Kjørt med verktøyets egen kode.

The night the clocks change in Spain

Du skriver inn
Start
2026-03-28T12:00
Slutt
2026-03-29T12:00
Enhetens tidssone
Europe/Madrid
Du får
Timer totalt
23

On 29 March 2026 clocks in Spain moved forward one hour, so the same clock time one day later is only 23 real hours later. A device in a zone without daylight saving shows 24.

Ikke kjørt med verktøyet. Se på dette som en illustrasjon.

Når det er nyttig

  • Find how long a flight, train ride or drive took from departure to arrival.
  • Measure the length of a work shift that runs past midnight.
  • Check how many hours passed between sending a message and getting a reply.
  • Work out the time left between two events in a project plan.
  • Compare an expected delivery time with the real time it arrived.
  • Count how many hours a rental or parking spot was used.

Begrensninger

  • Breaks, lunch and unpaid time are not removed. Subtract them yourself from the hours shown.
  • The end must not be before the start. An end equal to the start is allowed and shows zero.
  • Times are read in your device time zone. When clocks change for daylight saving, the real gap can be one hour more or less than the clock times suggest.
  • Total days and Total hours are decimals shown to at most six places, so a long fraction such as 0.354167 is rounded.
  • The date and time boxes normally have no seconds field, so the seconds in the exact result are usually 0.
  • The tool measures one gap at a time. It does not add up several shifts or give a total for a week.

Tips

  • Use the Exact duration line to read a result out loud, and the Total hours line to copy into a spreadsheet.
  • To get minutes only, multiply the Total hours by 60 in your head or a calculator.
  • For a shift that crosses midnight, check that the end date is one day later, not the same day.
  • If you plan to pay by the hour, take off unpaid breaks first, then round the way your employer's rules say.
  • When you time an event in another city, convert both times to your own time zone first, because the boxes use your device clock.

Kilder

Vanlige spørsmål

Sobre Kalkulator for tidsvarighet.

How do I calculate the hours between two times?

Choose a start date and time, choose an end date and time, then press Calculate duration. Total hours shows the answer as a number, and Exact duration shows days, hours, minutes and seconds.

How many hours are there from 9:15 a.m. to 5:45 p.m.?

On the same date it is 8 hours 30 minutes, which the tool shows as 8.5 total hours. Enter both times with the same date and the exact line reads 0d 8h 30m 0s.

Can the duration cross more than one day?

Yes. Pick an end date that is days later and the tool reports the full gap. For example, June 1 at 8:00 to June 4 at 14:30 is 3 days, 6 hours and 30 minutes.

How do I work out an overnight shift?

Set the end date to the next calendar day. A shift from 22:00 to 06:00 the next morning is 8 hours. Leaving both on the same date would put the end before the start and give an error.

Does it subtract my lunch or breaks?

No. It reports the full elapsed time between the two moments. If you took an unpaid break, subtract it yourself, for example 8.5 hours minus 0.5 hours for a half-hour break gives 8 hours.

Why did I get an error about valid times?

Either a box is empty, or the end is earlier than the start. Fill both boxes and make sure the end is later. The tool does not show a negative duration.

What happens when daylight saving time begins or ends?

The tool uses your device time zone, so a span that crosses a clock change can be an hour shorter or longer than the clock times suggest. In Spain, 28 to 29 March 2026 at noon is 23 hours.

Why is Total days a decimal?

It divides the gap by 24 hours, so a gap shorter than a day shows a fraction, such as 0.333333 for eight hours. Use Exact duration if you want whole days, hours and minutes instead.

Is it the same as a date calculator?

No. A date calculator counts whole calendar days between two dates and ignores the clock. This tool includes the time of day, so it can tell 8 hours from 9 hours on the same date.

Is anything stored or uploaded?

No. Both times are worked out in your browser on your device. Nothing is sent to a server. Pressing Clear empties the boxes and the results.

When should I not trust the result for pay or billing?

Treat it as a quick check, not a payroll record. Your employer or contract may round time, remove breaks or use another time zone. Check those rules before you rely on the number.

Hvordan bruker du Tidsvarighetskalkulator?

Velg start- og sluttid for å beregne varigheten mellom dem.

Lastes dataene mine opp til en server?

Nei. Behandlingen skjer i nettleseren din, og opplysningene dine lastes ikke opp.