Skip to content

Performance

Cumulative Layout Shift (CLS)

Cumulative Layout Shift measures how much visible content moves around unexpectedly while a page is open. It is a unitless score: the higher it is, the more things jumped under the visitor's eyes or finger.

Also called CLS, layout shift Updated

CLS = largest session window of (impact fraction × distance fraction)

How is it calculated?

Each unexpected shift gets a score from how much of the viewport moved and how far. Shifts less than one second apart are grouped into a session window, capped at five seconds. CLS is the score of the largest window. Shifts shortly after a visitor’s input are not counted.

Google’s CLS guide rates a score at or under 0.1 as good and over 0.25 as poor.

Example

An article loads, then an ad slot without reserved space appears above the text and pushes it down by a quarter of the screen. Most of the viewport moved, so that one shift scores around 0.2, twice the good threshold. Reserving a fixed height for the slot removes the shift and brings CLS close to zero.

Common mistakes

  • Images and embeds without dimensions. Give them width and height, or an aspect ratio, so space is reserved.
  • Banners inserted at the top after load. They push everything down.
  • Reading CLS as a time. It is a score with no unit.

How CrispStats shows it

CrispStats records CLS on real visits with the data-vitals attribute, as the worst session window with input-driven shifts ignored. It is shown at the 75th percentile, rated against 0.1 and 0.25, and listed by page so you can find the template that jumps.

Web vitals on the demo site, Quillbook, on generated traffic. Open it in the demo 

Your traffic, crisp and clear

One script, no cookies, and every feature from the first day. Set up takes about as long as pasting a snippet.