---
schema_version: "1"
id: ca6cd24273ad605b7773064f65d0a520f2d63046d3cc9f27680b526fc732b956
title: VAR_POP
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-query-guide/references/data-cloud-sql-reference/aggregate-func/var-pop.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/var-pop.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1f3f65afa3f720f13010e73359a6dbd8f2f6d000116ceeb3478214abf28b7af1
products:
  - Data 360 Query Guide
  - Data 360 Developer Documentation
---
# `VAR_POP`

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

Computes the population variance of input values (square of the population standard deviation).

## Syntax

```sql
var_pop(<expression>)
```

## Arguments

### Required

- `<expression>`: An expression of any numerical type.

## Returns

- `NUMERIC(38,6)` for integer-type or numeric arguments.
- `double precision` for floating-point arguments.

Returns NULL if the computation is meaningless.

## Considerations

- Uses N in the denominator (no Bessel's correction).
- Population variance is the square of `STDDEV_POP`.
- Use `VAR_SAMP` or `VARIANCE` for sample variance.
- Cast the input to `double precision` to get a `double precision` result.

## Examples

### Calculate Population Variance

Find the population variance of scores.

```sql
SELECT var_pop(score) AS score_variance
FROM test_results;
```

### Population Variance by Group

Calculate for each group.

```sql
SELECT class_id, var_pop(grade) AS grade_variance
FROM student_grades
GROUP BY class_id;
```

## Related Documentation

- [COVAR_SAMP/VAR_SAMP](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/covar-samp.md)
- [VARIANCE](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/variance.md)
- [STDDEV_POP](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/stddev-pop.md)
- [Aggregate Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/aggregate.md)
