Note: The other languages of the website are Google-translated. Back to English

Excel RSQ Function

The RSQ function returns the square of the Pearson product-moment correlation coefficient (r2) for two supplied sets of values.

rsq function 1


=RSQ(known_ys, known_xs)


  • known_ys (required): An array or range of data points.
  • known_xs (required): An array or range of data points.

Return Value

The RSQ function returns a numeric value.

Function Notes

  • Arguments can be either of the following:
    • Numbers;
    • Names, arrays, or references that contain numbers.
  • Logical values and other values that can be converted to numbers that you type directly into the list of arguments will be counted.
  • If text or empty cells are referenced as either of the arguments, the values will be ignored.
  • RSQ returns the #N/A error if known_ys and known_xs have different numbers of data points.
  • RSQ returns the #DIV/0! error if:
    • known_ys and known_xs are empty or have only one data point;
    • The standard deviation of the values in one or both of the supplied arrays equals to zero.
  • The equation for the Pearson product moment correlation coefficient (r, note that RSQ will return r2) is:

    Where x and y are the sample means of the two arrays of values.


Take the table below as an example. To get the square of the Pearson product-moment correlation coefficient for two supplied sets of values listed in the table, please copy or enter the formula below in the result cell, and press Enter to get the result.


rsq function 2

Related functions

Excel PEARSON Function

The PEARSON function returns the Pearson product-moment correlation coefficient (r) for two supplied sets of values.

Excel CORREL Function

The CORREL function returns the correlation coefficient of two cell ranges, which can be used to determine the relationship between two properties.

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet

Follow Us

Copyright © 2009 - | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL