> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Corr

This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

The **Corr** function calculates the Pearson correlation coefficient, also known as the bivariate correlation, of two numerical columns.

The **Corr** function is an aggregate function.

Aggregate functions evaluate one or more rows of data and return a single value.

In a table element, the aggregate is calculated for each grouping. For information on how to add a grouping with an aggregate calculation to a table, see [Group columns in a table](/docs/create-and-manage-tables#group-columns-in-a-table).

In a table with no groupings, the aggregate is calculated for each row. For information on how to calculate summary statistics across all rows in a table, see [Add summary statistics to a table](/docs/create-and-manage-tables#add-summary-statistics-to-a-table).

To learn more about using aggregate functions, see [Building complex formulas with grouped data](https://www.sigmacomputing.com/resources/training-videos/table-grouping-and-functions#complex-formulas).

## Syntax

`Corr(number column 1, number column 2)`

Function arguments:

* **number column 1** (required) - A column of numbers representing the dependent data.
* **number column 2** (required) - A column of numbers representing the independent data.

## Example

`Corr([Quantity], [Price])`

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/2039ce6f0f0a7933688bb0577537677d4d510b6d60a070524f6c91fbe0a7eee7/assets/docs-images/11d49f2-Screenshot_2023-03-07_at_12.49.31_PM.png)

With this negative correlation, we can see that as price increases, the quantity of purchased item decreases.

## Related resources

* [CumulativeCorr](/docs/cumulativecorr)
* [MovingCorr](/docs/movingcorr)