Core Web Vitals12 min read

The Complete Guide to Cumulative Layout Shift (CLS)

Unexpected layout movement is one of the fastest ways to lose user trust. In this playbook, you will learn how Cumulative Layout Shift is calculated, why it influences conversions, and the practical steps you can take to stabilize every critical page template.

February 3, 2025
12 min read
Updated with 2025 guidelines
Why CLS Matters
A stable layout is the foundation of great UX. CLS is a Core Web Vital that quantifies unexpected layout movement users experience while browsing your page.
Good
≤ 0.1

Stable experience with minimal unexpected movement.

Needs Improvement
0.1 – 0.25

Users begin to notice layout shifts. Prioritize fixes soon.

Poor
> 0.25

Severe layout instability that hurts engagement and conversions.

How Cumulative Layout Shift Is Calculated

CLS is a metric that captures the total impact of all unexpected layout shifts that occur during the lifespan of a page. It is calculated by multiplying the impact fraction (how much of the viewport moved) by the distance fraction (how far elements moved). The metric focuses on instability that happens while the user interacts with the page, not deliberate layout changes triggered by user actions.

The browser tracks layout changes in session windows. Each session window groups layout shifts that happen within 1 second of each other, up to 5 seconds total. Your CLS score is the largest session window score observed during the page visit.

Top Causes of High CLS Scores

  • Images and videos without reserved aspect ratios push content down as they load.
  • Third-party scripts inject content above the fold without placeholder containers.
  • Web fonts cause flash of invisible text (FOIT) or fallback text shifts (FOUT).
  • Cookie consent banners and promotional modals appear late and shift primary content.
  • SPA routing transitions insert new content without transition guards or skeleton states.

Stabilize Your Layout with These Strategies

Use the following engineering and design practices to keep visual elements predictable and anchored. Start with templates that drive revenue or critical conversions and then expand coverage across the rest of the site.

Reserve Space for Media

Always include explicit width and height on images, video embeds, and iframes so the browser can allocate space before assets load.

Control Dynamic Content

Avoid inserting DOM elements above existing content. Use skeleton loaders or placeholders for ads, newsletters, and consent banners.

Optimize Web Fonts

Use `font-display: swap`, preload critical fonts, and match fallback font metrics to prevent text reflow during loading.

Preload Critical Resources

Preload hero images, fonts, and key CSS to reduce late network requests that trigger layout adjustments.

Measure Real Users

Implement field data monitoring (RUM) to capture CLS across devices, network types, and viewports—not just lab simulations.

Engineering Checklist Before Deployment

Ship new templates with a stability checklist. Document the owners for each item to ensure accountability across product, design, and engineering teams.

  • Include intrinsic dimensions for every media element.
  • Preallocate space for third-party embeds, ads, and popovers.
  • Defer non-critical animations until after page load.
  • Align font fallback metrics with final web fonts to avoid reflow.
  • Audit personalized modules for late-loading shifts on repeat visits.

Quantify Improvements with the Right Tools

Combine lab diagnostics with real-user monitoring to validate that your fixes hold up under production traffic. Pair synthetic and field data so you can confirm whether regressions are specific to certain geographies, devices, or connection speeds.

Google Lighthouse

Lab analysis with opportunities and diagnostics for layout stability.

Chrome User Experience Report

Field data from real Chrome users across the globe.

Web Vitals JS Library

Client-side monitoring that sends CLS metrics to your analytics backend.

Core Web Vitals API

Access origin-level performance data inside Search Console.

Prioritize CLS Fixes That Impact Revenue

Focus on journeys where unexpected layout movement leads to lost revenue or engagement. Checkout flows, lead forms, and product detail pages often present the highest risk because dynamic modules load around primary calls to action.

TemplateRisk LevelRecommended Action
Lead generation landing pagesHighReserve space for form validation and personalization modules.
Ecommerce product detail pagesMediumPreload hero media and defer recommendation carousels below the fold.
News article templatesMediumPlace ads in fixed-size containers and lazy-load only after user scroll.
Support documentationLowAudit code snippets and expandable accordions for late layout shifts.

Build a Performance Culture Around CLS

CLS is not a one-and-done fix. Establish governance policies that make stability a requirement across the product lifecycle.

  1. Set targets in dashboards. Track the percentage of page views in the \"good\" CLS band and alert your team when thresholds slip.
  2. Integrate into CI/CD. Run automated Lighthouse audits in pull requests or nightly builds to catch regressions before launch.
  3. Educate stakeholders. Share before-and-after recordings and business impact to secure ongoing prioritization.
Turn Insights into Action
Test your high-impact pages and monitor layout stability with the HeadlineBoost CLS Tester.

Get instant CLS scoring, visual shift timelines, and prioritized recommendations for every page.

Analyze CLS Instantly