DURATION Function in Apple Numbers: Syntax, Examples and Troubleshooting
Build an elapsed duration from numeric weeks, days, hours, minutes, seconds and milliseconds in Apple Numbers, including omissions and negative adjustments.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =DURATION(0,2,12) creates a duration of two days and twelve hours. The result is a typed elapsed-time value, not the number 2.5 and not a date on the calendar.
Availability and version history
- Introduced: Documented in Apple’s Formulas and Functions Help 15.4; the original introduction release is not established.
- Availability: Supported by the current Apple Formulas and Functions Help 15.4 documentation for Numbers; no final supported-version endpoint is identified.
- Scope: Shared iWork function reference; the formatting steps below refer to Numbers for Mac. Older releases and individual-client introduction dates are not established here.
- Checked: October 14, 2026, against the official DURATION reference. Documentation and independent arithmetic checks; no native Numbers test.
Exact syntax and default values
=DURATION(weeks, days, hours, minutes, seconds, milliseconds)
Every component accepts a number. Each position is optional, but at least one numeric argument must be supplied. An omitted component contributes zero. If a later component is present, keep the separators for earlier omitted positions; trailing unused arguments can be left out. These rules, and support for negative components, are stated in the official reference.
| Position | Component | Example meaning |
|---|---|---|
| 1 | weeks |
1.5 means one and a half seven-day weeks |
| 2 | days |
2 means two 24-hour days |
| 3 | hours |
12 adds twelve hours |
| 4 | minutes |
90 adds ninety minutes, equivalent to an hour and a half |
| 5 | seconds |
1 adds one second |
| 6 | milliseconds |
250 adds a quarter of a second |
For example, =DURATION(0,0,2,15) and =DURATION(,,2,15) both describe two hours fifteen minutes. =DURATION(2,15) describes two weeks and fifteen days instead: deleting argument positions changes the units. Explicit zeros make formulas easier to inspect.
Reproducible component table
Create a table with at least eight columns and seven rows. Use these headers in A1:H1: Weeks, Days, Hours, Minutes, Seconds, Milliseconds, Duration, Total seconds. Type the numeric components below into A2:F7.
| Row | A: Weeks | B: Days | C: Hours | D: Minutes | E: Seconds | F: Milliseconds | Expected duration | Expected H: seconds |
|---|---|---|---|---|---|---|---|---|
| 2 | 0 | 2 | 12 | 0 | 0 | 0 | 2 days 12 hours | 216000 |
| 3 | 1 | 3 | 12 | 0 | 0 | 0 | 1 week 3 days 12 hours | 907200 |
| 4 | 0 | 0 | 0 | 90 | 0 | 0 | 1 hour 30 minutes | 5400 |
| 5 | 0 | 0 | 0 | 0 | 1 | 250 | 1 second 250 milliseconds | 1.25 |
| 6 | 0 | 2 | -24 | 0 | 0 | 0 | 1 day | 86400 |
| 7 | 0 | 0 | 0 | 0 | 0 | 0 | zero duration | 0 |
In G2, enter =DURATION(A2,B2,C2,D2,E2,F2) and fill through G7. In H2, enter =DUR2SECONDS(G2) and fill through H7. Format G2:G7 as Duration and H2:H7 as Number. DUR2SECONDS makes the total visible without relying on one particular duration display style.
The normalization is arithmetic: the 90 minutes in row 4 are still ninety minutes even if the cell displays an hour and thirty minutes. In row 6, two days minus 24 hours leaves one day. None of these examples selects a month, year, time zone or holiday calendar.
Advanced example: apply a signed schedule adjustment
Use a separate table named Adjustment with at least five rows and columns A:D. Put Base hours in A1, Extra minutes in B1, Adjustment hours in C1 and Revised duration in D1. In row 2, enter 8, 45 and -2 in A2:C2.
In D2, enter:
=DURATION(0,0,A2+C2,B2)
The expected duration is 6 hours 45 minutes: eight planned hours plus 45 extra minutes minus two hours. For a decimal-hours output, place =DUR2HOURS(D2) in D3; expect 6.75. This keeps the adjustment numeric and in its proper unit instead of concatenating a text label such as 6.75h.
A fractional week is also valid: put =DURATION(0.5) in D4, and =DUR2HOURS(D4) in D5. The duration is three days twelve hours, equivalent to 84 hours. For work schedules, use your actual hours-per-workweek definition separately; a duration week is seven full days.
Formatting, errors and portability
On Mac, select the duration cells and choose Format > Cell > Data Format > Duration. Use Automatic Units or Custom Units to choose the displayed span. Apple’s formatting help explains that hiding smaller units does not remove their contribution to later formulas.
- No components:
DURATION()does not meet the documented requirement for at least one argument. UseDURATION(0)when zero elapsed time is intended. - Wrong units: a value in the first position is weeks, even if you intended hours. Prefer explicit zeros or cell references under clearly labeled headers.
- Text components: the documented input type is numeric. Clean imported text first; this guide does not assume all strings are silently coerced.
- Calendar or clock task: use TIME for a time of day. DURATION creates an interval and cannot by itself identify a calendar deadline.
- Rounding: changing a cell’s displayed units is different from applying a business rounding rule. Convert to the appropriate numeric unit before using ROUND.
Apple’s page does not specify a complete error-code table or all precision limits. Its displayed millisecond examples do not establish a universal truncation rule.