Excel functions / Statistics

RSQ function

R squared: the share of the variation in y that the best-fit line explains, from 0 to 1.

Syntax

=RSQ(known_y, known_x)

Arguments

When to use it

RSQ gives R squared: the share of the variation in y that the best-fit straight line through x explains, from 0 to 1. An RSQ of 0.9 means the line accounts for 90% of the ups and downs; 0.1 means it explains very little.

It is the correlation (CORREL) squared, and it is the "R Square" line in the Analysis ToolPak's Regression report.

Examples

  1. How well ad spend explains sales

    ABCD
    1Ad spendSales
    2101200.988
    315150
    420168
    525205
    630222

    In D2: =RSQ(B2:B6, A2:A6) → 0.988

    Try this example

  2. As a percentage

    ABCDE
    1TempConesRain
    214132697%
    3191760
    4222401
    5111089
    6262710
    7161712

    In E2: =RSQ(B2:B7, A2:A7) → 97%

    Temperature explains about 97% of the change in cones sold.

    Try this example

Common mistakes

RSQ in other languages

Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.

Translate a whole formula

Try RSQ in the playground

Practise it

Related functions