# Aggregate Functions: Sum, Average & More

Use total, average, minimum, maximum, median, mode, and count across consecutive calculator lines, with editable examples for every aggregate.

## Aggregate functions

Aggregate keywords operate on the consecutive non-empty calculator lines above them.

## Sum and total

```calculio
10
20
30
total
```

## Average

```calculio
10
20
30
average
```

## Minimum and maximum

```calculio
8
3
21
min
```

```calculio
8
3
21
max
```

Other supported aggregate keywords include `count`, `median`, and `mode`.

## How aggregate lines are evaluated

Place an aggregate keyword directly below the values you want to summarize. Calcul.io reads upward through the consecutive non-empty lines, stops at the first blank line, and returns the result on the aggregate line. A blank line therefore acts as a boundary between separate groups of values.

Because every input remains visible, you can add, remove, or edit a value and see the total or statistic update in context. Use `total` for a sum, `average` for the arithmetic mean, `min` and `max` for the range endpoints, or `count` to report how many values are in the current group.

For additional operations and function syntax, browse the [statistics functions](https://calcul.io/functions/Statistics/index.md) or the complete [function reference](https://calcul.io/functions/index.md).
