Calculator Input
Paste numbers separated by commas, spaces, semicolons, or new lines.
Example Data Table
This example uses a trailing inclusive window of 3, minimum periods of 3, population deviation, and an alert threshold of 1.2.
| Index | Value | Window Used | Mean | Std Dev | Z Score | Flag |
|---|---|---|---|---|---|---|
| 1 | 10 | 10 | 10.00 | 0.00 | — | Pending |
| 2 | 12 | 10, 12 | 11.00 | 1.00 | — | Pending |
| 3 | 11 | 10, 12, 11 | 11.00 | 0.82 | 0.00 | Normal |
| 4 | 13 | 12, 11, 13 | 12.00 | 0.82 | 1.22 | Alert |
| 5 | 12 | 11, 13, 12 | 12.00 | 0.82 | 0.00 | Normal |
| 6 | 17 | 13, 12, 17 | 14.00 | 2.16 | 1.39 | Alert |
Formula Used
Moving mean: μt = (Σxi) / n
Moving standard deviation: σt = √[Σ(xi − μt)² / (n − ddof)]
Moving z score: zt = (xt − μt) / σt
The calculator builds a local window around each observation. It then measures how far the current value sits from its rolling mean, scaled by the rolling standard deviation. Larger absolute values indicate stronger local deviation and possible anomalies.
Trailing inclusive uses the current point inside the window. Trailing exclusive compares the current point against prior values only. Centered uses neighboring observations around the current point.
How to Use This Calculator
- Enter a numeric sequence in the data field.
- Set the rolling window size for local analysis.
- Choose minimum periods before z scores begin.
- Select population or sample deviation.
- Pick a window mode that matches your workflow.
- Set the alert threshold, such as 2.0 or 3.0.
- Choose the decimal precision for the report.
- Press calculate to review summary metrics and row results.
- Use the CSV or PDF buttons to export findings.
Frequently Asked Questions
1. What does a moving z score measure?
It measures how unusual a value is relative to a local rolling window. This helps detect spikes, dips, and short-term anomalies in sequential data.
2. When should I use trailing exclusive mode?
Use it when the current value should be compared against earlier history only. It is common in online monitoring, forecasting diagnostics, and real-time alerting.
3. What is the difference between sample and population deviation?
Population deviation divides by n. Sample deviation divides by n minus one. Sample mode is often preferred when each window represents a limited sample.
4. Why are some z scores missing?
Missing results appear when the window lacks enough observations or when the standard deviation is zero. In both cases, a reliable z score cannot be produced.
5. What threshold should I choose?
Many analysts start with 2.0 for sensitive detection and 3.0 for stricter screening. The best value depends on noise level, business risk, and false alert tolerance.
6. Is this useful for anomaly detection?
Yes. Moving z scores are widely used for quick anomaly checks in sensors, sales, traffic, latency, finance, and other time-ordered datasets.
7. Can I use centered windows for forecasting?
Centered windows are best for retrospective analysis because they use neighboring observations. For live forecasting or streaming alerts, trailing modes are usually safer.
8. What does a negative z score mean?
A negative z score means the value falls below its local rolling mean. The larger its magnitude, the more unusually low that observation appears.