experimental.stddev() function

The experimental.stddev() function is subject to change at any time. By using this function, you accept the risks of experimental functions.

The experimental.stddev() function computes the standard deviation of non-null values in the _value column for each input table.

Function type: Aggregate
Output data type: Float

import "experimental"

experimental.stddev(mode: "sample")



The standard deviation mode or type of standard deviation to calculate. Defaults to "sample".

Data type: String

Available options:


Calculate the sample standard deviation where the data is considered to be part of a larger population.


Calculate the population standard deviation where the data is considered a population of its own.


import "experimental"

from(bucket: "example-bucket")
  |> range(start: -5m)
  |> filter(fn: (r) =>
    r._measurement == "cpu" and
    r._field == "usage_system"
  |> experimental.stddev()

Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: