Correlation Coefficient Calculator

This calculator measures how strongly two variables move together, returning Pearson's correlation coefficient, known as r, and the coefficient of determination, R-squared. Correlation is one of the most used ideas in statistics, telling you whether two things rise and fall together, move in opposite directions, or have no linear relationship at all. Pearson's r runs from minus one to plus one: a value near plus one means a strong positive relationship, where high x goes with high y; near minus one means a strong negative relationship; and near zero means little or no linear association. R-squared, the square of r, tells you the proportion of the variation in one variable that is explained by a straight-line relationship with the other, which is why it is reported alongside regression lines. You paste your x values and your y values into the two boxes, with the same number of points in each, and the calculator returns r, R-squared, the number of pairs, and an interpretation of the strength. The results update as you edit the data. Use it to explore relationships in data, to check a statistics assignment, or to quantify how well two measures track each other, such as study hours and test scores, or temperature and sales. A crucial caution: correlation does not imply causation, and r only captures linear relationships, so a strong curve can show a low r. Always plot your data as well. The calculation uses the standard Pearson formula and is exact for your inputs, rounded for display.

0.965
Pearson's correlation (r)
R-squared0.932
Data pairs8
StrengthStrong positive

r runs from -1 to +1. Correlation is not causation, and r only measures linear relationships. Use equal-length x and y lists. Rounded for display.

How it works

Pearson's r is the covariance of x and y divided by the product of their standard deviations, equivalently the sum of the products of each pair's deviations from their means, divided by the square root of the product of the sums of squared deviations. R-squared is simply r squared, the share of variation explained by a linear fit.

Worked example

For x = 1 to 8 and y = 2, 4, 5, 4, 6, 7, 8, 9, the points rise together tightly, giving an r of about 0.965, a strong positive correlation. R-squared is about 0.932, meaning roughly 93 percent of the variation in y is explained by a straight-line relationship with x.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

© 2019 to 2026 Calculate.co.nz. All rights reserved.