Cumulative Layout Shift


On this page
Available in:
SyntheticCrUXRUM

Cumulative Layout Shift (CLS) is a Core Web Vital that measures how much visible content moves unexpectedly while a page is open. It is a unitless score: 0.1 or less is good, and above 0.25 is poor.

How to fix layout shifts

For causes and fixes, read What Is Cumulative Layout Shift (CLS)? How to Measure and Fix It. This page covers the calculation and where to track CLS in Calibre.

Check your Cumulative Layout Shift#

Use our free Core Web Vitals test, or the form below.

Check your Cumulative Layout Shift

How is Cumulative Layout Shift calculated?#

CLS is the largest burst of unexpected shifts during a page's life:

  • Session windows: shifts less than a second apart are grouped into a window. It closes after a second with no shift, or at five seconds.
  • Largest window wins: CLS is the total of the highest-scoring window, not every shift added together.
  • Expected shifts are excluded: shifts within 500 milliseconds of a tap, click or key press don't count.

Each shift, reported by the Layout Instability API, scores impact fraction × distance fraction:

  • Impact fraction: the share of the viewport the moved elements cover, before and after the shift.
  • Distance fraction: the furthest any of them moved, divided by the viewport's largest dimension.

Worked examples: how CLS is calculated, or web.dev's layout shift score.

What is a good Cumulative Layout Shift score?#

GoodNeeds improvementPoor
≤ 0.10.1–0.25> 0.25

Google assesses CLS at the 75th percentile of page loads, separately for mobile and desktop. Compare it with other metrics in Core Web Vitals thresholds.

Cumulative Layout Shift desired values showing anything under 0.1 as good, between 0.1 and 0.25 as needs improvement, and above 0.25 as poor.

Track Cumulative Layout Shift in Calibre#

  • Real User Monitoring: CLS from your visitors, for as long as the page is open. On the RUM Dashboard, click Cumulative Layout Shift for its Metric Detail report.
  • CrUX: the 28-day, 75th percentile CLS Google assesses, in Site → CrUX → Cumulative Layout Shift. Switch to Experience Distribution for the share of good, needs improvement and poor visits.
  • Synthetic: CLS from scheduled tests, in Site → Synthetic → Web Vitals → CLS. The Metric page segments it by Test Profile, deployment and page.

Find the element that shifted#

  • RUM element attribution: group CLS by the element responsible. Add a data-name attribute to give an element a readable label.
  • Navigation type: filter RUM reports by navigation type, such as back/forward cache restores, which reset CLS to zero.
  • Synthetic Snapshots: each Snapshot has a render video for spotting the shift. Filter its Lighthouse audits to those affecting Cumulative Layout Shift.
Calibre RUM showing Cumulative Layout Shift grouped by the element responsible for the shift.

Calibre RUM groups Cumulative Layout Shift by the element responsible.

Catch regressions before they ship#

  • Budgets: set a CLS performance budget in Site → Synthetic → Budgets, and subscribe to notifications when its status changes.
  • Pull Request Reviews: see CLS changes on each pull request before you merge.

Why lab and field CLS differ#

  • Synthetic measures CLS during page load only. Use it to reproduce and prevent shifts.
  • RUM and CrUX also capture shifts as people scroll and interact, so field CLS is often higher. Use them to confirm what people see.

See Why your Synthetic, CrUX and RUM numbers differ.

How to improve Cumulative Layout Shift#

Most shifts happen because the browser didn't know how much space something needed:

  • Set dimensions on media: add width and height (or a CSS aspect-ratio) to <img>, <video> and <iframe>.
  • Reserve space for ads and embeds: give slots a min-height close to the size they usually serve.
  • Don't insert content above existing content: reserve space for late banners and UI, or show them after an interaction.
  • Stabilise web fonts: tune fallbacks with size-adjust and the metric override descriptors, or use font-display: optional.
  • Animate with transform: avoid animating top, left, width, height or margin.

Examples for each fix: How to improve CLS.

Browser compatibility#

Limited availabilityChrome 84+Edge 84+FirefoxSafari

See the full browser compatibility table on MDN.

Further resources#