MEDIAN in ONLYOFFICE: Median, Outliers and Even Counts
Use MEDIAN in ONLYOFFICE with three worked numeric examples, CSV practice data, interpretation checks, and software-specific documentation notes.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =MEDIAN(A2:A9) returns an independently expected 20 hours for the eight delivery times below. In ascending order, the middle observations are 18 and 22; their average is 20.
Availability and version history
- Introduced: The original introduction version and date are not established by the checked sources.
- Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final supported-version endpoint is established.
- Scope: Docs and Desktop Editors release separately. The unversioned help does not establish identical support in older builds, mobile clients or every deployment.
- Checked: October 14, 2026, against the official MEDIAN reference and the cited implementation. Examples were independently calculated; these particular formulas have not been run in the native application.
Syntax and the numerical model
=MEDIAN(number1, [number2], ...)
Supply the first numeric input or range, with further arguments optional. ONLYOFFICE documents up to 255 numeric arguments. Brackets indicate optional inputs and are not entered as part of the formula.
The reviewed official implementation sorts the included numeric values, selects the middle position for an odd count and averages the middle pair for an even count. Its referenced-cell and direct-argument handling are separate. The numeric examples below do not establish arbitrary type conversion in every client or release.
Complete delivery register
Create DeliveryTimes with Hours and Record in A1:B1, then enter:
| Row | A: Hours | B: Record |
|---|---|---|
| 2 | 14 | 1 |
| 3 | 18 | 2 |
| 4 | 22 | 3 |
| 5 | 18 | 4 |
| 6 | 26 | 5 |
| 7 | 30 | 6 |
| 8 | 10 | 7 |
| 9 | 22 | 8 |
Put 0,2,8,10 in F2:F5 for the separate even-count control. Alternatively, download the unchanged MEDIAN practice CSV and import it at A1 on a new blank sheet, retaining its header row and comma delimiter. Its extra D2 requested-position field is not a MEDIAN argument.
Use H2:H6 for outputs, beyond the source fields:
| Cell | Formula | Expected result |
|---|---|---|
| H2 | =MEDIAN(A2:A9) |
20 |
| H3 | =MEDIAN(3,5,7,9,101) |
7 |
| H4 | =MEDIAN(F2:F5) |
5 |
| H5 | =COUNT(A2:A9) |
8 |
| H6 | =AVERAGE(A2:A9) |
20 |
The first three retain the original worked cases. The main ascending list is 10,14,18,18,22,22,26,30; its sum is 160. The mean and median happen to agree for this fixture, but they answer different questions.
Zero and the selected observation count
The four values in F2:F5 sort to 0,2,8,10, so the middle pair gives (2+8)/2 = 5. In H8 enter =MEDIAN(F3:F5); expect 8, because that explicit range leaves only 2,8,10.
Make a copy of DeliveryTimes named NineDeliveries. Enter numeric 0 in A10 and record 9 in B10. In J2 enter =MEDIAN(A2:A10); expect 18. In J3 enter =AVERAGE(A2:A10); expect approximately 17.7777777778, from 160/9. H2 still uses the original eight rows and remains 20.
A real zero and an omitted measurement have different meanings. This example changes the selected set deliberately; it does not recommend assigning zero to an unknown delivery time.
A single long delay changes the mean more
Copy the original DeliveryTimes sheet to LongDelay. Replace A7’s numeric 30 with 300. H2 remains 20, while H6 becomes 53.75, from 430/8. The central positions stay 18 and 22 even though the upper extreme changes substantially.
A stable median does not certify that the data are clean or that the delay is irrelevant. Keep the complete register and investigate its units and record definitions.
Advanced: subgroup medians are not additive summaries
On the original DeliveryTimes sheet, enter =MEDIAN(A2:A5) in K2; expect 18. In K3 enter =MEDIAN(A6:A9); expect 24. These split the eight records into two disjoint groups of four.
Put =AVERAGE(K2:K3) in K4 for 21, then =MEDIAN(A2:A5,A6:A9) in K5 for 20. Equal group sizes do not make the mean of their medians equal to the pooled median. The original observations preserve the ordering needed for the pooled calculation.
Reproduce the official illustration
Create VendorMedian and enter this exact eight-number grid in A1:D2 without a header inside the input block:
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | 4 | 45 | 12 | 34 |
| 2 | 3 | 54 | 2 | 2 |
In F2 enter =MEDIAN(A1:D2); expect 8, matching the vendor image. The ordered middle pair is 4 and 12. The two values of two remain separate observations.
Practical limits and related functions
These examples use scalar numeric outputs. They do not establish automatic spill, all-empty results, imported numeric-text conversion, arbitrary errors or workbook export parity. The pinned implementation is evidence for its own revision, not proof of an installed-build match.
Use consistent measurement definitions, such as complete order-to-delivery hours, rather than mixing transit-only and elapsed times. A function cannot reconcile different definitions merely because all cells display hours.
AVERAGE gives the arithmetic mean, and COUNT checks numeric observations. LARGE and SMALL select explicit ordered positions; they do not return the shipment identifier attached to a value.