--- title: "system.math.mean" description: "Given a sequence of values, calculates the arithmetic mean (average)." --- # system.math.mean > Given a sequence of values, calculates the arithmetic mean (average). This function is used in **Python Scripting**. ## Description Returns NaN (Not a Number) if passed an empty sequence. ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.math.mean(values)` ### Parameters Type | Parameter | Description ------- | ------- | ------ Float[] | `values` | A sequence of numerical values. Accepts both integers and floats. The sequence may not contain None type values. However, passing a None type object instead of a sequence of numerical values will return NaN. ### Returns **Float** - The arithmetic mean, or NaN if the input was empty or None. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Example #1" # Create a list of values. values = [3.5, 5.6, 7.8, 7.4, 3.8] # Prints the resulting value. print system.math.mean(values) ```