Calci.inCalculate Today for a Better Tomorrow

Hours Calculator

Hours between two times, shifts past midnight and decimal hours

Hours details

What do you need?

24-hour clock.

An end time earlier than the start is read as the next day.

The guide

Counting hours: shifts, breaks and decimal time

How to count the hours between two times, handle shifts that cross midnight and unpaid breaks, and convert hours and minutes to decimal hours for pay.

Last reviewed · 1,318 words

In short

  • Count in minutes, not in decimals: time runs in sixties, and 7.45 hours is not 7 hours 45 minutes.
  • A shift whose end time is earlier than its start crosses midnight; add 24 hours to the end before subtracting.
  • Convert to decimal hours by dividing the minutes by 60 — 45 minutes is 0.75 of an hour, 20 minutes is 0.33.
  • Pay is decimal hours times the rate: 7 hours 45 minutes at ₹200 an hour is ₹1,550.
  • Small rounding on each day adds up: seven unrecorded minutes a day is more than two and a half hours over a 22-day month.

Adding up hours looks like the simplest arithmetic there is, and it is where timesheets, invoices and payslips go wrong most often. The reason is that time is not decimal. An hour has sixty minutes, a day has twenty-four hours, and the calculator on a phone knows neither.

Count in minutes, not in decimals

The reliable method is to turn every time into minutes, do the arithmetic on whole numbers, and only then turn the answer back into hours and minutes — or into decimal hours if that is what the answer is for.

A time of day becomes minutes after midnight: 09:00 is 540, 17:30 is 1,050. The time between them is 1,050 − 540 = 510 minutes, which is 8 hours 30 minutes. Nothing is rounded along the way, so nothing drifts.

The mistake this avoids is treating a time as a decimal. 17.30 − 9.00 on a calculator gives 8.3, which looks like 8 hours 30 minutes and is actually 8 hours 18 minutes when read as decimal hours. The minute and the hour are not SI units at all — they are accepted for use alongside them precisely because nobody was going to give up counting time in sixties.

Shifts that cross midnight

When a shift ends on the following day, its end time is smaller than its start time, and subtracting gives a negative number. The fix is to add 24 hours — 1,440 minutes — to the end time first.

A night shift from 22:00 to 06:00 is 360 + 1,440 − 1,320 = 480 minutes, or eight hours. The calculator does this automatically whenever the end time is earlier than the start, and says that the shift crosses midnight so the adjustment is visible.

StartEndUnpaid breakHours workedDecimal hours
09:0017:3030 min8h 00m8.00
10:0019:0060 min8h 00m8.00
14:0022:000 min8h 00m8.00
22:0006:0030 min7h 30m7.50
20:3005:1545 min8h 00m8.00

One case is deliberately not treated as overnight: the same start and end time gives zero rather than twenty-four hours. A genuine 24-hour shift is rare enough that it is better entered as two parts than guessed at from two identical times.

Breaks, and which ones count

An unpaid break is subtracted from the time between clock-in and clock-out. A paid break is not. The distinction is set by the employment contract, the employer's policy and the working-time rules that apply to the establishment, and it varies by state and sector — which is why the calculator asks for the unpaid break in minutes rather than assuming one.

Record breaks as they were taken, not as scheduled. A 30-minute lunch that ran to 40 minutes on a busy day and to 25 on a quiet one averages out in a week, but not on any single day's figure.

Converting to decimal hours

Payroll systems, invoicing software and spreadsheets usually want hours as a decimal: 7.75 rather than 7 hours 45 minutes. The conversion is the minutes divided by 60, added to the whole hours.

MinutesAs a decimal of an hour
5 minutes0.08
10 minutes0.17
15 minutes0.25
20 minutes0.33
25 minutes0.42
30 minutes0.50
35 minutes0.58
40 minutes0.67
45 minutes0.75
50 minutes0.83
55 minutes0.92

Some of these are exact — 15, 30 and 45 minutes are 0.25, 0.5 and 0.75 — and most are not. Twenty minutes is a third of an hour, 0.333 recurring, which rounds to 0.33. Over a month of entries the rounding is still far smaller than the error of typing the minutes straight in as decimals.

The converter accepts either form and gives the other: 7:45 becomes 7.75, and 7.75 becomes 7h 45m.

Working out pay

Pay is the decimal hours multiplied by the hourly rate, and it must be the decimal hours. A shift from 09:00 to 16:45 is 7 hours 45 minutes, which is 7.75 hours; at ₹200 an hour that is ₹1,550. Reading 7:45 as 7.45 and multiplying would pay ₹1,490 — sixty rupees short on a single day.

Over longer periods the same shift adds up quickly. A day of 8h 00m after a 30-minute break comes to:

DaysHoursDecimal hours
18h 00m8.00
540h 00m40.00
648h 00m48.00
22176h 00m176.00
26208h 00m208.00

Rounding clock-ins

Many time systems round each punch to the nearest five, ten or fifteen minutes. Rounding is not wrong in itself, but it has to be applied consistently in both directions, and it is worth knowing what it can hide.

A day of 8 hours 7 minutes is 8.12 hours exactly. Rounded down to the quarter hour it is 8.00. Seven minutes a day is invisible on one payslip line; across a 22-day month it is 2h 34m of work. Where rounding always runs in the employer's favour — clock-in rounded later, clock-out rounded earlier — the difference is not rounding but unpaid time.

The safest record is the actual time of each punch, with any rounding applied once at the end of the pay period, where it can be seen and checked.

Overtime

Overtime is time worked beyond the daily or weekly hours set by law or by the contract, and it is paid at a higher rate. Indian labour law has long set that rate at twice the ordinary rate of wages, and the Occupational Safety, Health and Working Conditions Code, 2020, in force with the other labour codes since November 2025, keeps it.

That changes how a long day is paid. With an eight-hour normal day at ₹200 an hour, a nine-hour day is eight hours at ₹200 and one hour at ₹400 — ₹2,000, not the ₹1,800 a flat rate would give. Work out the normal hours and the overtime hours separately, in minutes, before converting either to decimals; folding both into one decimal total is how the premium goes missing.

Which hours count as overtime — beyond a daily limit, beyond forty-eight in a week, or beyond the shift in the appointment letter — depends on the law that covers the establishment and on the contract. The calculator gives the hours and leaves the rate to you.

Across time zones

Clock arithmetic assumes both times are on the same clock. India has a single time zone and does not change its clocks for daylight saving, so a shift worked within India never gains or loses an hour.

A shift or a call that spans another country is different. 21:00 in India is 15:30 in London in winter and 16:30 in summer, when the UK moves its clocks forward. Convert every time to one zone before counting the hours between them; the time zone converter applies the daylight-saving changes.

Keeping a timesheet that holds up

A record of hours is only as good as what it was built from. Note the actual start and end of each day rather than the scheduled ones, record breaks as they were taken, and write down why any long day ran long. Total each week before the month is added up, so a mistake surfaces while the week is still remembered.

Keep the raw times even after the totals are agreed. A monthly figure cannot be checked, and a disagreement about pay months later is settled by the daily entries, not by the sum.

What this calculator assumes

  • Times are on the 24-hour clock and are whole minutes.
  • An end time earlier than the start is on the following day; the same start and end time is zero.
  • The unpaid break is subtracted once per day and cannot make a day negative.
  • Days worked multiplies the same shift, so a week of different shifts should be added day by day.
  • Decimal hours are shown to two places and pay is rounded to the rupee.

Sources

Frequently asked questions

How do I calculate the hours between two times?

Turn both into minutes after midnight, subtract, and take off any unpaid break. 09:00 to 17:30 is 8 hours 30 minutes; less a 30-minute break it is 8 hours.

How do I count a shift that goes past midnight?

Add 24 hours to the end time. A shift from 22:00 to 06:00 is 06:00 + 24:00 − 22:00 = 8 hours. The calculator does this whenever the end time is earlier than the start.

How do I convert hours and minutes to decimal hours?

Divide the minutes by 60 and add them to the hours. 7 hours 45 minutes is 7 + 45 ÷ 60 = 7.75 hours, and 8 hours 20 minutes is 8.33.

How do I work out pay from the hours worked?

Multiply decimal hours by the hourly rate — never hours and minutes read as if they were a decimal. 7 hours 45 minutes at ₹200 an hour is 7.75 × 200 = ₹1,550, not 7.45 × 200 = ₹1,490.