Contact

SLOPE Function in Apple Numbers: Fit a Linear Trend with Examples

Statistical Intermediate Apple Numbers

Find the rate of change of a best-fit line in Apple Numbers using paired x/y ranges, official syntax, examples, predictions and common problems.

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

Quick answer: =SLOPE(B2:B6,A2:A6) estimates the change in y for an increase of one unit in x, using the least-squares best-fit straight line. For the sample below, the independently calculated expected slope is 0.6 tasks per additional hour. This describes an association in the sample; it does not prove an extra hour causes extra tasks.

A positive slope points upward as x increases; a negative slope points downward. A slope is a rate in y-units per x-unit and is not the unitless correlation coefficient. To reconstruct the fitted equation Å· = intercept + slope × x, use Apple’s separate INTERCEPT function.

Availability and version history

  • Introduced: Documented in Apple’s Formulas and Functions Help 15.4; the original introduction release is not established.
  • Availability: Currently documented for Numbers in that help version; it is not a final supported-version endpoint.
  • Scope: Shared iWork function help. Availability in individual clients and older releases is not established by this check.
  • Checked: October 14, 2026, against the official SLOPE reference. Documentation check; not a new native test.

Exact official syntax and argument order

=SLOPE(y-values, x-values)
Apple argument Required? Meaning and documented accepted types
y-values Yes, first Dependent-value collection; number, date/time or duration values, consistent within that collection.
x-values Yes, second Independent-value collection; number, date/time or duration values, consistent within that collection.

There are no optional arguments or documented defaults. Apple says the two collections must be the same size or SLOPE returns an error. Numbers’ documentation allows compatible date/time and duration collections; those must be interpreted with appropriate units, and cross-type conversions are not assumed. The tutorial calculations are intentionally all numeric. Apple SLOPE function reference.

Remember y first, x second. Apple’s CORREL function labels the arguments x then y, which is different. Interchanging SLOPE’s two numeric arguments generally estimates x as a function of y, not the same slope as before.

Platform, locale, and table references

These formulas are documented in Apple Formulas and Functions Help 15.4 (reviewed 2026-10-12). This is a documentation-version attribution, not a claim that the function was introduced in Numbers 15.4 or behaves identically on every older Mac, iPhone, iPad, or iCloud release. Apple Numbers native execution across platforms was not available for this review. Apple’s Numbers release documentation should be checked for availability in a particular installation.

The worked formulas are written for an English locale with a period as the decimal separator; arguments are separated with commas. Apple explicitly instructs that if the decimal separator is a comma, use a semicolon as the manually typed argument separator, for example a two-argument formula =FUNCTION(A2:A6;B2:B6) instead of =FUNCTION(A2:A6,B2:B6). The formula separator is not a data-range separator: A2:A6 still uses a colon. Function names are case-insensitive. See Apple’s Functions overview.

The simple ranges in the examples are in one Numbers table. Numbers supports table-qualified and sheet-qualified references when formulas refer to other tables or sheets; use Numbers’ cell-reference picker when working across tables instead of copying Excel’s Sheet!A2:A6 syntax. See Apple’s cell-reference guide.

Reproduce the example in a Numbers table

  1. Create a new Numbers table named Observations with at least six rows and four columns. Use row 1 as the header row. Enter X (hours) in A1 and Y (tasks) in B1. The observations are illustrative only; they are not evidence that hours cause task output.
  2. Enter the following values as numeric cells, without typing hours or tasks into the number cells. Leave C2:C6 blank initially.
  3. Enter the example formula in an unused cell such as D2, outside its two source ranges. Format the result cell to show enough decimal places if needed.
Table row A — X (hours) B — Y (tasks)
2 1 2
3 2 4
4 3 5
5 4 4
6 5 5

Every expected result below comes from independent calculation or Apple’s published worked example, not from execution in Apple Numbers.

First calculation: expected slope of 0.6

=SLOPE(B2:B6,A2:A6)

Expected result: 0.6. Here the x mean is 3, the y mean is 4, the centered cross-product sum is 6, and x’s centered square sum is 10. The ordinary least-squares slope is 6 ÷ 10 = 0.6 tasks per hour. This is independent arithmetic, not an observation from Numbers.

Advanced uses: fit and apply the complete regression line

1. Predict a value with slope and intercept together

The same numeric records give =INTERCEPT(B2:B6,A2:A6) → expected 2.2. Combining the two values produces the fitted line ŷ = 2.2 + 0.6x. To calculate the estimated y value at x = 3 from the fitted line:

=INTERCEPT(B2:B6,A2:A6)+SLOPE(B2:B6,A2:A6)*3

Expected result: 4.0. The formula predicts the fitted average trend, not necessarily the exact observation for x=3 (the table contains y=5 there).

To estimate y at x = 6 instead, use the same expression with *6; the expected value is 5.8. This is extrapolation, since the observed x values only span 1–5; treat it cautiously.

2. Swapping columns changes the regression problem

=SLOPE(A2:A6,B2:B6)

Expected result: 1.0, rather than 0.6. This second formula treats hours as dependent and tasks as independent. Both results can be mathematically correct, but they answer different questions. That is why a seemingly harmless argument swap can silently mislead a report.

3. Negative trend using a second dataset

Change B2:B6 to numeric values 8, 6, 4, 2, 0 for x=1..5. =SLOPE(B2:B6,A2:A6) then has an independently calculated expected result of −2. Restore the original y-values after the demonstration.

4. Reconcile with the Apple documentation example

Apple’s official SLOPE example uses ten paired heating-oil price/thermostat-setting records. On those ten rows its =SLOPE(B2:B11,A2:A11) evaluates to about −3.23374495288702. The five-row classroom sample on this page is different and should not be expected to give that output.

Errors, limits and troubleshooting

  • Missing or uneven data: Apple’s SLOPE reference explicitly says collections must be the same size; B2:B6 versus A2:A5 is not valid. Match each observation by row.
  • One constant x value repeated: With no variation in the independent variable, the least-squares slope divides by zero centered x variation, so it is mathematically undefined. The exact Numbers error text is not verified here.
  • Swapped argument order: Numbers’ SLOPE(y,x) is not CORREL(x,y) and is not SLOPE(x,y); use the appropriate dependent y column first.
  • Text like 4 hours in a numeric column: Enter numbers only and put unit labels in the header. Apple’s SLOPE page does not independently document every rule for text/Boolean/blank pairing. Don’t copy Excel-specific blank handling or error codes into Numbers guidance.
  • Wrong units: Hours versus minutes changes the numerical slope by a scaling factor; always label what one x-unit means.
  • Relationship is curved or dominated by an outlier: A single straight-line slope can be unrepresentative. Examine a scatter chart and residuals, not only the coefficient.
  • Referenced range shifts after copying a formula: Confirm both ranges refer to the same five records and that the result cell is not itself inside either range.
  • Locale issues: Use ; between arguments when comma is the decimal separator, per Apple. Do not change the range colon.

Excel and Google Sheets compatibility — checked, not assumed

  • Microsoft Excel: SLOPE is documented as SLOPE(known_y's,known_x's); its y-then-x order matches Apple’s SLOPE(y-values,x-values) for numeric ranges. Do not transfer Excel-specific ignored-value and error-code behavior without Numbers evidence.
  • Google Sheets: SLOPE is documented as SLOPE(data_y,data_x). Both use dependent y first for this function.
  • Important contrast: Apple’s CORREL lists x first, while SLOPE and INTERCEPT put y first. Copying a working CORREL argument order directly into SLOPE can silently change what line is being fitted, producing a different slope without a syntax error.

Official sources and validation ledger

Official Apple documentation, accessed 2026-10-12: function reference; Functions overview; table references; Numbers release documentation. The help URL specifies documentation version 15.4; no first-supported-release claim is made.

  • DOCUMENTATION CHECK: Function purpose, names, argument order, allowed value types and documented limitations were transcribed from Apple, then paraphrased. There is no claim that Excel or Sheets documentation proves Numbers behavior.
  • INDEPENDENT CALCULATION: Five-row worked examples and secondary computations were checked using transparent arithmetic (sum of centered products and sums of squared deviations). Expected results are not observed application outputs.
  • APPLE PUBLISHED EXAMPLE: The heating-oil example is described as Apple’s example, with independently reproduced arithmetic; the quoted approximate output is not a native test performed here.
  • NOT VALIDATED: Apple Numbers application execution, screenshots, regional-device testing and older-release behavior.

If a real Numbers installation disagrees, keep the discrepancy visible for investigation instead of hiding an error behind IFERROR.