Contact

FORECAST.ETS.SEASONALITY in ONLYOFFICE Spreadsheet Editor

Statistical Intermediate ONLYOFFICE Spreadsheet Editor

Inspect a series for a repeating sample period, with transparent difference-score examples, units, tie behavior and source-specific preprocessing caveats.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: For eight alternating values 10,20,10,20,10,20,10,20 on timeline 1..8, the inspected period-scoring algorithm independently selects 2 samples per cycle.

Availability and evidence scope

  • Introduced: Original introduction release is not established by the checked sources.
  • Available: Listed in current unversioned ONLYOFFICE help, checked October 18, 2026.
  • Implementation inspected: Official SDKJS v10.0.0.169, commit 3679e0375a758d7dc59d31337a45461be3525ed8. The snapshot does not prove identical behavior in every installed editor.
  • Retired or deprecated: These sources do not establish retirement or formal deprecation.
  • Testing: Numerical examples are independent mathematical expectations, and implementation discrepancies are labeled source predictions. No ONLYOFFICE application or calculation-engine execution was performed.

The examples use English function names and commas. Use your locale’s argument separator if different. Retain full precision in formulas; round only the displayed result. The examples use clean, unique, equally spaced timeline columns. They establish only the stated mathematical and source-trace cases, not general forecast accuracy, application execution or cross-product numerical equivalence.

Syntax and interpretation

=FORECAST.ETS.SEASONALITY(values, timeline, [data_completion], [aggregation])

Two to four arguments are registered. values and timeline contain paired observations. Both optional controls default to 1. Data completion 1 is documented as averaging neighboring points and 0 as filling with zeros. Aggregation is documented as 1 average, 2 count, 3 counta, 4 maximum, 5 median, 6 minimum or 7 sum for duplicate timestamps.

The output is a period length in samples, not a forecast, a smoothing coefficient or a confidence measure. With daily sampling, 7 means seven samples per cycle. With monthly sampling, 12 means twelve samples. The function does not infer the business meaning of a cycle merely from its numeric length.

The inspected function always requests automatic period detection. It does not accept a seasonality argument for forcing a particular period. The related FORECAST.ETS function can accept an explicit seasonal length when that is the intended model setting.

Step-by-step: detect a two-sample alternating pattern

  1. Enter timeline values 1 through 8 in A1:A8.
  2. Enter alternating values 10,20,10,20,10,20,10,20 in B1:B8.
  3. Evaluate =FORECAST.ETS.SEASONALITY(B1:B8,A1:A8,1,1).
  4. The independently traced result is 2.

The expected value comes from the inspected algorithm, not solely from visually noticing alternation. It compares successive response changes with changes one candidate period later. It considers candidate lengths from floor(N/2) down to 1. For this eight-point dataset, the independent scores are:

Candidate period Sum of absolute change differences Divisor Score
4 0 3 0
3 40 2 20
2 0 5 0
1 120 6 20

The code updates its selected period when the score is no larger than the best score, and also explicitly when it is zero. Thus period 2 replaces period 4 on the zero-score tie. A full four-sample block repeats too, but the chosen result is the shorter repeated pattern encountered later in the descending search.

The helper then initializes its model state. The positive observations in this example avoid zero period-average initialization problems. Returning a period does not establish that forecasts from that seasonal model are accurate.

Advanced comparison: a linear trend has no repeating deviation

On a separate sheet or after saving the first dataset, replace B1:B8 with 10,12,14,16,18,20,22,24. Every successive change is 2. All candidate period scores are therefore zero, and the descending tie rule eventually selects 1. In this implementation period 1 means no periodic component, causing the nonseasonal path to be used by automatic forecasting.

That result is not a claim that the original values repeat every observation. It is a consequence of comparing changes and of the tie rule. Distinguish a trend from a repeating seasonal deviation. Also distinguish this reported 1 from the FORECAST.ETS input setting 1, which means “detect automatically”; the same number has a different role as an input control and as the detector’s output.

For a real series, compare the detected period with the sampling schedule and domain expectations, then inspect multiple cycles. A detected integer is not a significance test, a probability that seasonality exists, or a guarantee that the pattern will persist. Changing the sample window, filling gaps or consolidating duplicates may change the chosen length.

Timeline and preprocessing limitations

Use matching numeric columns with unique, equally spaced timeline positions. The implementation sorts paired observations by timeline. It also tries to recognize dates sharing a day of month and converts them to month positions. The period-index examples above do not verify every calendar interpretation, month-end pattern or date-system configuration.

Important source/help discrepancies affect dirty timelines: aggregation code 1 drops later duplicate responses rather than averaging them, and the median branch lacks a sort and uses an invalid fractional middle index for odd duplicate counts. The missing-point path replaces an entry while increasing the observation count as though inserting. These are reasons to resolve duplicates and impute missing positions explicitly before calling the function, even though help describes built-in handling.

The documented “up to 30% missing” allowance is not a guarantee that this source path will process any qualifying series correctly. Keep actual zero responses distinct from absent timestamps and retain imputation flags. A whole selected range with blank-looking strings is not necessarily the same as a complete numeric series.

Errors and small-sample caution

Completion values other than exactly 0 or 1 predict internal not_numeric, conventionally #NUM!. Aggregation outside 1..7 also predicts that category. Use whole documented codes rather than relying on absent fractional validation. Other malformed ranges can fail preprocessing or initialization; this guide does not assign a universal native display to each case.

The search only tests candidate lengths up to half the processed sample count. With eight observations it cannot establish an annual cycle of twelve monthly samples. Very short series also encounter denominators and initialization requirements that are not represented by the examples. Gather enough complete cycles for the question and do not pad the series merely to force a preferred period.

These source traces establish selected outputs for two clean eight-point controls. They do not establish native runtime behavior or general parity with other products’ automatic seasonal detectors.

Recalculate representative formulas when moving a workbook between editors. Matching names do not guarantee identical argument coercion, array behavior, numerical precision or error handling. These source-derived examples do not establish automatic spill behavior or a general import/export guarantee.

Official references