Book a call Free rebuild
Home/Glossary/Performance/Cumulative Layout Shift (CLS)

Cumulative Layout Shift (CLS)

August 31, 2022 Updated November 16, 2026 2 min read

Performance glossaryCumulative Layout Shift (CLS) is the Core Web Vital for visual stability: how much content unexpectedly moves while a page loads. Good is 0.1 or less.

Cumulative Layout Shift (CLS) measures how much a page's content jumps around without the visitor causing it. Most people have met the problem: a reader goes to tap a link, an advert loads above it, the text drops, and the tap lands on the wrong thing. CLS turns that experience into a number, and it is one of the three Core Web Vitals.

How it is calculated

A layout shift happens when an element that is already visible changes its position from one frame to the next. A new element appearing does not count by itself, but any content it pushes out of the way does. Each shift gets a score:

layout shift score = impact fraction × distance fraction

  • The impact fraction is how much of the viewport the moving elements affect, counting the area they cover before and after the move.
  • The distance fraction is how far they moved, as a share of the viewport's largest dimension.

Shifts within half a second of a click, tap, or key press are excluded, because the visitor expects the page to change then. Shifts that happen close together are grouped into a session window (gaps of under 1 second, up to 5 seconds in all), and CLS is the score of the worst window over the whole life of the page.

Good is 0.1 or less and poor is over 0.25, measured at the 75th percentile of visits.

Common causes

  • Images and videos without dimensions, so the browser cannot reserve space before they load.
  • Ads, embeds, and iframes that resize when their content arrives.
  • Content inserted above existing content, such as cookie banners, promo bars, and related-post blocks added by JavaScript.
  • Web fonts that swap in at a different size from the fallback font, reflowing the text.
  • Animations of properties such as top, height, or margin; see non-composited animations.

How to fix it

  • Give every image, video, and iframe width and height attributes, or a CSS aspect-ratio. WordPress adds dimensions to images inserted through the editor, but theme templates, page builders, and custom HTML can leave them out.
  • Reserve space for ad slots and embeds with a min-height that fits the most common size.
  • Show banners and notices as overlays, or include their space in the initial HTML, rather than inserting them above the content.
  • Preload key fonts and use fallback font metrics (size-adjust) or font-display: optional to limit reflow.
  • Animate with transform and opacity, which do not move other elements and do not count as layout shifts.

How to measure it

PageSpeed Insights shows field CLS from real Chrome users and lab CLS from a Lighthouse run, and its diagnostics name the elements that moved. Chrome DevTools highlights layout shifts in the Performance panel.

Field CLS is often worse than lab CLS. A lab test only watches the initial load, while real visitors scroll, which brings in lazy-loaded images, late ads, and sticky headers. CLS also differs by template, so test single posts, product pages, and archives, not just the home page. For step-by-step WordPress fixes, see how to fix cumulative layout shifts.

Source: web.dev: Cumulative Layout Shift.

WP Services

WordPress services at revolutionary pricing.

Productized WordPress services, from builds to care, delivered by Seahawk and tracked in one app. For the WordPress lovers.