Example Data Table
| Index | Value | SMA (Window 3) | EMA (α=0.5) | CMA |
|---|---|---|---|---|
| 1 | 10 | 10.000000 | 10.000000 | 10.000000 |
| 2 | 11 | 10.500000 | 10.500000 | 10.500000 |
| 3 | 13 | 11.333333 | 11.750000 | 11.333333 |
| 4 | 12 | 12.000000 | 11.875000 | 11.500000 |
| 5 | 15 | 13.333333 | 13.437500 | 12.200000 |
Numbers above are illustrative, computed sequentially as values arrive.
Formula Used
Online SMA (window w): keep a running sum of the latest w values, subtracting the oldest when the window slides. The current average is sum / window_count.
Online EMA: with smoothing factor α, update as EMA_t = α·x_t + (1−α)·EMA_{t−1}. A common automatic choice is α = 2/(period+1).
Online CMA: update the mean with mean_t = mean_{t−1} + (x_t − mean_{t−1})/t.
All three methods work in streaming settings, updating with each new point.
How to Use This Calculator
- Paste your numeric sequence using commas, spaces, or new lines.
- Select SMA, EMA, or CMA based on your smoothing needs.
- Set window/period for SMA or EMA, then choose EMA smoothing.
- Click Calculate to see the updated averages table above.
- Use Download CSV or PDF to export the computed series.
FAQs
1) What makes this moving average “online”?
It updates step by step as each new value arrives. The calculator computes the next average without recomputing the entire history from scratch.
2) Which method should I choose for noisy data?
EMA often works well for noisy streams because it reacts smoothly while still following changes. SMA can be steadier with larger windows, and CMA is best for long-run baselines.
3) How do I pick a good SMA window size?
A larger window smooths more but lags trends. Start with a window that matches your typical cycle length, then adjust until the balance between smoothness and responsiveness feels right.
4) How is the EMA smoothing factor selected automatically?
When set to auto, α is computed as 2/(period+1). Smaller α smooths more and reacts slower, while larger α reacts faster to new values.
5) What happens if I enter non-numeric tokens?
They are ignored during parsing. Only valid numbers, including scientific notation like 1.2e3, are used to compute the moving averages.
6) Why do SMA results differ at the beginning?
At the start, the window is not yet full. The calculator averages only the available values until enough points arrive to fill the window completely.
7) Can I export more than 200 displayed rows?
Yes. The on-page table shows the first 200 rows for speed, but the downloads include the complete computed series from your most recent calculation.
8) Is this suitable for real-time dashboards?
Yes for quick checks and prototyping. For high-frequency streams, you would typically compute these updates in your data pipeline, then display the outputs in your dashboard.