Simple Exponential Smoothing: Keep the Future Row Separate

For observations 10, 14, 12, 18 and alpha 0.5, copying the last actual gives 18. The next one-step forecast is 15.

The period-four forecast stays 12 because its own observation cannot predict itself.

The calculator aligns every actual with its prior-information forecast, shows errors 4, 0, 6, and reports SSE 52 and MSE 52/3. The future row deliberately has no actual or error.

Simple Exponential Smoothing: Keep the Future Row Separate
Simple Exponential Smoothing: Keep the Future Row Separate
Open the full example ↗

Use the worked example

Load the sample and Calculate, then change alpha to 1 and calculate again: the next forecast becomes 18. Blank inputs are missing rather than zero. Add or remove observation rows while preserving chronological order; any edit clears the old result.

Trace the result step by step

Use y for actual observations and F for forecasts. This example initializes the first available forecast as F₂ = y₁. There is no F₁.

Use the lagged recurrence from NIST's single exponential smoothing explanation: Fₜ = alpha × yₜ₋₁ + (1 − alpha) × Fₜ₋₁. Its inputs come from the preceding period. Write the seed and indexing convention alongside a series before comparing this output with another forecasting tool.

Use equally spaced observations in chronological order, all in the same unit. A row number represents the next period in that supplied series; it is not permission to sort the observations by value or fill an unrecorded period with zero.

F₃ = 0.5 × 14 + 0.5 × 10 = 12. F₄ = 0.5 × 12 + 0.5 × 12 = 12. After period four's actual 18 is known, calculate F₅ = 0.5 × 18 + 0.5 × 12 = 15.

The period-four forecast remains 12. Replacing it with 15 would use y₄ to “predict” y₄. Putting 18 in the next-period forecast field would copy the last actual rather than apply alpha 0.5.

The next row has no actual value, so it has no error. A blank actual in that output row is intentional; a blank among the supplied observations is an input error.

The three available errors are 4, 0, and 6. Their squares total 16 + 0 + 36 = 52. Divide by the three rows containing both an actual and a forecast: MSE = 52/3, approximately 17.333333. MSE is in squared observation units, not a percentage accuracy score. The plain-text record includes the table headings, all rows, error count, SSE, MSE, and next forecast. Its rounding note identifies six-decimal display values; calculations retain their unrounded values.

Keep the zero error for period three in the count. Excluding it just because it is zero would incorrectly divide by two. Likewise, inserting a fake F₁ = 10 and error zero would incorrectly divide by four.

Alpha controls the recurrence's weighting, but this helper does not choose an optimal alpha. The reader supplies a value within 0 < alpha ≤ 1.

At alpha 1, F₂ stays 10 because the initialization is unchanged; F₃ is 14, F₄ is 12, and F₅ is 18. Each new forecast then uses the preceding actual alone. Alpha zero is outside this calculator's declared range.

Changing an input clears the entire old result. Recalculate after changing alpha, editing an observation, or adding or removing a row. The table then updates forecasts, errors, and summary values together. Keep the entered order: the calculator does not sort observations or fill missing periods.

Copy a prompt for this example

Build one HTML calculator for one-step simple exponential smoothing. Use labeled observation rows, an alpha field, Add row, Remove last row, Calculate, Load sample, and Reset. Show an aligned results table and a copyable plain-text calculation record.

Define F2 = y1 with no F1. For later periods use Ft = alpha × y(t−1) + (1−alpha) × F(t−1). Calculate each forecast before consuming its own actual observation. The next-period row has a forecast but no actual or error.

Load sample observations 10, 14, 12, 18 with alpha 0.5. Expected forecasts are F2 = 10, F3 = 12, F4 = 12, and next F5 = 15. Errors are 4, 0, 6; squared errors total 52; MSE is 52/3, displayed approximately as 17.333333. Count the zero error and exclude the initial and future rows. With alpha 1, the next forecast is 18.

Accept two through fifty ordered, nonnegative observations no greater than 1,000,000, using dot decimals with up to six fractional digits. Alpha must be greater than zero and at most one. Reject blanks rather than converting them to zero. Any input or row edit clears stale output. Reset returns two blank rows and blank alpha.

Keep internal calculations unrounded, display six decimal places, and wrap the table and record within a small screen. Return complete HTML with inline styling and calculation code.

Keep the ordered observations, alpha, and seed rule with the forecast table when discussing the next period. NOS can preview the prepared HTML calculator for that review. Check the future row’s missing actual before anyone treats a fitted value as a forecast or MSE as a percentage.

Keep reading