An exponential moving average (EMA) is an average in which the newest value counts the most and older values fade out evenly. Applied to body weight it is also called exponential smoothing, and it is the default method for trend weight in Lean is law.
Unlike a simple moving average, it has no fixed window. No value suddenly drops out on a particular day, so the line does not jump.
The formula
Trend today = trend yesterday + α × (today's reading - trend yesterday)
Lean is law and the weight trend calculator use α = 0.1: the new daily value counts for 10 percent, the previous trend for 90 percent. This weighting goes back to John Walker and The Hacker's Diet. During the first few days a running mean is used so the trend does not stick to your first entry. After a gap, the next reading counts correspondingly more.
Example: Your weight sat at 80.0 kg for four weeks, then the readings drop to 79.0 kg and stay there. After seven days the trend shows 79.5 kg, after fourteen days 79.2 kg. Roughly half of a change shows up after about a week. This is a worked example.
Strengths and weaknesses
An EMA is calm, handles gaps well and shrugs off single outliers. The price is lag: during a steady loss it trails the real value further than a 7-day average does. A study using smart scale data (Turicchi et al. 2020) found that an exponentially weighted average matched the actual values well. If you want faster feedback, the app also offers double exponential smoothing (Holt), which tracks the direction as well.