What is Cumulative Layout Shift (CLS) and how to fix it

What CLS measures, how the score is calculated and which causes to check first.

  • Good ≤ 0.1
  • Needs improvement ≤ 0.25
  • Poor > 0.25
Arjen Karel
Updated · 11 min read
Share

Cumulative Layout Shift (CLS) in short

Cumulative Layout Shift (CLS) is the metric for visual stability in Core Web Vitals: a score for how much visible content moves on its own while a visitor uses the page, taken from the worst burst of layout shifts. A good CLS is 0.1 or less at the 75th percentile of page loads, with mobile and desktop rated apart.

What is Cumulative Layout Shift (CLS)?

A layout shift is a visible element that changes position between two frames without the visitor asking for it: the line you were reading slides down, or a button moves under your thumb because a banner appeared above it.

CLS has no unit: it is a score, where Largest Contentful Paint (LCP) and Interaction to Next Paint (INP) are times. Some write CLS out as "content layout shift"; the C stands for Cumulative.

What is a good Cumulative Layout Shift (CLS) score?

A good CLS score is 0.1 or less for at least 75% of page loads, with mobile and desktop rated separately. More than 0.1 up to 0.25 needs improvement, more than 0.25 is poor. Aim for 0: a shift within the good range still moves the text someone is reading. In real-user data across all CoreDash projects, at least half of the page loads on phones had a CLS of 0 in the 28 days up to 9 November 2026.

Rating CLS at the 75th percentile Search Console issue
Good 0.1 or less None
Needs improvement More than 0.1 up to 0.25 CLS issue: more than 0.1 (mobile)
CLS issue: more than 0.1 (desktop)
Poor More than 0.25 CLS issue: more than 0.25 (mobile)
CLS issue: more than 0.25 (desktop)

CLS thresholds: good up to 0.1, needs improvement up to 0.25, poor above 0.25

In Search Console, "CLS issue: more than 0.1 (mobile)" means a group of your URLs has a CLS above 0.1 at the 75th percentile of phone visits, and "more than 0.25" means above 0.25; "(desktop)" is the same for desktop visits. Check desktop too: according to the State of Web Vitals, 88.9% of sites have a good CLS on phones against 78.2% on desktop.

Why does CLS matter for visitors and SEO?

Google uses CLS in its ranking as one of the three Core Web Vitals, measured on your real Chrome visitors: the 75th percentile of the last 28 days. It is a small factor: Google says a good page experience helps when pages are about equally relevant.

For the visitor, a page that keeps moving looks broken. In Lighthouse, CLS counts for a quarter of the Performance score, but Google ranks your page on the CLS your real visitors get.

How is CLS measured?

Chrome scores every unexpected layout shift as impact fraction times distance fraction and groups shifts less than a second apart into a burst of at most 5 seconds. The CLS of a page is the score of its worst burst during the whole visit. Paste this in Chrome's console to log each shift:

new PerformanceObserver((entryList) => {
  for (const entry of entryList.getEntries()) {
    console.log('Layout shift:', entry);
  }
}).observe({type: 'layout-shift', buffered: true});

Each entry has a value, the score of that shift, and sources, the elements that moved. A shift right after a click has hadRecentInput set to true.

How is one layout shift scored?

layout shift score = impact fraction * distance fraction

The impact fraction is how much of the viewport the moving elements touch, before and after the shift together. The distance fraction is how far they moved, as a share of the viewport's largest dimension (on a phone, the height). An element that covers half the viewport and moves down a quarter of it touches 75% of the viewport: 0.75 * 0.25 = 0.1875, above 0.1 on its own.

Which layout shifts count?

Chrome leaves out every shift within 500 milliseconds of a click, tap or key press, so a menu that opens on a click counts for nothing. Content that appears later does count: a "load more" button whose items arrive a second later makes a layout shift. Show the items, or space for them, within those 500 milliseconds.

Shifts during a scroll count in full, such as a header that shrinks or an ad that fills. An animation of transform moves pixels without changing the layout, so Chrome records no shift for it.

Layout shift sessions

Chrome calls a burst of layout shifts a session window. Only the highest session counts, so sessions of 0.095 and 0.15 give a CLS of 0.15.

Five layout shifts on a time axis from 0 to 6 seconds. Shifts of 0.06 at 0.8 seconds and 0.035 at 1.5 seconds make session 1, 0.095. After 2.5 seconds without a shift, shifts of 0.08 at 4.0 seconds, 0.05 at 4.6 seconds and 0.02 at 5.4 seconds make session 2, 0.15. The highest session, 0.15, is the CLS.

Five shifts measured in Chrome on a test page: a gap of a second or more (here 2.5 seconds) starts session 2.

On a test recipe page built like a WordPress food blog, a web font, a photo without a size, a newsletter bar and an ad each scored less than 0.1 on their own and together made one burst of 0.241. Lighthouse's Layout shift culprits notice shows the four shifts.

Why is CLS lower in Lighthouse than in Search Console?

Lighthouse loads the page once, at phone size, as a first-time visitor, and never scrolls or taps. Search Console's field data holds every visit for as long as it lasts, including the ad halfway down a post that fills during a scroll, and that is the CLS Google ranks on. When Lighthouse is clean and Search Console says CLS is poor, the shifts usually happen after the load.

Lighthouse can also show more than the field. A font swap, or an image the theme sizes with width: auto, shifts only while the file is not in the browser cache: Lighthouse and first-time visitors see it, a developer only with the cache disabled. More in lab and field data.

What causes layout shifts?

Every layout shift is something that arrives after the first paint with no space waiting for it, or an animation that changes the layout, and whatever sits below it moves along.

Cause What the visitor sees Where it usually comes from
Unsized images and videos Text jumps down when the image arrives Theme, page builder, slider, app
Web fonts Text moves when the font swaps The theme's fonts, Google Fonts
Ads and embeds Content drops by the height of the ad Ad plugin, AdSense, YouTube, maps
Bars and banners The whole page drops Consent plugin, app, tag manager
Late CSS The header grows after the first paint An optimization plugin's delayed CSS
Animations Blocks slide while loading or scrolling Theme, slider, sticky header

According to the State of Web Vitals, 89% of sites without an ad network pass CLS on phones, against 73% of sites with two or more networks. That is a correlation.

Lighthouse lists the shifts of one page load under Layout shift culprits (called "Avoid large layout shifts" before Lighthouse 13).

How do you find and fix CLS issues?

Layout shifts stop when everything that arrives late has its space reserved, or moves without changing the layout: a width and height on images, a fallback font sized like the web font, a fixed height on ad slots and bars, stylesheets loaded in the head, and animations that use transform. First find which element moves for real visitors, per device, and fix the largest shift first: that improves the CLS score most.

  1. Search Console: note which URL groups fail on mobile and desktop, then look at the trend: a sudden jump means a release added something, such as a banner or an ad slot.
  2. Real-visitor data: in CoreDash, group CLS on mobile by Attribution Element (CLS) to see which elements moved; Last interaction (CLS) shows whether the shift came after a scroll.
CoreDash, Cumulative Layout Shift by Attribution Element (CLS) on mobile: per element the p75 CLS, a performance label, the distribution and the sessions; the rows include main#main.site-main, the recipe name, an in-content ad slot, the nav and the footer.

CoreDash on mobile: reproduce the top row first.

  1. Reproduce it in Chrome: I built the Core Web Vitals Visualizer, a free Chrome extension, and it is the first thing I open to see what moves on a page. To see when each shift happens, record the page in the Performance panel with the cache disabled and Slow 4G: start the recording, reload, scroll down, then stop. Each shift is a purple diamond in the Layout shifts track, and hovering one shows what moved.
  2. Check the element Lighthouse names: Lighthouse guesses the cause from timing, so a sized image that was only pushed can be listed as "Unsized image element". Check that the image lacks a size before you change it (how to check).
Chrome DevTools Performance panel: the Layout shifts track with four diamonds in the worst layout shift cluster, the tooltip of the 0.0583 shift showing the page with a green newsletter bar that has just appeared above the header, and the Layout shift culprits insight on the left listing two unsized images and a web font.

The test recipe page: the hovered shift is a newsletter bar appearing above the header.

Find and fix CLS issues has the full diagnosis. For each cause below, look for a setting in the theme, plugin or app before you change code.

Images and videos without a size

An image without a width and height starts at zero height and pushes everything below it down when it arrives. A performance plugin can add the missing sizes (in WP Rocket: Media, Add missing image dimensions); in a template you write them yourself:

<img src="hero.jpg" width="800" height="600" alt="...">
img { max-width: 100%; height: auto; }

The browser turns the two attributes into a ratio and reserves the height before the file arrives; a video works the same. A width: auto in the theme's CSS cancels that ratio, and I have seen it on dozens of sites (auto sizing images). Images and media covers srcset and carousels, Unsized image element the code per platform.

Web fonts

Text shows first in a fallback font, then in the web font, which is wider or narrower: the lines break at other words and everything below moves. font-display: swap clears the Font display notice and keeps the shift, because the swap is the shift. A fallback font resized to the web font's measurements with metric overrides stops it, and so does font-display: optional, which shows first-time visitors the fallback and never swaps.

WordPress and Shopify have no setting for this: the fallback face goes in Additional CSS on WordPress or under Edit code on Shopify. In Next.js, next/font adds a matching fallback. The test recipe page's headline font:

@font-face {
  font-family: "Young Serif Fallback";
  src: local("Times New Roman"), local("Liberation Serif");
  size-adjust: 131%;
  ascent-override: 79.85%;
  descent-override: 27.94%;
  line-gap-override: 0%;
}
h1 { font-family: "Young Serif", "Young Serif Fallback", serif; }

On that page, a size-adjust of 122% from a calculator still left a CLS of 0.029; 131% gave 0. Font display has the Android face and how to get the numbers for your font.

Two mobile screens showing Sample CLS page layout shifts before and after web font swap fix, connected by Aa icon

A font swap on a WordPress test page, before and after the fix.

Ads and embeds

An ad script fills its slot after the auction, so a slot without a height pushes everything below it down. In the theme or the ad plugin, give the slot the height of the ad size that shows most often, and make the iframe a block:

.ad-slot { min-height: 50px; }
.ad-slot iframe { display: block; }

Without the second line the iframe sits on the text line, and the reserved slot on the test recipe page still grew 8 pixels. Keep the slot at its height when no ad comes (in Google Publisher Tag, leave out collapseEmptyDivs()): a slot that closes moves the page as much as one that fills. AdSense Auto ads go where Google decides, so exclude the first screen under Ad settings, Excluded areas.

YouTube and Google Maps embeds need an aspect-ratio on the iframe, or a facade: a sized thumbnail that turns into the iframe on a click (YouTube, Google Maps, the code).

Bars, banners and blocks a script inserts

A newsletter bar or consent banner that a script puts above the header pushes the whole page down. Switch the plugin or app to a bottom bar, a box or a popup: those float over the page and move nothing. A bar that has to sit at the top gets its space in the theme:

<div id="promo-slot" style="min-height: 48px"></div>

Visible content from a Google Tag Manager tag always comes after the first paint: move it into the template. Reviews or related products that JavaScript renders after the load need an empty container at their final height (bars and banners).

CSS that loads after the first paint

A stylesheet that an optimization plugin delays or loads asynchronously restyles the page after it is on screen: a header that grows pushes everything below it down. Exclude that stylesheet in the plugin's settings, or load it with a plain <link rel="stylesheet"> in the head (late CSS).

Animations, sliders and scroll effects

An animation of top, left, height or margin changes the layout in every frame, and each frame can be a layout shift: animate transform instead. A theme with transition: all animates the layout properties too, so the page can shift while it loads (CSS transitions). Name the properties you mean:

.card { transition: opacity .2s, transform .2s; }

A slider shows its slides stacked until its script runs: show only the first slide until the script adds its ready class (the code). A header that shrinks on scroll moves everything below it unless it uses transform: record a scroll in the Performance panel to see that shift (scroll-triggered animations).

WordPress

  • Images: media library images have their size; WP Rocket adds the rest.
  • Fonts: the fallback font face in Appearance, Customize, Additional CSS.
  • Ads: a fixed height on the ad plugin's slot; AdSense Excluded areas for the first screen.
  • Bars and consent banners: the plugin's bottom bar, box or popup layout.
  • Late CSS: exclude the theme's stylesheet from the optimization plugin's delayed or asynchronous CSS.

More per plugin: the WordPress guide.

Shopify

Shopify's image_tag filter writes the width and height; a theme or app that writes its own <img> needs width="{{ image.width }}" height="{{ image.height }}". The fallback font goes in a stylesheet under Edit code, where a theme update can remove it. An app block such as review stars or an announcement bar needs a height on its container. More in the Shopify guide.

What did Rakuten 24's A/B test show about CLS?

Rakuten 24 optimized one landing page for the Core Web Vitals and ran it against the original for a month, half of the traffic on each. CLS went down by 92.72%, and the optimized page had 53.37% more revenue per visitor and a 33.13% higher conversion rate. Load time, FCP and TTFB improved in the same test, so those results belong to the whole optimization.

Why does Search Console still show the old CLS?

Search Console looks at the last 28 days, so two weeks after a fix goes live, half of what it shows is still the old site; it takes up to 28 days to turn green. You can see the result sooner: run Lighthouse again on mobile with the cache plugin and CDN cleared, and record the page in the Performance panel while you reload and scroll. With every shift gone, the Layout shifts track stays empty. CoreDash shows the new CLS per element from the next visits on.

Some layout shifts start in code you can't edit: an ad partner whose creatives change size, an app that injects its widget, a theme without a setting for its bar. In a Core Web Vitals power hour we look at your field data and a recording of the template that moves, and settle which element gets how much space.

About the author

Arjen Karel is a web performance consultant and the creator of CoreDash, a Real User Monitoring platform that tracks Core Web Vitals data across hundreds of sites. He also built the Core Web Vitals Visualizer Chrome extension. He has helped clients achieve passing Core Web Vitals scores on over 925,000 mobile URLs.

Arjen Karel

Need a faster site?

I'm Arjen, and I've been fixing slow sites for 17 years. If you're running into issues you can't fix yourself, send me your URL and let's have a chat.

Send me your URL
Arjen Karel
Arjen Karel, Web performance consultant since 2009

Why isn't our fix working?

Sometimes the CDN still serves the old HTML, or the fix went into the desktop template and mobile uses another one. Send me your URL and the problem, and I reply with a few times. I check your field data first, then we spend one hour on your site, and within a day you have my notes in writing. €350 excl. VAT.

Send me your URL

No developer to build the fix? I do the work myself, on a copy of your site.

Arjen KarelCLS still red on mobile?Send me your URL