{"id":8835,"date":"2020-11-25T12:39:39","date_gmt":"2020-11-25T11:39:39","guid":{"rendered":"https:\/\/blog.sheetgo.com\/?p=8835"},"modified":"2025-06-16T22:22:13","modified_gmt":"2025-06-16T20:22:13","slug":"formula-de-correlacao-no-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-formulas\/correlation-formula-google-sheets\/","title":{"rendered":"Como usar a fun\u00e7\u00e3o CORREL no Planilhas Google"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.27.2&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>When you&#8217;re carrying out data analysis, statistical measures help you to understand underlying trends. One of the most common statistical metrics is <strong>correlation<\/strong>. It&#8217;s used to gauge the extent of the relationship, or dependence, of two variables.<\/p>\n<p>The measure of correlation is called the <strong>correlation coefficient<\/strong>. If you have two sets of variable data, you can calculate the Pearson product-moment correlation coefficient (<strong>r<\/strong>) using the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093990\" target=\"_blank\" rel=\"noopener noreferrer\">CORREL function<\/a> in Google Sheets.<\/p>\n<p>Note: If you are looking for more functions, we have a huge guide of <a href=\"https:\/\/www.sheetgo.com\/blog\/excel-features\/100-functions-formulas-for-google-sheets-excel-basics\/\">100+ Functions &amp; Formulas for Google Sheets &amp; Excel Basics<\/a><\/p>\n<h3>Measuring correlation in Google Sheets<\/h3>\n<p>The Pearson product-moment correlation coefficient (also referred to as Pearson&#8217;s\u00a0r, or simply r) measures the strength of the\u00a0<strong>linear<\/strong>\u00a0association between two variables.<\/p>\n<p>The correlation coefficient<strong> r<\/strong>\u00a0has a value of between \u22121 and 1.<\/p>\n<ul>\n<li>When r = 1, it indicates that the two variables are in a perfect linear relationship. In this case, if x increases, y will increase by the same amount.<\/li>\n<li>When r = 0, it suggests that there is no correlation between the variables.<\/li>\n<li>A value of \u22121 implies that the variables are in a perfectly correlated negative relationship. This means that if x increases, the value of y decreases by a proportionate amount, and vice versa.\u00a0<\/li>\n<\/ul>\n<p>The three graphs below will help you get a better understanding of correlation.<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Connections T &#8211; Automate between spreadsheets &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button-light vertical-banner-container&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;255443&#8243; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/run-automatically-connect-sheet-icons.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">Automate data transfers between spreadsheets<br \/><\/span><\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Find out how<\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Positive correlation<\/h4>\n<p>This positively correlated data has a correlation coefficient of about 0.9 \u2013 close to the maximum of 1. If the correlation were truly 1, then the data would be in a perfectly straight line.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Correl-image-1.png&#8221; alt=&#8221;correl-function-google-sheets-graph-1&#8243; title_text=&#8221;Correl image 1&#8243; _builder_version=&#8221;4.23.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Negative correlation<\/h4>\n<p>The negatively correlated data has a coefficient of about -0.9, which means that the data is well-correlated, but in a negative relationship. So in this case, y decreases as x increases.<\/p>\n<p>In both the positive and negative correlations, it&#8217;s possible to draw a \u201cline of best fit\u201d through the data points. This line would give a fairly accurate representation of the data.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Correl-image-2.png&#8221; alt=&#8221;correl-function-google-sheets-graph-2&#8243; title_text=&#8221;Correl image 2&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>No correlation<\/h4>\n<p>In the graph below, you can see non-correlated data with a correlation coefficient of about 0.04. This indicates that there is no meaningful relationship between the x and y variables.<\/p>\n<p>You would have a hard time drawing any sort of line of best fit through these data points!<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Correl-image-3.png&#8221; alt=&#8221;correl-function-google-sheets-graph-3&#8243; title_text=&#8221;Correl image 3&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>If you want to read more about the Pearson product-moment correlation coefficient and how to calculate it,\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Pearson_correlation_coefficient\" target=\"_blank\" rel=\"noopener noreferrer\">here\u2019s the link<\/a>.<\/p>\n<h3>Syntax<\/h3>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=CORREL(data_y, data_x)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li><strong>data_y<\/strong> \u2013 is the range of values or a reference to the range of cells that contain the dependent data.<\/li>\n<li><strong>data_x<\/strong> \u2013 is the range of values or a reference to the range of cells that contain the independent data.<\/li>\n<\/ul>\n<p>As you can see, there are two options for inputting the dataset. You can use a reference range, or input the data directly into the function.<\/p>\n<p>Generally, using a reference range is a better option. That&#8217;s because your data is probably already in the spreadsheet. Using a reference range means you won\u2019t have to re-type it in the function itself.<\/p>\n<p>If you do choose to type the dataset directly into the formula, make sure you enclose both the x and y data in curly brackets {}. If you\u2019re referencing the data in a range of cells, you don&#8217;t need to use curly brackets.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>How to use the correlation function in Google Sheets<\/h3>\n<p>In the syntax, you can see that you need two sets of data (x and y) for the CORREL function to return a value.<\/p>\n<p>I\u2019ll now show you some practical examples in Google Sheets.<\/p>\n<h4>Correlation using brackets<\/h4>\n<p>The parameters for the CORREL function accept the input values in two different ways.<\/p>\n<p>You can choose to input the direct numeric datasets using curly brackets that indicate ranges.<\/p>\n<p>As you can see, this is what I&#8217;ve done in the example in row 2.\u00a0 Here I have typed in the formula =Correl({8.4,8,1.8,7.2,0.9},{14,20,6,12,3}).<\/p>\n<h4>Correlation using range references<\/h4>\n<p>Alternatively, you can simply use range references. You can see that in the example in row 3, where I\u2019ve typed =Correl(A2:A11,B2:B11).<\/p>\n<p>In both examples, you get a correlation coefficient that is positive and close to 1. While interpretations vary depending on the application and the nature of the data, the first correlation coefficient of 0.91 indicates that the data is closely correlated. So, when<strong> x<\/strong> changes, <strong>y<\/strong> changes in a very similar way.<\/p>\n<p>The second correlation coefficient of 0.75 indicates that the data is less correlated than the first dataset \u2014 but still fairly correlated.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Correl-image-4.png&#8221; alt=&#8221;correl-function-google-sheets-4&#8243; title_text=&#8221;Correl image 4&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Positive relationship<\/h4>\n<p>Now, you\u2019ll see how the function behaves if the x and y data are in a linear relationship (y = 10x + 5).<\/p>\n<p>In the following image, I\u2019ve added data that fits this relationship. Since this is a direct dependency, the function returns 1 for the correlation coefficient.<\/p>\n<p>Remember, a value of 1 indicates that the data is perfectly correlated.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Correl-image-5.png&#8221; alt=&#8221;correl-function-google-sheets-5&#8243; title_text=&#8221;Correl image 5&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h4>Negative relationship<\/h4>\n<p>What happens when I try an equation with a negative slope (y = -5x+10)?<\/p>\n<p>In this case, the correlation coefficient should be -1, because this is a negative dependency. So when <strong>x<\/strong> increases, <strong>y<\/strong> decreases by a proportional amount.<\/p>\n<p>You can see in the snapshot below that this is indeed the case.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2020\/11\/Correl-image-6.png&#8221; alt=&#8221;correl-function-google-sheets-6&#8243; title_text=&#8221;Correl image 6&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>That&#8217;s the Sheetgo guide on how to calculate a correlation in Google Sheets \u2014 thanks for reading! Looking for more advanced Google Sheets tips? Check out our other posts such as how to <a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/import-google-sheets-data-into-another-sheet\/\" target=\"_blank\" rel=\"noopener noreferrer\">import Google Sheets data from one sheet to another<\/a> or how to use <a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/combine-query-with-importrange-in-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">QUERY with Importrange.<\/a><\/p>\n<h4>Did you like this post?<\/h4>\n<p>Share it with your colleagues, friends, and fellow spreadsheet users via the social media buttons on the left.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.22.2&#8243; background_color=&#8221;#f9f9ff&#8221; custom_margin=&#8221;40px||40px||false|false&#8221; custom_padding=&#8221;15px|25px|15px|25px|true|true&#8221; border_width_left=&#8221;3px&#8221; border_color_left=&#8221;#808e95&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><em><strong>Editor\u2019s note<\/strong>: This is a revised version of a previous post that has been updated for accuracy and comprehensiveness.<\/em><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you&#8217;re carrying out data analysis, statistical measures help you to understand underlying trends. One of the most common statistical metrics is correlation. It&#8217;s used to gauge the extent of the relationship, or dependence, of two variables. The measure of correlation is called the correlation coefficient. If you have two sets of variable data, you [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":27682,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"Analyzing data entails going through various statistical measures to understand the underlying nature and trends. Probably, one of the most commonly used statistical methods is Correlation.&nbsp;We use it to gauge the extent of relationship, dependence or closeness of two variables with respect to each other. And the metric used to calculate this dependence is called correlation coefficient. Given the two sets of variable data, we can calculate the Pearson product-moment correlation coefficient (<strong>r<\/strong>) using the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093990\" target=\"_blank\" rel=\"noopener noreferrer\">CORREL<\/a> formula in Google Sheets.\n\nIt is worth noting that the correlation coefficient <strong>r<\/strong> ranges from \u22121 to 1. When <strong>r<\/strong> = 1, it indicates the two variables are in a perfect linear relationship. And when <strong>r<\/strong> = 0, it implies that there is no correlation between the variables.&nbsp;A value of \u22121 implies that the variables are in a negative relationship i.e. if x increases, then the value of y decreases and vice versa.&nbsp;If you are interested in reading through some literature as to how we usually calculate the Pearson product-moment correlation coefficient, here\u2019s the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pearson_correlation_coefficient\" target=\"_blank\" rel=\"noopener noreferrer\">link<\/a> to it.\n<h3>Syntax<\/h3>\n<strong>CORREL(data_y, data_x)<\/strong>\n<ul>\n \t<li><strong>data_y<\/strong> - is the range of values or a reference to the range of cells that consists of the dependent data.<\/li>\n \t<li><strong>data_x<\/strong> - is&nbsp;the range of values or a reference to the range of cells that consists of the independent data.<\/li>\n<\/ul>\n<h3>Usage: CORREL formula in Google Sheets<\/h3>\nHaving gone through the syntax, we now understand that we need two sets of data for the formula to return a value. Now, let us go ahead and try our hands practically on Google Sheets application itself. Consider the screenshot below.\n\n<img class=\"aligncenter size-full wp-image-8943\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2018\/06\/CORREL-formula-Illustration-Frame-1.png\" alt=\"CORREL formula in Google Sheets\" width=\"863\" height=\"554\">\n\nThe parameters accept&nbsp;the input values in two different ways. We can either choose to input the direct numeric datasets using curly braces that indicate ranges (first example). Or we can simply use range references (second example).\n\nNow, let us see how the formula behaves if x and y data were in a linear relationship (y = 10x + 5). Please see the following image. Since this is a direct dependency, the formula returns 1 for output.\n\n<img class=\"aligncenter size-full wp-image-8945\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2018\/06\/CORREL-formula-Illustration-Frame-2.png\" alt=\"CORREL formula in Google Sheets\" width=\"863\" height=\"554\">\n\nWhat if we tried an equation with a negative slope (y = -5x+10)? We should see -1 in our result because this is a negative dependency. And, the snapshot below confirms it.\n\n<img class=\"aligncenter size-full wp-image-8946\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2018\/06\/CORREL-formula-Illustration-Frame-3.png\" alt=\"CORREL formula in Google Sheets\" width=\"863\" height=\"554\">","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-8835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/8835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/comments?post=8835"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/8835\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/27682"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=8835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=8835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=8835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}