Contact

ONLYOFFICE INTERCEPT: Fitted Baselines, Origins and Worked Examples

Statistical Intermediate ONLYOFFICE

Calculate a fitted intercept in ONLYOFFICE, reconstruct it from means and slope, and see how changing the predictor origin changes the baseline.

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

Quick answer: With x-values 1, 2, 3, 4, 5 and paired y-values 2, 4, 5, 4, 5, =INTERCEPT(B2:B6,A2:A6) has an independently calculated result of 2.2. It is the fitted line’s y-value at x=0, rather than the first observed y-value or the intersection of two arbitrary curves.

Availability and version history

  • Introduced: The first introduction release and date are not established by the checked sources.
  • Availability: Currently documented in ONLYOFFICE’s rolling function help; no final supported-version endpoint is established.
  • Scope: Shared Spreadsheet Editor documentation. Exact availability in individual Docs, Desktop and mobile builds is not established by this page.
  • Checked: October 14, 2026, against the official INTERCEPT reference. Examples were independently calculated and compared with the vendor screenshot; these cases were not tested in the native application.

Syntax and argument order

=INTERCEPT(known_y's, known_x's)

Supply both arguments, with dependent y-values first and independent x-values second. The apostrophes belong to the documentation’s argument labels; actual formulas contain your ranges. ONLYOFFICE requires the ranges to contain the same number of elements.

The function reference says text, logical values and empty cells are ignored, while zeros are included. The worked examples use complete numeric pairs so that missing-data selection cannot silently change the sample. Keep each x next to its corresponding y, even if you later sort the records.

A visible fitted-line worksheet

Create a blank sheet named LineFit. Enter x in A1 and y in B1, then enter:

Row A: x B: y
2 1 2
3 2 4
4 3 5
5 4 4
6 5 5

Use G for labels and H for these results:

Cell Formula Expected result
H2 =INTERCEPT(B2:B6,A2:A6) 2.2
H3 =SLOPE(B2:B6,A2:A6) 0.6
H4 =AVERAGE(A2:A6) 3
H5 =AVERAGE(B2:B6) 4
H6 =H5-H3*H4 2.2

H6 independently reconstructs the intercept from the two means and the fitted slope. These are the ordinary straight-line least-squares identities described in the NIST regression reference.

Put Fitted y, Residual and Squared residual in C1:E1. Enter =$H$2+$H$3*A2 in C2, =B2-C2 in D2 and =D2^2 in E2. Fill C2:E2 through row 6.

Row Expected C Expected D Expected E
2 2.8 -0.8 0.64
3 3.4 0.6 0.36
4 4 1 1
5 4.6 -0.6 0.36
6 5.2 -0.2 0.04

Put =SUM(D2:D6) in H8 and =SUM(E2:E6) in H9; mathematical targets are 0 and 2.4. Tiny floating-point residuals may appear instead of exact zero. Keep full stored precision in the fitted values before computing residuals.

What changing the origin does

Keep the original A:H area intact. Put Shifted x and Shifted fit in J1:K1. Enter =A2-3 in J2 and fill to J6. Put =INTERCEPT(B2:B6,J2:J6) in N2 and =SLOPE(B2:B6,J2:J6) in N3.

Expected results are 4 and 0.6. Enter =$N$2+$N$3*J2 in K2 and fill to K6; the fitted values still match C2:C6. The origin has moved to the original mean x=3, so the new intercept equals mean y=4. A different intercept does not necessarily mean a different fitted relationship.

This matters with calendar years, elapsed time and baseline-adjusted measurements. State what x=0 means before treating an intercept as a physical starting amount. Here zero is outside the observed x-range 1–5, so 2.2 is an extrapolated line value, not a measured baseline.

Reproduce the vendor’s two-dimensional example

On a separate blank sheet named VendorIntercept, enter this block in A1:D4, without headers:

A B C D
3 89 34 2
45 4 45 13
6 6 67 33
7 78 89 1

Enter =INTERCEPT(A1:B4,C1:D4) in F2. The vendor screenshot displays 54.86525; the independently computed value is approximately 54.865253987. This example has eight matched positions, not four averaged rows. Reversing the ranges changes which variable is being predicted.

Use varying x-values: if all x-values are identical, a unique ordinary fitted slope and intercept cannot be determined. The short ONLYOFFICE entry does not enumerate every exact error token, minimum-data boundary or mixed-array pairing detail; do not assign an Excel error code without checking the relevant build.

An intercept can be negative and still be mathematically valid. Whether it is useful depends on the predictor’s origin and the domain where the fitted line makes sense. A fitted line also does not establish causation.

SLOPE supplies the coefficient of x. FORECAST.LINEAR evaluates the fitted line at a chosen x. RSQ summarizes squared correlation, while STEYX describes residual spread in y-units.