What Is Cumulative Layout Shift (CLS)?

Flavio AmielWritten byFlavio Amiel Founder, Roborank
Updated July 15, 2026

Cumulative Layout Shift (CLS) is a Core Web Vital that measures visual stability by scoring how much visible content moves unexpectedly during a page’s lifespan. It sums the largest burst of layout-shift scores into a single unitless number, where each shift is weighted by how much of the screen moved and how far. A low CLS means the layout stays put as the page loads.

Key Takeaways

How Cumulative Layout Shift Works

Cumulative Layout Shift measures visual stability — whether the things you’re looking at stay where they were, or lurch around as the page finishes loading. Everyone has tapped a link only to have an image load above it, push everything down, and land the tap on the wrong thing. CLS turns that frustration into a number.

The browser watches for layout shifts: any time a visible element changes its start position between two rendered frames. Crucially, only unexpected shifts count. If the movement happens within 500 milliseconds of a user interaction — you clicked “expand” and the accordion opened — it is treated as expected and excluded. CLS is about content that moves on its own, without the user asking.

Because it is a Core Web Vital, CLS is measured on real Chrome users and reported at the 75th percentile. Its good threshold is 0.1 or less, needs-improvement runs to 0.25, and anything above 0.25 is poor. Unlike its two siblings, CLS is unitless — it is a score, not a stopwatch.

How the Score Is Calculated

Each individual layout shift is scored as:

layout shift score = impact fraction × distance fraction

Google’s own worked figure: an element that takes up 50% of the viewport and shifts down by 14% of the viewport height scores 0.5 × 0.14 = 0.07.

The scores don’t simply add up across the whole page, though. CLS uses session windows. A session window is a burst of shifts where each is less than 1 second from the last, and the whole window is capped at 5 seconds. The page’s CLS is the score of its worst session window — the single largest burst of instability — not the lifetime sum. This design stops long-lived pages and infinite scrolls from accumulating an unfairly large score just by existing for a long time.

What Causes Layout Shifts

The offenders are consistent and, once you know them, easy to spot:

Example of Cumulative Layout Shift

Take the exact scenario in Google’s CLS documentation. A page renders a block of text, and then a banner image loads at the top. The image occupies a large share of the screen and pushes the text down. Using web.dev’s own numbers, the moved content covers an impact fraction of 0.75 of the viewport, and it shifts downward by a distance fraction of 0.25. The layout shift score is 0.75 × 0.25 = 0.1875 — comfortably into the poor band on a single shift.

The documented fix is not to move the text; it’s to reserve the banner’s space before it loads. Declaring the image’s width and height (or a CSS aspect-ratio) makes the browser lay out an empty box of the right size immediately, so when the image arrives it paints inside that box and nothing below it moves. That one change drops the shift score to essentially zero, because there is no longer any unexpected movement to score. Same image, same page weight, same load time — the difference is entirely in whether space was reserved.

The lesson generalizes to every CLS problem, and it is almost the opposite of how loading metrics work. LCP and INP reward doing work faster; CLS rewards reserving space in advance so that however fast or slow content loads, it never displaces what’s already visible. A slow page with every slot reserved can score a perfect CLS, and a fast page that injects a banner late can fail it. The discipline is knowing the final dimensions of everything up front — images, ads, embeds, fonts — and committing that space before the content shows up.

The thing people get wrong

The fix teams reach for — pixel-nudging elements after the fact — misreads the metric. CLS punishes unexpected movement, so the cure is reserving space before content arrives, not moving things after. Set width and height (or aspect-ratio) on every image, video, and ad slot so the browser lays out the gap up front; the picture then loads into its reservation instead of shoving the paragraph below it down the page. The sneakiest offender is the cookie banner or promo bar injected at the top after render — it pushes the entire page down and torches your CLS on the one shift a user is guaranteed to see. Reserve the slot, or overlay it, but never let late content reflow what’s already on screen.

Cumulative Layout Shift and the Other Core Web Vitals

CLS completes the trio of Core Web Vitals alongside Largest Contentful Paint and Interaction to Next Paint. It’s the one that most often improves as a side effect of fixing the others: adding width and height to your hero image both reserves its space (helping CLS) and lets the browser plan its download better (helping LCP). The common thread across all three is predictability — a page that declares what it’s going to show, and where, before it shows it. Get that habit right and stability tends to come for free.

Frequently Asked Questions

What is a good CLS score?
0.1 or less at the 75th percentile of page loads. Between 0.1 and 0.25 needs improvement, and above 0.25 is poor. CLS is a unitless score, not a measurement in seconds — it reflects how much content shifted and how far, not how long anything took.
How is the CLS score calculated?
Each unexpected layout shift scores impact fraction multiplied by distance fraction. Impact fraction is the share of the viewport occupied by the elements that moved; distance fraction is the greatest distance any of them moved, relative to the viewport’s largest dimension. CLS reports the highest-scoring session window of such shifts.
What causes layout shift?
Images, videos, iframes, and ad slots without declared dimensions; content injected after render, like banners, embeds, or ‘related posts’ widgets; and web fonts that reflow text when they load. Actions the user triggers within 500 milliseconds are treated as expected and excluded from the score.
How do I fix Cumulative Layout Shift?
Always set width and height or CSS aspect-ratio on media so space is reserved before it loads. Reserve fixed slots for ads and embeds. Preload fonts and use font-display to limit reflow. Never inject content above existing content unless it’s an overlay or the user requested it.

The Bottom Line

Cumulative Layout Shift grades whether a page holds still while it loads, or whether buttons and text jump under your finger as images and ads pop in. It scores every unexpected move by how much of the screen shifted and how far, then reports the worst burst. Keep it at or below 0.1 by reserving space for everything before it arrives on screen.

Sources

  1. Cumulative Layout Shift (CLS)web.dev (Google)
  2. Optimize Cumulative Layout Shiftweb.dev (Google)
Roborank does this

Roborank catches the images, embeds, and injected banners wrecking your CLS before they cost you rankings.

Audit your CLS →

Rank & Cash — the weekly SEO breakdown

One practical teardown a week on ranking in search and getting cited by AI. No fluff.