How to use this calculator
Smooth a noisy local sample window and estimate its central slope without flattening a low-order polynomial trend.
- Enter Uniform samples (signal units), Sample interval (s), Polynomial degree. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Local polynomial smoothing and derivative explained
How the calculation works
Fit x[i]≈Σj aj(i−center)^j by least squares; center value=a0 and time derivative=a1/Δt.
The complete entered block is one centered fitting window; it does not automatically slide through a longer record. Solve in sample-index coordinates before converting the derivative to seconds.
Set up the calculation
x— Uniform samples (signal units)- Chronological real samples; use a comma-separated list in the same signal units. Use comma-separated values in the stated order.
dt— Sample interval (s)- Positive equal spacing between adjacent window samples.
p— Polynomial degree- Degree of the centered least-squares polynomial. Enter a whole number.
Limits of this model
An odd window of at most 21 points and degree at most five; outliers can strongly influence least squares.
Check this example
Uniform samples (signal units) = [4.1, 1.1, 0.2, 1.2, 4.2]; Sample interval (s) = 0.1; Polynomial degree = 2.
- Smoothed center value: 0.174286 signal units
- Center first derivative: 0.3 signal units/s
- Fit residual RMS: 0.021381 signal units
Five observations near a quadratic bowl include small offsets; the fitted center distinguishes noise from curvature.
Reading the outputs
Residual RMS indicates local polynomial mismatch, while the derivative refers exactly to the window center.
Frequently asked questions
Does a larger polynomial always improve smoothing?
No. A high degree can fit measurement noise.
Why is sample interval needed?
The fitted slope per sample must be converted to slope per second.
Can this estimate an endpoint derivative?
This page uses a centered window; endpoint fitting is a different convention.
How do I use the Local polynomial smoothing and derivative calculator?
Enter Uniform samples (signal units), Sample interval (s), Polynomial degree. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Local polynomial smoothing and derivative?
Uniform samples (signal units) = [4.1, 1.1, 0.2, 1.2, 4.2]; Sample interval (s) = 0.1; Polynomial degree = 2. Smoothed center value: 0.174286 signal units Center first derivative: 0.3 signal units/s Fit residual RMS: 0.021381 signal units Five observations near a quadratic bowl include small offsets; the fitted center distinguishes noise from curvature.
Background or definition reference: SciPy polynomial smoothing coefficients.
Read our calculation methodology.