# Sliding Window

> Windows of one size that overlap. Each step gives a new result.

**Field:** Data Engineering  
**Category:** Processing  
**Also known as:** Hopping Window, Moving Window

## Think of it like

You look at the last ten minutes of a race. A minute later, you look at the last ten again.

## Definition

A sliding window has a fixed size, but a new one starts at a shorter step. So the windows overlap. A 10-minute window that slides every minute gives a fresh 10-minute result each minute. One event falls into several windows. It is used for moving averages and for alerts on the last few minutes. Some tools call it a hopping window.

## Example

A site alerts when errors in the last 10 minutes pass 100. The check runs every minute on a sliding window.

## Why it matters

It smooths out spikes and still updates often. Most live alerts and moving averages use it.

## Common mistake

Adding the windows up for a total. Events sit in several windows, so the total is too high.

## Three principles

- **Size and step.** Such as 10 minutes every 1.
- **Overlap.** One event, many windows.
- **For moving views.** Averages and alerts.

## Related terms

- [Windowing (Stream Processing)](https://learn.benibix.com/term/data/windowing)
- [Tumbling Window](https://learn.benibix.com/term/data/tumbling-window)
- [Session Window](https://learn.benibix.com/term/data/session-window)
- [Watermark (Stream Processing)](https://learn.benibix.com/term/data/watermark)

## Told apart from

- [Tumbling Window vs Sliding Window](https://learn.benibix.com/compare/tumbling-window-vs-sliding-window): People think any window that comes round again is a tumbling window. Tumbling windows touch but never overlap, so each event is counted once. Sliding windows overlap, so one event falls in more than one. Use tumbling for totals and bills. Use sliding for moving averages and alerts.

![Three timelines of the same dots. Tumbling windows cut the line into boxes that touch and never overlap. Sliding windows overlap, so one dot falls in more than one box. Session windows wrap each burst of dots and close after a gap.](https://learn.benibix.com/diagrams/stream-windows.svg)

---

Source: https://learn.benibix.com/term/data/sliding-window
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
