How the score is calculated

Each layout shift scores impact fraction multiplied by distance fraction. The impact fraction is the share of the viewport covered by the unstable elements, before and after they move. The distance fraction is the greatest distance any of them moved, divided by the viewport's largest dimension.

Shifts are grouped into session windows: bursts of shifts less than one second apart, lasting five seconds at most. A page's CLS is the score of the worst window during the visit.

Shifts that do not count

Shifts that happen within 500 milliseconds of a click, tap or key press are treated as expected and excluded, so opening an accordion menu does not hurt the page. Scrolling and pinch-zooming do not count as qualifying input. Animations built with the CSS transform property do not trigger layout shifts at all.

The most common causes

  • Images and iframes without width and height attributes.
  • Ad slots or embedded videos with no reserved space.
  • Cookie banners or promo bars inserted at the top, pushing content down.
  • Web fonts swapping in with different dimensions than the fallback font.
  • Content injected above what is already visible, such as reviews loaded late.

How to fix CLS

Always declare image dimensions or a CSS aspect ratio, reserve a minimum height for ad slots and widgets, display banners as fixed overlays rather than inserting them into the page flow, adjust fallback font metrics so they take the same space as the final font, and animate with transform instead of changing an element's position.

To reproduce a problem, throttle the network to a slow mobile profile in Chrome DevTools: the Performance panel highlights each layout shift and the element that moved, which is often not the one you suspected.