Filters out daily noise from scale readings. Uses a Kalman filter plus RTS smoother to show your real weight trend with a confidence range and rate of change.
No data yet. Add a reading or
You step on the scale in the morning. Over the past three days it said 94.4, 95.1, then 93.8. Which number is real? Probably none of them. You're not gaining and losing a kilogram overnight. That's just noise. Hydration, what you ate, the scale precision, whether the floor is level.
Every weight tracker asks the same question. Is this change real, or is it randomness?
Most people reach for a moving average. Take the last 7 readings and average them. Or 14. Or 30. It helps, but it has three problems you can't fix.
This tool does something different.
Every day you have two pieces of information about your weight. Most weight trackers only use one.
What the scale tells you. The day's reading. Useful but noisy. Any single number could be off by a kilogram or more.
What you already know. Your weight couldn't have changed much since yesterday. You didn't gain or lose 3 kg of body mass in 24 hours. That's not an opinion. That's a physical constraint. And it's valuable information.
The trick is combining them. When the scale shows a big drop, should you believe it? Or should you assume it's noise? The answer depends on how reliable each source is right now. How noisy is your scale? How long since you last checked? Are recent readings consistent?
That's what this algorithm does. It weighs both sources. Your model of how weight behaves. The noisy measurement. The result is more reliable than either alone. The same idea powers GPS (combining satellite readings with your phone's accelerometer). It powers noise-cancelling headphones (predicting the ambient sound so they can cancel it). It guided Apollo to the Moon and back.
The Kalman filter (Rudolf Kalman published it in 1960) runs through your data from first day to last. It keeps two things: an estimate of your true weight, and a number that says how confident it is.
Each day works in two steps.
The blending factor is the Kalman gain. A number between 0 and 1. It decides how much to trust the measurement vs the prediction. It adapts to your data. It's not fixed.
Missing days need no special code. No update today? The filter carries its prediction forward with a bit more uncertainty. The next reading pulls it back.
At the start, before any data, the filter has a diffuse prior. Essentially "I have no idea what your weight is". The first few readings dominate. It converges within 3 to 5 observations.