SSMEDIAN Function (Gnumeric)
Estimate a grouped-data median with Gnumeric SSMEDIAN, specify midpoint observations and interval width, and verify interpolation and small-sample rules.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: For midpoint observations 7,7,8,8,9 with width 1, SSMEDIAN gives the grouped reference median 7.75. Ordinary MEDIAN of the recorded midpoints is 8; the two functions answer different questions.
Availability and evidence
- Introduction: Gnumeric 1.1.20. NEWS explicitly introduces SSMEDIAN. The later 1.10.15 entry expands its description and is not its introduction.
- Source support: Registered in the Gnumeric 1.12.62 plugin. No retirement is established. The last functioning application version is unverified for this guide.
- Evidence dates: Official Gnumeric source was retained October 13–14, 2026 and reviewed October 15. The GOffice 0.10.61 source archive was retrieved October 15 and its relevant range routine reviewed the same day. Typed filtering, exact counting and rational interpolation checks are independent reference calculations. No native Gnumeric, compiled-library, headless application or GUI execution was performed.
Syntax and the data model
=SSMEDIAN(array,interval)
The data argument is required. The interval width is optional and defaults to 1. Each numeric observation is assumed to be the midpoint of the group containing the original value. Repeated midpoints represent repeated observations; this is not a two-column midpoint/frequency syntax.
The interpolation assumes values within the median group are uniformly distributed. It estimates where the halfway point lies inside that group rather than merely selecting or averaging recorded midpoint labels. The result depends on the grouping model; it is not a recovered exact median of raw values that are no longer available.
The helper uses L+interval*(N/2-CF)/F: L is the median interval’s lower edge, N is the numeric observation count, CF counts observations below that interval, and F counts observations in it. The source sorts the collected numeric values and ignores strings, Booleans and physically empty cells. Errors propagate.
Complete grouped-data worksheet
Create GroupedMedian. Enter numeric 7,7,8,8,9 in A2:A6 and interval width 1 in D2. In B2 enter =SSMEDIAN(A2:A6,$D$2). The exact reference result is 7.75.
The median midpoint is 8, so the interval starts at L=7.5. There are N=5 observations, CF=2 below the interval and F=2 in the median interval. The calculation is 7.5+(2.5-2)/2=7.75. This explicitly connects the cells to the interpolation rather than borrowing the ordinary median.
For a changed-count control, add another numeric 8 in A7 and use =SSMEDIAN(A2:A7,$D$2). Now N=6 and F=3, giving 7.5+(3-2)/3=7.833333333333. The grouped midpoint stays 8, but the estimated position within its interval changes.
The original help’s four-observation fixture 7,7,8,9 gives 7.5. The width-one examples are compatible with adjacent midpoint groups; enter them as ordinary cells rather than relying on an unverified localized array literal.
Exact reference controls
| Formula or cell-value control | Independent reference result |
|---|---|
=SSMEDIAN(A2:A6,1) |
7.75 |
=SSMEDIAN(A2:A6) omitted width |
7.75 |
=SSMEDIAN(A2:A7,1) |
7.833333333333 |
Values [7,7,8,9]; width1 |
7.5 |
Values [1,1,4,4]; width1 |
2.5 |
One value [7]; width1 |
7 |
Two values [7,9]; width1 |
8 |
Original data; width0 |
#NUM! |
Original data; width-1 |
#NUM! |
No numeric observations; width1 |
#NUM! |
Input error |
#DIV/0! |
These calculations use exact rational arithmetic and the pinned source branches. The optional-width example uses the same data as the five-observation worksheet. A blank dataset here means a range with no collected numeric observations, not a dataset containing the numeric value zero.
Special cases in the implementation
One numeric observation returns that value. Two return their arithmetic average. For a larger even-sized sample whose two central midpoint values differ, the callback also returns their average. It performs within-interval interpolation when the central values coincide, or for an odd-sized sample using its central midpoint.
For example, 1,1,4,4 returns 2.5, the mean of the central midpoints. The gap between these groups is not filled with invented observations. This branch is important when the general grouped formula alone would not explain an even sample that straddles separated groups.
The interval must be positive even for the small-sample cases. A zero or negative interval returns #NUM!, and no collected numeric observations also returns #NUM!. The source does not validate that distinct midpoint groups are separated consistently with the supplied width.
Advanced: use a width other than one
Suppose groups have midpoints 5,8,11 and width 3, with three observations at 5, four at 8 and one at 11. Enter 5,5,5,8,8,8,8,11 in F2:F9 and use =SSMEDIAN(F2:F9,3).
The median interval starts at 6.5. With N=8, CF=3 and F=4, the result is 6.5+3(4-3)/4=7.25*. A compact frequency table must be expanded or handled by a separately verified weighted calculation; feeding only the three midpoint labels would lose the unequal counts.
As a translation control, add 100 to every midpoint and leave width 3 unchanged. The result becomes 107.25. As a unit-scale control, double every original midpoint and double the width to 6; the result becomes 14.5. Scaling the midpoints without scaling the interval would describe a different grouping model.
Advanced: compare estimation choices
The ordinary median of the five-observation 7/8/9 fixture is 8, while its grouped estimate is 7.75. The ordinary median of the width-three example is also 8, while its grouped estimate is 7.25. The disagreement comes from the assumed within-group distribution and frequencies, not necessarily a software failure.
Report the midpoint convention, group width and whether raw or grouped data were available alongside the result. A precisely displayed grouped estimate can still depend strongly on assumptions about lost within-group detail.
Troubleshooting and limits
Check that rows are observations rather than a list of unique groups, that the width is positive and in the same units as the midpoints, and that imported numeric-looking values are not text. Extra text and Booleans are ignored, not converted to frequencies. Incorrect group spacing is not automatically diagnosed.
Do not call SSMEDIAN a general weighted median or an ordinary median alias. The source specifies a grouped interpolation with the small-sample and even-sample branches described above. Native localized entry, extreme numerical behavior and workbook transfer were not executed; reference calculations establish only the stated model and source contract.