INTERCEPT Function (Gnumeric)
Learn the INTERCEPT function in Gnumeric: Returns the intercept of the linear regression line and the Y axis.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: 0.28, according to the official release history.
- Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
- Scope: Desktop; the fn-stat function module must be included and enabled.
- Checked: October 14, 2026. Documentation/source check; no new native test in Gnumeric 1.12.62.
What INTERCEPT means
In a straight-line model Å· = m×x + b, b is the Y-intercept: the predicted Y value when X is zero. Gnumeric’s INTERCEPT estimates that number from paired observations using a least-squares regression. An intercept is often necessary to reproduce the fitted line, but it is not automatically a sensible real-world prediction if zero lies far outside your recorded X values. For example, a zero-hour test score extrapolated from only 1–5 hours may not reflect how students actually perform without training. The official Gnumeric Statistics manual documents the operation. [S1]
Exact syntax and arguments
=INTERCEPT(known_ys,known_xs)
| Position | Name in official documentation | Type/role | Optional? / default |
|---|---|---|---|
| 1 | known_ys |
Paired numeric dependent-variable responses, here B2:B6. |
Required; no default |
| 2 | known_xs |
Corresponding numeric independent-variable inputs, here A2:A6. |
Required; no default |
Put Y first, X second; passing X first produces a different regression in general. The two inputs must represent the same observations, not two independently sorted lists. No alternative intercept parameter, optional extra argument, or default X list is documented for this standalone function. [S1]
Reproducible worksheet: five paired observations
Enter the values below as numbers, not text. Row 1 consists of labels; exclude row 1 from every formula. Each row is one observation, so a sort must move its X and Y cells together. Column C is an ideal straight line; column D is reverse-ranked X for additional comparisons.
| Row | A: Training hours (X) | B: Assessment score (Y) | C: Perfect-fit Y | D: Reverse-ranked X |
|---|---|---|---|---|
| 1 | Hours | Score | Reference line | Reverse |
| 2 | 1 | 2 | 3 | 5 |
| 3 | 2 | 3 | 5 | 4 |
| 4 | 3 | 5 | 7 | 3 |
| 5 | 4 | 4 | 9 | 2 |
| 6 | 5 | 6 | 11 | 1 |
Use the ranges A2:A6 for X, B2:B6 for observed Y, C2:C6 for a perfect linear Y of 2X+1, and D2:D6 for a perfect negative linear relationship with X. The entries in C and D are fixed input numbers for this reproducible table; they are not outputs from an application session. This is a small instructional dataset, not an empirical or predictive validation study.
For independent checking, the five observations have n = 5, mean(X) = 3, mean(Y) = 4, Σ(X−3)² = 10, Σ(Y−4)² = 10, and Σ(X−3)(Y−4) = 9. Consequently the best-fit line is Ŷ = 1.3 + 0.9X, the Pearson correlation is 0.9, and its square is 0.81. The residual sum of squares is 1.9. All example outputs below were independently calculated in Python and cross-checked algebraically, not observed in Gnumeric.
Copy-ready formulas with independently calculated results
| Formula to enter | Expected value | Interpretation |
|---|---|---|
=INTERCEPT(B2:B6,A2:A6) |
1.3 |
Predicted score at X = 0 for the fitted line. |
=INTERCEPT(C2:C6,A2:A6) |
1 |
Ideal data follow Y = 2X + 1. |
=INTERCEPT(D2:D6,A2:A6) |
6 |
Reverse values fit Y = −X + 6. |
=INTERCEPT(A2:A6,B2:B6) |
-0.6 |
The reverse regression estimates X from Y. It is not the same model; the values are calculated from mean(X)=3, reverse slope 0.9, mean(Y)=4. |
Derivation of the first line:
mean(X) = 3; mean(Y) = 4
Sxx = 10; Sxy = 9
slope = Sxy / Sxx = 0.9
intercept = mean(Y) − slope × mean(X)
= 4 − 0.9 × 3
= 1.3
The same data give slope 0.9. At X = 3, 0.9×3 + 1.3 = 4, which passes through the paired data’s mean. This is a checkable property of a simple least-squares line with an intercept, not a native Gnumeric screenshot.
Advanced workflow: make the model explain itself
You can expose a model’s estimated constant and rate of change in separate cells: put =INTERCEPT($B$2:$B$6,$A$2:$A$6) in H3 (expected 1.3) and =SLOPE($B$2:$B$6,$A$2:$A$6) in H2 (expected 0.9). In a summary cell, calculate the prediction at a number held in G2:
=$H$2*G2+$H$3
With G2 = 4, expected 4.9; with G2 = 6, expected 6.7. The result at X=6 is extrapolation beyond the measured training-hour range; report that qualification, particularly if presenting a business decision or performance target. Plot points or examine residuals to decide whether a straight line is appropriate. An apparent intercept does not automatically describe a real baseline when X=0 has no data.
To verify directly from summary statistics, the following independent mathematical identity should agree with INTERCEPT for these valid numeric pairs:
=AVERAGE(B2:B6)-SLOPE(B2:B6,A2:A6)*AVERAGE(A2:A6)
Expected result is 1.3. The identity is useful for auditing the intercept; it does not represent a separately verified Gnumeric runtime observation.
Exact-release source note: The official 1.12.62 source archive was checksum-verified. In src/collect.c, these paired-range functions receive GNM_ERROR_VALUE as the fallback: no accepted pairs, unequal collected lengths and failed numeric callbacks therefore follow a #VALUE! source path. Some manual entries instead name #N/A or #DIV/0 for empty/mismatched/constant inputs. Those manual tokens below are documentation claims, not confirmed runtime outcomes; the actual installed build was not executed.
Errors documented for INTERCEPT
#N/A: the official entry specifies this when the X or Y vector has no data entries or the vectors have different numbers of data entries (a manual statement, subject to the source discrepancy below). Confirm aligned numeric input pairs.#DIV/0: the documented result when variance of known X values is zero (e.g., all X values are3), making a unique slope and associated intercept indeterminate.- Non-numeric data and error-valued cells: Gnumeric’s INTERCEPT entry does not enumerate every possible error or coercion rule; do not claim exact messages for those cases without a native test. Clean the inputs and try again.
Input quality, limits, and troubleshooting
- Order and pairing: the first vector of
known_ysis the dependent Y variable, followed byknown_xs(independent X);RSQaccepts first and second arrays and is symmetric for valid aligned numeric inputs. Select matching cell ranges representing the same rows. Do not independently sort just one column or silently shift one range. - Numbers versus text: enter actual numeric cells. Labels must remain outside formula ranges. The official Statistics documentation does not specify every detail of coercion and alignment for each regression function; if you have text such as
'5, blanks, TRUE/FALSE, errors, or mismatched shapes, clean or pair-filter the data and test the result in your installed Gnumeric. Do not assume such entries become zeros or new pairs by row position. - Missing values: rather than filling blanks with zero or relying on unverified pair-omission semantics, build a contiguous two-column table of complete observations. Preserve each record’s identity during filtering and sorting; the apparent fit can change dramatically if pairs are misaligned.
- Mathematically undefined regressions: a zero-variance X vector contains no information about slope; constant Y makes some correlation calculations undefined. One or two valid observations are also insufficient for meaningful regression uncertainty. The exact displayed Gnumeric error is not assumed unless its official reference explicitly specifies it.
- Error-valued cells: upstream
#VALUE!,#N/A, etc. can invalidate calculations. Repair the referenced inputs instead of wrapping the entire calculation in a blanket error replacement that might hide a damaged dataset. - Decimal display and separators: these examples use English function names, a comma between arguments, and a period for decimal numbers, as illustrated in Gnumeric’s manual. Its locale is derived from the operating system. If your installed configuration differs, use the formula syntax and number formats accepted there; no alternate-locale parser was executed in this review. [S3]
- Rounded results: the decimal outputs below are display approximations from exact input integers. Use additional displayed precision to compare calculations; a tiny floating-point difference alone is not proof of changed statistical logic.
Companion Gnumeric functions
SLOPE supplies the rate of change m; RSQ measures the square of correlation (fit strength, not an intercept); STEYX quantifies typical residual scatter in Y-units for this simple regression. FORECAST returns a projected Y at a specified X using a related regression workflow, while TREND can generate modeled values across X inputs. [S1], [S5]
Compatibility, versions and evidence boundaries
The Gnumeric 1.12-series Statistics manual lists this function by name and explicitly labels it Microsoft Excel compatible. That statement supports broad function-level compatibility; it is not a substitute for checking edge cases, function-name translation, type coercion, or file interchange in Excel or another spreadsheet. The current official GNU/GNOME 1.12 release archive identifies 1.12.62 dated 2026-09-21 as the latest release in the reviewed source series. It does not prove that the website manual has been regenerated for that exact binary build. [S1], [S4]
Platform and availability: Gnumeric is a GNOME-family spreadsheet application currently released and packaged for Linux; do not assume an up-to-date maintained Windows build or that a plugin is available in every distribution package. The official public function catalogue lists this function as Complete / Basic (registration/implementation and an upstream test classification), not as a native run of the worked examples on this page. [S2], [S4]
Validation limits: Exact official 1.12.62 source was checksum-verified and inspected, and all displayed numbers independently recalculated. No native Gnumeric execution, screenshots, locale regression or workbook round-trip tests were performed.
Dated official references — checked 2026-10-13 UTC
- [S1] Gnumeric Statistics manual: INTERCEPT. Supports purpose, exact syntax, order, official errors and Excel compatibility.
- [S2] Gnumeric public function catalogue. INTERCEPT is listed as Complete / Basic; these are upstream labels.
- [S3] Gnumeric’s formula and cell type reference and language/locale settings. General input and locale context.
- [S4] Official GNOME 1.12 release index, lists 1.12.62 as of 2026-09-21.
- [S5] Official FORECAST, SLOPE, and TREND entries. Companion functions, not evidence of native runs here.