# cumwavg {#cumwavg}

## Syntax {#syntax}

`cumwavg(X, Y)`

Please see [Cumulative Window Functions](../Themes/cumFunctions.md) for the parameter description and windowing logic.

## Details {#details}

Calculate the cumulative weighted average of *X* with *Y* as the weights. The result is a vector of the same length as *X*. Null values are ignored in the calculation.

## Examples {#examples}

```
cumwavg(2.2 1.1 3.3, 4 5 6);
// output: [2.2,1.588889,2.273333]

cumwavg(1 NULL 1, 1 1 1);
// output: [1,1,1]
```

Related function: [wavg](../w/wavg.md)

