SLOPE Function in Calligra Sheets: Regression Formula and Examples
Calculate least-squares regression slope in Calligra Sheets with reproducible x/y data, error guidance and practical forecast examples.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by 26.08.2; original introduction not established.
- Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
- Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
- Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.
Quick answer and when to use it
SLOPE finds the change in a fitted response y per one-unit change of explanatory variable x, using simple least-squares linear regression. Put y first, then x. A positive slope means the fitted line rises as x increases; a negative slope means it falls. Use the slope to describe a linear trend or, with INTERCEPT, calculate simple fitted values—not to establish causation.
=SLOPE(B2:B6;A2:A6)
With the fully specified sample rows below, its independently calculated expected output is 1.1: a one-unit increase in x is associated with 1.1 units higher fitted y in this toy sample. This is not evidence of an executed Calligra workbook.
Exact Calligra syntax, required arguments and defaults
=SLOPE(y;x)
y(first, required): the dependent numeric observations, such asB2:B6.x(second, required): numeric predictor observations paired row by row with y, such asA2:A6.- Types: KDE XML labels y and x as floating-point array inputs; its C++ registration explicitly takes exactly two arguments with
setAcceptArray(). Reference ranges supply array values. - Optional arguments/defaults: none in KDE’s examined XML and registration.
- Mathematics:
slope = Σ[(xi−mean_x)(yi−mean_y)] / Σ[(xi−mean_x)^2]when denominator is nonzero. Units are y units per x unit.
The handbook documents SLOPE(y;x); KDE statistical XML confirms y is first. The 26.08.2 source computes mean-centered paired products and divides by x’s squared-deviation sum. This is independently compatible with ordinary least-squares algebra, but does not certify native error formatting.
Reproduce the sample data first
On a new sheet, enter these numbers in A1:G6. Row 1 is text labels; rows 2–6 are numeric. Keep the results outside this input area (for example in I2 and below). The helper columns deliberately transform the same pairs so you can check whether a formula responds as expected.
| Row | A · x | B · y | C · −y | D · 2x | E · y+10 | F · 2y | G · constant y |
|---|---|---|---|---|---|---|---|
| 1 | x | y | −y | 2x | y+10 | 2y | constant y |
| 2 | 1 | 2 | −2 | 2 | 12 | 4 | 5 |
| 3 | 2 | 3 | −3 | 4 | 13 | 6 | 5 |
| 4 | 3 | 5 | −5 | 6 | 15 | 10 | 5 |
| 5 | 4 | 4 | −4 | 8 | 14 | 8 | 5 |
| 6 | 5 | 7 | −7 | 10 | 17 | 14 | 5 |
Each row is one paired observation: A2 corresponds to B2, A3 to B3, and so on. Never sort one measurement column without sorting its paired column. Use a period as the decimal separator only in a locale configured for that convention. The formulas below use the semicolon (;) separator shown in KDE’s English-language function documentation; localized applications may use a different display/entry convention.
To reproduce a row in any example table, click an unused result cell, type the formula beginning with =, press Enter, and compare its display to the independently calculated expected value. Increase displayed decimal places when checking precision. The numerical values in this guide were not obtained from running Calligra Sheets.
Ten reproducible formulas and expected outputs
| # | Formula in an unused output cell | Independent expected output | What to notice |
|---|---|---|---|
| 1 | =SLOPE(B2:B6;A2:A6) |
1.1 |
Baseline response y relative to x. |
| 2 | =SLOPE(A2:A6;B2:B6) |
≈ 0.743243243243 |
Reversing predictor and response changes the question; not normally reciprocal. |
| 3 | =SLOPE(C2:C6;A2:A6) |
−1.1 |
Negating y negates the slope. |
| 4 | =SLOPE(D2:D6;A2:A6) |
2 |
Exact line D = 2x. |
| 5 | =SLOPE(E2:E6;A2:A6) |
1.1 |
Adding a constant to y does not change the slope. |
| 6 | =SLOPE(F2:F6;A2:A6) |
2.2 |
Doubling y doubles the slope. |
| 7 | =SLOPE(G2:G6;A2:A6) |
0 |
Constant y gives a flat fitted line when x varies. |
| 8 | =CORREL(A2:A6;B2:B6)*STDEVP(B2:B6)/STDEVP(A2:A6) |
1.1 |
Reconstruction from r and population standard deviations. |
| 9 | =COVAR(A2:A6;B2:B6)/VARP(A2:A6) |
1.1 |
Reconstruction from population covariance and variance. |
| 10 | =SLOPE(B2:B6;A2:A6)*6+INTERCEPT(B2:B6;A2:A6) |
7.5 |
Evaluate fitted line at a new x = 6. |
The independent arithmetic is straightforward: x̄ = 3, ȳ = 4.2, cross-deviation sum Sxy = 11, x squared-deviation sum Sxx = 10, and therefore m = 11/10 = 1.1. The other functions in rows 8–10 also have their own vendor documentation and must be present in the installed build to evaluate as written.
Advanced applied tutorial: estimate next period from paired historical data
Imagine A2:A6 are consecutive production batches 1–5 and B2:B6 record the corresponding material use 2, 3, 5, 4, 7 units. To make an easy-to-audit two-cell linear model, enter:
I2: =SLOPE($B$2:$B$6;$A$2:$A$6)
I3: =INTERCEPT($B$2:$B$6;$A$2:$A$6)
H5: 6
I5: =$I$2*H5+$I$3
Expected I2=1.1, I3=0.9, and fitted I5=7.5. The absolute range references ($) prevent moving the training data if you copy the formula. For a second forecast, put 7 in H6 and copy I5 down to I6 (expected 8.6), keeping the slope/intercept references absolute as shown. This is extrapolation beyond the observed x range 1–5; it is mathematically valid line evaluation but not proof the trend will continue.
To check a fit against real measurements, add predicted values in C only on a separate blank practice sheet (our shared sample uses C for negative y), or put the predictions in column J instead:
J2: =$I$2*A2+$I$3
Copy J2:J6. Expected fitted values are 2.0, 3.1, 4.2, 5.3, 6.4. Compare these to actual B values 2, 3, 5, 4, 7; the differences are residuals and should be inspected before using a prediction operationally.
Interpretation, errors, and edge cases
- All x values equal:
=SLOPE(G2:G6;G2:G6)has x variance zero; slope is mathematically undefined. The C++ wrapper verifies counts and computes a division by a zero denominator but does not explicitly state the final GUI error label. Native verification pending. - Mismatched or empty data: C++
func_slopecompares numeric counts and returns an internal value error for counts under one or unequal counts; application-visible error and treatment of text/blanks are unverified. - One point: algebraically
Sxx=0, so one point cannot define a unique slope—even if the function’s count check passes for one numeric item. - x and y order mistaken:
SLOPE(y;x)is notSLOPE(x;y); reversing it generally does not yield reciprocal slopes for scattered data. - Outliers, trends and seasonality: a linear slope is a description, not a guaranteed future rate or causal estimate. Avoid extrapolating without validating fit/residuals.
- Non-numeric strings/Boolean values: do not assume Excel’s behavior applies to Calligra; compare against native build using known inputs.
- Rounding and very large scales: the source implementation uses numeric arithmetic; display format, cancellation and precision may affect visible digits.
Shared troubleshooting checklist
- Confirm the entered formula begins with
=and the function name is spelled exactly as shown. - Follow the KDE semicolon syntax when using an English-style installation (
;rather than Excel’s common,). See KDE’s formula-entry guidance; adjust for your application’s locale where necessary. - Ensure both ranges represent the same observations in matching row order; the example uses five numeric points, not five random numbers from separate contexts.
- Check for numbers stored as text, blank cells, Boolean values and nonnumeric entries. The handbook/source do not establish all native pair-exclusion and coercion cases tested here; normalize source data or validate them in your installed build.
- Check for constant or nearly constant series. Correlation and regression denominators can be zero or poorly conditioned.
- If the result is visibly rounded, increase displayed decimal places before judging it incorrect. Floating-point arithmetic can produce tiny rounding differences.
- For a parsing failure, inspect argument separators and region-specific decimal characters before changing formula logic.
- For an unexpected error from a range, try the five-number all-numeric reproduction above, then restore your actual data one cell at a time. Do not assume a particular error label without a native test.
Compatibility: Excel and other applications
Microsoft’s SLOPE documentation also accepts known_y’s first, then known_x’s in the English Excel form SLOPE(known_y's, known_x's). KDE uses the semicolon presentation SLOPE(y;x). The shared least-squares definition is conceptual compatibility, not an import/export guarantee. No XLSX round-trip or Calligra native execution was run, and Microsoft’s rules about blank/text cells and visible error strings must not be asserted for Calligra without tests. The formula names SLOPE and INTERCEPT are common, but regional separators and supported build versions vary.
Related documentation with checked destinations
- KDE SLOPE, INTERCEPT, CORREL, COVAR, VARP, STDEVP.
- KDE regression source registration, source calculation, statistical XML; formula entry guide.
- Excel SLOPE reference — external compatibility check, not Calligra test evidence.
Claim-level official evidence (retrieved 2026-10-13)
| Claim | Source and release | How checked |
|---|---|---|
SLOPE(y;x), two numeric arrays, y before x |
KDE handbook, XML definition, C++ registration | Official documentation and release-pinned registration. |
| Count checking, mean-centered slope formula | KDE implementation | Source inspected; outputs separately calculated. |
| Intercept/slope combine for fitted predictions | KDE INTERCEPT implementation; SLOPE implementation | Algebra independently verified on exact input pairs. |
| Calligra 26.08.2 dated 2026-10-08 | KDE Gear announcement and Calligra release listing | Official dated release, as of 2026-10-13. |
| Excel syntax and Excel input expectations | Microsoft SLOPE help | Cross-software documentation comparison only. |
Version, platform, and verification scope
Research snapshot: KDE Gear / Calligra 26.08.2 (released October 8, 2026); checked October 13, 2026. The KDE application release listing identifies 26.08.2 as the current release on the checked date, and KDE’s release announcement records the release date. The handbook is a useful syntax reference but is not itself proof that every old handbook example matches every modern binary. This guide also compares the exact 72123cc643f6625351139e7df294544255a1056f source revision.
Platform: The cited upstream release and package information concerns Calligra primarily distributed for Linux, including distribution packages and Flathub. Which function is available in your installed binary depends on its package, version and enabled modules. We did not test Windows, macOS, mobile, or individual distribution builds, so this page does not certify identical results on those platforms.
Validation labels: OFFICIAL_DOCUMENTATION_CHECKED = described by KDE’s documentation/XML; SOURCE_LOGIC_INSPECTED = the named functions and argument counts were found in the pinned C++ source; INDEPENDENT_ARITHMETIC = output computed using ordinary mathematics outside Calligra; NATIVE_CALLIGRA_EXECUTION_NOT_RUN = no actual Calligra spreadsheet, screenshot, error dialog, or imported Excel workbook was tested. Treat boundary cases specifically marked unverified as test cases, not promised visible outputs.