Contact

RSQ Function in Apple Numbers: R-Squared and Explained Variation

Statistical Intermediate Apple Numbers

Use Apple Numbers RSQ to assess straight-line fit, distinguish squared correlation from signed correlation, and troubleshoot paired data.

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

Quick answer: To calculate the coefficient of determination (R²) for paired numerical observations in Numbers, use =RSQ(B2:B6,C2:C6). Apple’s help defines RSQ as the R-squared value for the best-fit linear regression line through the observations. It is the square of Pearson’s correlation coefficient, and does not preserve whether the underlying trend is positive or negative. [A1]

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 RSQ reference. Documentation check; not a new native test.

Official syntax, argument order and accepted inputs

=RSQ(x-values, y-values)
Argument Required? Meaning in Apple’s reference
x-values Yes A collection of x-axis independent observations; same number of values as y-values.
y-values Yes A collection of y-axis dependent observations paired position-for-position with x.

There is no documented optional regression-method flag, intercept switch or default value. Apple’s parameter order is x first, y second. Always use two aligned equal-length numeric ranges for the examples below; Apple does not describe detailed blank/text/error coercion behaviour on this RSQ article. Do not rely on assumptions from Excel or Google Sheets to fill that gap. [A1]

Interpretation: For a single-predictor ordinary straight-line fit with an intercept and adequately behaved observations, R² is mathematically r²; thus a value closer to 1 means a better line fit to these observations. It is not a forecast accuracy percentage, a probability that the model is true, or proof of a causal link. With a negative Pearson r of āˆ’1, R² is still 1. Apple’s help explicitly states the squaring relationship. [A1, C1]

Apple Numbers table references, locale settings and versions

These examples target the current English Apple Formulas and Functions Help, edition 15.4. In Numbers, make a named table, type numeric observations into cells, select the formula result cell outside its inputs, and use the formula editor to select the source cells. A range such as B2:B6 is a reference inside the same table. For data in a different table, select that table’s cells and let Numbers insert a qualified reference such as Measurements::B2:B6. Avoid Excel’s Sheet1!B2:B6: its exclamation-mark sheet notation is not Numbers’ reference convention. Apple explains table references in Refer to cells in formulas. [R2]

Apple’s English function syntax uses commas to separate arguments, for example =AVERAGE(2,4). When the document’s settings use a comma as the decimal separator, Apple’s Functions overview tells users to separate manually typed arguments with a semicolon—for example =AVERAGE(2;4). A range’s colon remains a colon. Enter values with the decimal symbol configured for the file. The spellings shown below are the canonical English function names; Apple’s overview says capitalization does not affect manually entered names. [R1]

Apple documents these functions in Formulas and Functions Help 15.4 and makes its formulas help available to iWork apps. That help edition does not prove the function first appeared in Numbers 15.4 or establish a minimum release for Mac, iPhone, iPad or iCloud.com. Apple’s Mac release-history page separately identifies Numbers 14.4 as adding over 30 advanced functions such as LET, LAMBDA and FILTER; it does not specify a PEARSON/RSQ/STANDARDIZE introduction date. Release-specific behaviour, display formatting and parity across Mac, iPhone, iPad and iCloud.com are not natively tested here. [R3, R4]

Verification key: ā€œApple-documentedā€ means a statement appears in the cited Apple Help article. ā€œIndependently calculatedā€ means the arithmetic was reproduced without the Numbers engine (exact rational or standard-library mathematics). Neither is an on-device formula execution. No screenshots or instrumented Numbers execution is claimed.

Apple’s reproducible five-pair example (no header row)

Use a Numbers table with the following five data rows starting in row 1 and no header row. Place the RSQ formula outside the source table ranges (for example D1). If you keep a Numbers header row, instead put the pairs in B2:C6 and adjust references. [A1]

Row A: x B: y
1 2 6
2 3 5
3 9 11
4 1 7
5 8 5
=RSQ(A1:A5,B1:B5)

Apple-documented expected result: 0.208858840650012. Apple also states this is equal to =PEARSON(A1:A5,B1:B5)^2. Independent arithmetic yields the exact fraction 6889/32984 = 0.20885884065001212…. The result is approximately 20.9% on a linear-variation-explained interpretation for this simple one-predictor example, not 20.9% certainty that the model predicts future observations. [A1, A2, C1]

Calculation audit — not an execution test

For x=2,3,9,1,8 and y=6,5,11,7,5, independently sum n=5, Σx=23, Σy=34, Σxy=173, Σx²=159, and Σy²=256:

R² = [nĪ£(xy)āˆ’(Ī£x)(Ī£y)]² / ([nĪ£(x²)āˆ’(Ī£x)²][nĪ£(y²)āˆ’(Ī£y)²])
   = 83² / (266 Ɨ 124)
   = 6889 / 32984
   ā‰ˆ 0.208858840650012

This is a standard mathematical derivation. It verifies that the documented outcome is arithmetically consistent, but it cannot certify app-specific handling of missing rows, dates or error values. [C1]

Formula (same table) Independently expected What it reveals
=RSQ(A1:A5,B1:B5) 0.208858840650012 Direct R-squared.
=PEARSON(A1:A5,B1:B5)^2 0.208858840650012 Apple-stated relationship.
=RSQ(B1:B5,A1:A5) 0.208858840650012 Symmetric square of Pearson r on clean pairs.
=PEARSON(A1:A5,B1:B5) 0.457010766448682 Signed coefficient, not R².

Practice: perfect upward and downward lines

In a new table called TrendCheck, put headers in row 1: A=Month, B=Activity, C=Positive, D=Negative. Enter four numeric rows below.

Row A: Month B: Activity C: Positive D: Negative
2 1 1 2 8
3 2 2 4 6
4 3 3 6 4
5 4 4 8 2
=RSQ(B2:B5,C2:C5)
=RSQ(B2:B5,D2:D5)
=PEARSON(B2:B5,D2:D5)

Independently calculated expected results: 1, 1, and āˆ’1, respectively. A falling straight line still has a perfect straight-line fit, so RSQ alone cannot tell direction. Use PEARSON’s sign or SLOPE’s sign to distinguish increase from decrease. [C2]

Advanced: a noisy straight-line relationship

Replace the four Positive values in C2:C5 with 2,5,4,8, while leaving Activity B2:B5 as 1,2,3,4:

=RSQ(B2:B5,C2:C5)

Independently calculated expected result: 289/375 ā‰ˆ 0.770666666666667. The corresponding Pearson coefficient is ā‰ˆ 0.877876225140348. Here, R² is useful for summarizing how much in-sample linear variation that one predictor captures. It does not demonstrate that a model trained on four records will forecast future activity reliably, and it does not apply automatically to nonlinear models or formulas with different assumptions. [C2]

Errors, limitations and troubleshooting

  • Unequal lengths: Apple requires matching collection sizes. Check B2:B5 versus C2:C5; a one-row discrepancy violates the documented input constraint. The exact Numbers error string has not been checked natively. [A1]
  • Constant column: If every x is 2 or every y is 7, the Pearson denominator is mathematically zero and R² is undefined. Do not interpret an app error, blank or arbitrary display as R²=0 without native verification. [C1]
  • Blanks and text: Apple’s RSQ article does not specify missing-row pairing or coercion. Validate a fully numeric, equal-length table and inspect any unexpected blanks. Do not transfer Excel-specific blank-cell rules into Numbers without documentation. [A1]
  • Unexpectedly high R²: Sorting each column independently creates artificial matching that can alter both coefficient and sign. Preserve row pairs and watch for duplicate/derived observations. [C1]
  • Meaning of 0: A small R² means the best fit of the documented straight-line relationship is weak for these observations. It is not a mathematical proof that the variables are unrelated; a curved pattern can be missed. [C1]
  • Direction hidden: R² removes sign: for downward trend inspect =PEARSON(...) or =SLOPE(...), not RSQ alone. [A1, C2]
  • Number formatting: Displaying R² with a percent style is legitimate if clearly labeled explained linear variation, but do not call 77% a ā€œ77% chance of being correct.ā€ [C2]
  • Broken cross-table reference or circular calculation: Use the Numbers formula editor to select the two appropriate columns and place results outside their source ranges. [R2]

Compatibility and portability

The mathematical coefficient of determination is shared terminology across spreadsheet tools. That does not establish identical input coercion, missing-data treatment, date/duration behavior or precise error values across Numbers, Excel, Google Sheets or LibreOffice. Apple documents RSQ(x-values, y-values) and its Pearson-squared relationship for the present help version. For cross-platform imports, independently verify formula handling and Numbers table qualification instead of assuming Sheet1!A1:A5 works in Numbers. [A1, R2]

  • PEARSON — shows the signed association underlying R².
  • CORREL — equivalent signed Pearson calculation for the same clean pairs.
  • SLOPE — determines whether the fitted line increases or decreases.
  • INTERCEPT — estimates the straight-line y intercept, not a model-fit measure.

References and verification (checked 2026-10-13 UTC)

Native-validation limitations: No Numbers execution or screenshots were performed. Check important mixed-type, blank and locale edge cases on the intended device.