> 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.

# CumulativeVariance

> Use the Sigma CumulativeVariance function to calculate the variance of a column up to and including the current row value.

The **CumulativeVariance** function calculates the variance of a column up to and including the current row value.

## Syntax

```
CumulativeVariance([field])
```

Function argument:

|           |                                                               |
| :-------- | :------------------------------------------------------------ |
| **field** | The column to reference when calculating cumulative variance. |

Cumulative functions depend on the order of the given column. If you change the sorting you will change the result.

## Example

```
CumulativeVariance([Close Price])
```

A table contains the daily close price of a stock in 2016. Variance can be used to show the volatility of a stock, where a higher variance indicates higher risk. We can use the **CumulativeVariance** function to identify the change in variance over time.

![](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/ac774414dff1520f7e4f5f678c6c505918cff5903387dbb5b5eaaeb27cd58bd2/assets/docs-images/715c9a3-image.png)

## Related resources

* [CumulativeStdDev](/docs/cumulativestddev)
* [MovingVariance](/docs/movingvariance)
* [Variance](/docs/variance)