---
title: "Adding up hours and rates in a plain-text timesheet"
author: Pedro Thomaz
source: https://coffeetext.app/blog/timesheet-hours-plain-text
---

# Adding up hours and rates in a plain-text timesheet

> Checked November 2026 against Apple's Numbers guides to [quick sums](https://support.apple.com/guide/numbers/quickly-calculate-a-sum-average-and-more-tan64d39ee67/mac) and [formulas](https://support.apple.com/guide/numbers/calculate-values-using-data-in-table-cells-tan727173a8/mac). The answers shown for Coffee are what the app gives for these lines. Coffee isn't affiliated with Apple.

A text file makes a perfectly good timesheet: one line per day or task, with the hours written the way you'd say them. Add them up by converting minutes to hours, or paste them into a spreadsheet as decimals. In an editor that calculates, such as Coffee, the totals and the amount to invoice appear beside the lines while the file stays plain text.

## Why a text file works

Most freelancers and small teams don't need timesheet software. They need a record they can trust, that's quick to add to, and that still makes sense in a year. A text file is all three:

- **It's fast.** Open the file, type a line, close it. There's no form and no timer to forget.
- **It holds context.** A line can say what the work was, which a spreadsheet cell often squeezes out.
- **It lasts.** Plain text opens in any editor, on any computer, years from now.
- **It's easy to search.** Spotlight, or any editor's search, finds the week you worked on a project.

Where it falls short is anything automatic: reminders, approvals, or reports across many people. If you need those, use timesheet software.

## A sample week

Here's one week, written the way it might be typed during the week:

```
## Week of 2 November

Mon: 17:30 - 09:00
Tue: 6h 45min
Wed: 8h
Thu: 3h 20min + 45 min
Fri: 5h 15min
```

Monday records a start and finish time. Thursday was two separate stints. The rest are written as durations. Mixing them is fine, as long as you're consistent about what each line means. Saved as a `.md` or `.txt` file, it opens anywhere. If it opens in the wrong app, [here's how to change that](https://coffeetext.app/blog/open-md-files-mac), and any plain text editor works, [TextEdit in plain text mode](https://coffeetext.app/blog/textedit-alternatives-mac) included.

## Adding it up by hand

Work in hours and minutes separately, then carry:

| Day | Hours | Minutes |
|---|---:|---:|
| Mon | 8 | 30 |
| Tue | 6 | 45 |
| Wed | 8 | 0 |
| Thu | 4 | 5 |
| Fri | 5 | 15 |
| Sum | 31 | 95 |

95 minutes is 1 hour 35 minutes, so the week is 32 hours 35 minutes. Monday's 09:00 to 17:30 is 8 hours 30 minutes, and Thursday's 3 hours 20 plus 45 minutes is 4 hours 5 minutes.

To charge for it, turn minutes into a fraction of an hour by dividing by 60. 35 minutes is about 0.583 hours, so the week is 32.583 hours, and at €40 an hour that's €1,303.33. Rounding before you multiply changes the answer, so agree with your client whether you bill to the minute or the quarter hour.

## In a spreadsheet

A spreadsheet is easier once the hours are decimals. Write 8.5 for 8 hours 30 minutes, 6.75 for 6 hours 45, and so on. In Apple's Numbers, select the column and [the sum appears at the bottom of the window](https://support.apple.com/guide/numbers/quickly-calculate-a-sum-average-and-more-tan64d39ee67/mac), with no formula needed. [A formula such as `SUM(B)`](https://support.apple.com/guide/numbers/calculate-values-using-data-in-table-cells-tan727173a8/mac) keeps the total of the second column in a cell, and multiplying it by a rate cell gives the invoice amount.

A spreadsheet is the better choice when you track several clients across months and want totals across and down, charts, or filtering. The price is that you convert every entry to decimals, and the notes about what you did tend to drift into another file.

## In Coffee

Coffee works out lines like these beside the text and never writes the answers into the file. For the week above, add two lines:

```
## Week of 2 November

Mon: 17:30 - 09:00
Tue: 6h 45min
Wed: 8h
Thu: 3h 20min + 45 min
Fri: 5h 15min
week = total

week at €40/hour
```

Coffee shows 8 h 30 min beside Monday, 6 h 45 min beside Tuesday, 4 h 5 min beside Thursday and 5 h 15 min beside Friday. Wednesday's `8h` shows nothing, as there's nothing to work out, but it still counts. `week = total` adds up the block above it and shows 32 h 35 min, and `week at €40/hour` shows €1,303.33. The blank line keeps the invoice line out of the hours. Plain `Total` works too if you don't need to name it, and `Average` under it shows 6 h 31 min a day.

### Durations and rates on one line

You don't need a list for a quick sum. Each of these shows its answer beside it:

| Line | Answer |
|---|---|
| `3h 20min + 45 min` | 4 h 5 min |
| `€40/hour * 7.5 hours` | €300 |
| `30 hours at €30/hour` | €900 |
| `32h 35min in hours` | 32.58 h |
| `€24 a day for a year` | €8,760 |

A rate is an amount per unit of time, written with `/hour`, `/h`, `a day` or `per`. Multiplying it by hours, or writing `at`, cancels the hours and leaves money. A rate can also be a named value, such as `rate = €40/hour`, and then `31.5 hours * rate` shows €1,260.

### Two clients, one week

```
acme = 12h 30min
bloom = 6h

acme at €40/hour
bloom at €55/hour
Total
```

The answers are €500 and €330, and `Total` shows €830.

### Small things that help

- **Select some numbers** in a note to see their sum, without writing a line for it.
- **Hold ⌥ and drag a number** to try other values, such as a different rate, and watch the answers change. The drag changes the number in the note, and one ⌘Z takes the whole drag back.
- **Answers stay out of the file.** Opened elsewhere, the timesheet is the same tidy list. PDF and HTML exports and Print include the answers, and Markdown and plain text exports don't. If a figure must be in the file, for an invoice say, type it in.

For more on how Coffee decides which lines to answer, see [a plain-text monthly budget](https://coffeetext.app/blog/monthly-budget-plain-text). There's more on [calculations in Coffee](https://coffeetext.app/notes-calculator) too.

## Questions

### How do I add up hours and minutes?

Add the hours and the minutes separately, then turn every 60 minutes into an hour. 31 hours and 95 minutes is 32 hours 35 minutes.

### How do I convert minutes to decimal hours?

Divide the minutes by 60. 45 minutes is 0.75 hours and 35 minutes is about 0.583 hours, so 32 hours 35 minutes is about 32.58 hours.

### How do I work out pay from hours and an hourly rate?

Convert the time to decimal hours and multiply by the rate. 7.5 hours at €40 an hour is €300.

### Does Coffee add the answers to my timesheet file?

No. The answers are drawn beside the lines and never saved into the file. PDF and HTML exports include them, and Markdown exports don't.

---

Written by Pedro Thomaz, who makes Coffee, a Markdown editor for the Mac on macOS 15 or later. It's free for 14 days with no card or account, then €3 a month, €29 a year, or €79 once with two years of updates. More at https://coffeetext.app/llms-full.txt
