# Exponentially weighted moving average

**URL:** <https://forum.intervals.icu/t/exponentially-weighted-moving-average/53095>\
**Category:** Uncategorized\
**Created:** [7 November 2023 10:47 UTC](https://forum.intervals.icu/t/exponentially-weighted-moving-average/53095 "2023-11-07T10:47:36Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![R2Tom](https://forum.intervals.icu/user_avatar/forum.intervals.icu/r2tom/32/50144_2.png) [@R2Tom](https://forum.intervals.icu/u/R2Tom)\
**Post date:** [15 May 2026 04:59 UTC](https://forum.intervals.icu/t/exponentially-weighted-moving-average/53095/13 "2026-05-15T04:59:02Z")

</div>

I didn’t tried it yet, but could be possible now:

> [@Easy custom formulas on fitness charts](https://forum.intervals.icu/t/easy-custom-formulas-on-fitness-charts/123646/1):
>
> The formula is evaluated once for each day in the date range. You can assign values to variables and these carry over from one day to the next (0 for the first day). You can create multi line expressions where the value of the expression is the value from the last line.
> 
> Here is the exponentially weighted moving average for fitness (CTL):
> 
> ```auto
> f = exp(-1 / 42)
> v = v * f + (fitness_load ?? 0) * (1 - f)
> 
> ```
> 
> Note the use of the `??` operator to convert null or undefined fitness\_load (no training on that day) into zero

---

_[View the full topic](https://forum.intervals.icu/t/exponentially-weighted-moving-average/53095)._
