﻿---
title: ES|QL VARIANCE function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/2993/reference/query-languages/esql/functions-operators/aggregation-functions/variance
products:
  - Elasticsearch
---

# ES|QL VARIANCE function
## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/2993/reference/query-languages/esql/images/functions/variance.svg)


## Parameters

<definitions>
  <definition term="number">
  </definition>
</definitions>


## Description

The population variance of a numeric field.

## Supported types


| number  | result |
|---------|--------|
| double  | double |
| integer | double |
| long    | double |


## Example

```esql
FROM employees
| STATS var_height = VARIANCE(height)
```


| var_height:double |
|-------------------|
| 0.0425888         |