Cumulative Layout Shift (CLS)

CLS measures how much visible content jumps around unexpectedly: the button that moves just as you tap it, the paragraph that slides down when an ad loads.

Make a layout shift, then score it

A late ad banner loads above the article and pushes it down. Each shift is scored as impact fraction × distance fraction: how much of the viewport the moving content touches, times how far it moved relative to the viewport height.

Impact fraction
0.81
Distance fraction
0.25
Shift score
0.201 Needs improvement

Reserving the slot drops the score to zero, because nothing that was already on screen moves. The same trick works for images (width and height attributes or aspect-ratio), embeds and cookie bars. Shifts within 500 ms of a tap or keypress are also excluded, because the user expected them.

How CLS is calculated

Every time a visible element changes position between frames without a recent user input, the browser records a layout shift score = impact fraction × distance fraction. Impact fraction is the share of the viewport covered by the unstable elements (before and after positions combined); distance fraction is the largest distance moved divided by the viewport’s largest dimension.

Shifts are grouped into session windows: bursts separated by less than one second, capped at five seconds each. The page’s CLS is the score of the worst window, not the sum over the whole visit. That change (made in 2021) stopped long-lived single-page apps from being punished just for staying open.

The usual causes and their fixes

  • Images and videos without dimensions. Add width and height attributes (the browser derives the aspect ratio) or CSS aspect-ratio.
  • Ads, embeds and iframes. Reserve the slot with min-height matching the most common creative size; don’t collapse the slot if no ad fills.
  • Late banners (cookie consent, app promos, “free shipping” bars) inserted above content. Overlay them, or put them at the bottom.
  • Web fonts swapping in with different metrics. Use size-adjust, ascent-override and friends on the fallback @font-face, or font-display: optional.
  • Animations using top/left/height. Animate transform instead; transforms don’t count as layout shifts.

Lab CLS vs field CLS

Lighthouse only sees shifts during the initial load, without scrolling or clicking. Real users scroll into lazy-loaded embeds and infinite feeds, so field CLS is often higher. If your lab CLS is 0 but the field says 0.2, look at what happens after load: scroll-triggered content, sticky headers that change height, and carousels.

Check it on your own page

Field and lab numbers for mobile and desktop, in about 30 seconds.

Open the checker

Questions people ask

What is a good CLS score?

0.1 or less at the 75th percentile. Scores above 0.25 are poor.

Do shifts caused by clicking count?

No. Shifts within 500 ms of a tap, click or keypress are flagged as expected (hadRecentInput) and excluded. Scrolling does not count as input, though.

Does CLS have a unit?

No. It is a unitless product of two fractions, so a 0.1 means, for example, that half the viewport moved by a fifth of the screen height.

Why is my CLS different in PageSpeed Insights and Search Console?

PageSpeed Insights shows the specific URL (or origin) over 28 days; Search Console groups similar URLs together. Both use real-user field data, but the populations differ.