Skip to main content
Batch, Import & Formulas

Google Sheets Hours Formula Generator

Generate spreadsheet formulas for recorded hours.

By Iqbal Hussain, Founder and calculator developer · Formulas checked against worked examples · Last updated

Google Sheets Hours Formula Generator

Generate spreadsheet formulas for recorded hours.

Calculated Result
—
Adjust inputs above to calculate instantly.

How Google Sheets Hours Formula Generator Works?

The Google Sheets Hours Formula Generator works by writing Google Sheets formulas for your columns, including ARRAYFORMULA versions that fill a whole column at once.

  1. 1

    Choose the task

    Select a task, for example decimal hours for every row.

  2. 2

    Enter the column layout

    Type the columns, for example start in A, end in B, rows from 2 to 100.

  3. 3

    Copy the formula

    The generator returns =ARRAYFORMULA(IF(A2:A="",,MOD(B2:B-A2:A,1)*24)).

Google Sheets Hours Formula Generator Formula

The Google Sheets hours formula is =(End − Start) × 24, with Format → Number → Duration for totals above 24 hours.

=(B2-A2)*24 | =ARRAYFORMULA(IF(A2:A="",,MOD(B2:B-A2:A,1)*24)) | =SUMPRODUCT(D2:D)
  • A2:A, B2:B: open-ended column ranges for start and end times.
  • ARRAYFORMULA: applies 1 formula to every row.
  • IF(A2:A="",,…): leaves empty rows blank.
  • Duration format: shows totals such as 45:30:00.

Example: with times in A2:B21, =ARRAYFORMULA(IF(A2:A21="",,MOD(B2:B21-A2:A21,1)*24)) fills 20 rows of decimal hours from 1 cell.

Google Sheets Hours Formula Generator Conversion Table

The Google Sheets Hours Formula Generator conversion table lists 7 Sheets tasks with the formula.

TaskGoogle Sheets Formula
Decimal hours (1 row)=(B2-A2)*24
Overnight shift=MOD(B2-A2,1)*24
Whole column=ARRAYFORMULA(IF(A2:A="",,MOD(B2:B-A2:A,1)*24))
Minus break minutes=(MOD(B2-A2,1)-C2/1440)*24
Total as duration=SUM(D2:D8) → Format: Duration
Hours from text "7:45"=TIMEVALUE("7:45")*24
Hours per person=SUMIF(B:B,"Alex",D:D)

What is Google Sheets Hours Formula Generator?

The Google Sheets Hours Formula Generator is a formula-writing tool that creates Google Sheets formulas for recorded hours, including column-wide ARRAYFORMULA versions.

Google Sheets uses the same day-fraction time model as Excel but adds ARRAYFORMULA and a built-in Duration format. The Google Sheets Hours Formula Generator uses both, so 1 formula covers a whole shared timesheet.

What are the uses of Google Sheets Hours Formula Generator?

There are 5 main uses of the Google Sheets Hours Formula Generator, including shared team timesheets, form responses, and per-person totals.

  • Shared team timesheets

    Teams fill a shared sheet where 1 ARRAYFORMULA calculates every row.

  • Form responses

    Admins calculate hours from Google Forms clock-in responses.

  • Per-person totals

    Managers use SUMIF to total hours per name.

  • Text time cleanup

    Users convert text values like "7:45" with TIMEVALUE.

  • Volunteer logs

    Nonprofits total volunteer hours in a shared sheet.

Google Sheets Hours Formula Generator FAQ

How do I use the Google Sheets Hours Formula Generator?

1. Choose the task: Select a task, for example decimal hours for every row. 2. Enter the column layout: Type the columns, for example start in A, end in B, rows from 2 to 100. 3. Copy the formula: The generator returns =ARRAYFORMULA(IF(A2:A="",,MOD(B2:B-A2:A,1)*24)).

What formula does the Google Sheets Hours Formula Generator use?

The Google Sheets hours formula is =(End − Start) × 24, with Format → Number → Duration for totals above 24 hours. In short: =(B2-A2)*24 | =ARRAYFORMULA(IF(A2:A="",,MOD(B2:B-A2:A,1)*24)) | =SUMPRODUCT(D2:D).

Can you show a worked example?

with times in A2:B21, =ARRAYFORMULA(IF(A2:A21="",,MOD(B2:B21-A2:A21,1)*24)) fills 20 rows of decimal hours from 1 cell.

Related Batch, Import & Formulas Tools

View All Calculators →