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

# Avg

> Use the Sigma Avg function to calculate the average value of a column of numbers.

The **Avg** function calculates the average value of a column of numbers. The average value of a column is equal to the sum of the values divided by the number of values. To calculate the average of a set of rows based on a condition, see **[AvgIf](/docs/avgif)**.

The **Avg** 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

`Avg([column])`

* **column** (required) - The column to calculate the average of.

## Example

```
Avg([Score])
```

Calculate the average score in a column. If the `[Score]` column contains values 2, 4, 6, 8, and 10, returns `6` when used in a table summary.

```
Avg([Population 2010] - [Population 2000])
```

Calculates the average change in population for each group. For example, consider a table with columns `[City]`,  `[State]`, `[Population 2000]`, and `[Population 2010]`. If the table is grouped by `[State]`, and this formula is used as a calculation for that grouping, it returns the average change in population for each state.

```
GrandTotal(Avg([Cost]))
```

When used in a calculated column in a table, returns the average cost from the `[Cost]` column in each row.

## Related resources

* [CumulativeAvg](/docs/cumulativeavg)
* [Median](/docs/median)
* [MovingAvg](/docs/movingavg)
* [PercentileCont](/docs/percentilecont)
* [AvgIf](/docs/avgif)