Calculator Inputs
Example Data Table
| Index | X | Observed Y | Comment |
|---|---|---|---|
| 0 | 0 | 0.40 | Starting noisy measurement |
| 1 | 1 | 0.58 | Rising local trend |
| 2 | 2 | 0.73 | Mild upward movement |
| 3 | 3 | 0.95 | Peak region beginning |
| 4 | 4 | 1.04 | Highest sample reading |
| 5 | 5 | 0.98 | Turning point appears |
| 6 | 6 | 0.81 | Downward trend continues |
| 7 | 7 | 0.60 | Smoother decay section |
| 8 | 8 | 0.46 | Noise remains visible |
| 9 | 9 | 0.31 | Low amplitude area |
| 10 | 10 | 0.21 | Series tail value |
Formula Used
The Savitzky-Golay method fits a local polynomial to each moving window. For each target sample,
it models the nearby data with p(z) = a0 + a1z + a2z² + ... + amz^m.
Using the window design matrix X, the coefficient vector is
computed by a = (XᵀX)⁻¹Xᵀy. The smoothed output is the fitted value at the
target point. The derivative output uses d! × a_d / Δ^d, where
d is the derivative order and Δ is sample spacing.
Because the filter depends on polynomial least squares, the window length must stay odd and exceed the local model complexity.
How to Use This Calculator
- Enter your Y values in the first text area.
- Optionally enter evenly spaced X values, or leave them blank.
- Choose an odd window length smaller than the dataset size.
- Set the polynomial order and the derivative order.
- Enter the sample spacing if X values are not supplied.
- Select an edge method for boundary behavior.
- Click Apply Filter to display the result above the form.
- Review the summary, chart, and table, then export CSV or PDF.
Frequently Asked Questions
1. What does this calculator do?
It smooths noisy sampled data or estimates derivatives using a local polynomial fit across a moving window. The result preserves shape better than many simple averaging methods.
2. Why must the window length be odd?
An odd window keeps a central target position inside each local fit. That symmetry is important for standard Savitzky-Golay smoothing and derivative estimation.
3. How should I choose polynomial order?
Use a low order for strong smoothing and a slightly higher order when you need local curvature preserved. The order must stay below the window length.
4. Can I use uneven X spacing?
No. This implementation assumes evenly spaced samples. If your X values are irregular, resample the series first or use a method designed for nonuniform spacing.
5. What does derivative order change?
A derivative order of zero performs smoothing. Higher orders estimate slope, curvature, or higher derivatives, scaled by the sample spacing value.
6. Which edge mode is safest?
Adaptive polynomial edges are usually the safest choice because they refit the polynomial near boundaries instead of forcing repeated or wrapped values.
7. What does residual RMSE mean?
Residual RMSE measures the typical difference between the original data and the smoothed output. Smaller values indicate the filter stayed closer to the observed samples.
8. When should I avoid large windows?
Avoid very large windows when your signal changes rapidly. Oversized windows can flatten peaks, delay turning points, and hide short local events.