# prod() Function & Examples

Use the prod() statistics function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## prod

#### prod(a, b, c, ...)

#### prod(A)

Try it yourself:

```calculio
prod(2, 3, 4)
prod([2, 3, 4])
prod([2, 5; 4, 3])
```

[max](https://calcul.io/function/max/index.md)

[mean](https://calcul.io/function/mean/index.md)

[min](https://calcul.io/function/min/index.md)

[median](https://calcul.io/function/median/index.md)

[min](https://calcul.io/function/min/index.md)

[std](https://calcul.io/function/std/index.md)

[sum](https://calcul.io/function/sum/index.md)

[variance](https://calcul.io/function/variance/index.md)

---

## prod(): Product of Collection Values

**prod()** multiplies all values in a collection. For [2, 3, 4], the result is 24. It is useful for compound factors, scaling chains, and probability products.

## Zeros and precision

Any zero input makes the product zero. Large products can overflow and small fractional products can underflow, so log-space calculations with [log()](https://calcul.io/function/log/index.md) may be better for long sequences. Use [multiply()](https://calcul.io/function/multiply/index.md) for a fixed pair and [sum()](https://calcul.io/function/sum/index.md) for aggregation by addition.

Confirm collection shape with [size()](https://calcul.io/function/size/index.md) and handle empty inputs deliberately; a mathematical empty product convention may differ from an application’s expected value.

[All functions](https://calcul.io/functions/index.md)
