Skip to main content
Comparison

CLS (Cumulative Layout Shift) vs INP (Interaction to Next Paint): What's the Difference?

By ยท Updated ยท 7 min read

CLS vs INP: The Core Distinction

CLS (Cumulative Layout Shift) measures visual stability โ€” specifically, how much page elements move unexpectedly during the user's session. INP (Interaction to Next Paint) measures interaction responsiveness โ€” how long it takes the browser to visually respond after a user taps, clicks, or presses a key. One is about the page shifting beneath the user; the other is about the page reacting to the user.

Google counts both as Core Web Vitals, meaning they directly influence search ranking signals. CLS is scored as a unitless number where lower is better (good threshold: below 0.1). INP is measured in milliseconds where lower is also better (good threshold: below 200ms). Despite being measured differently and capturing different failure modes, both ultimately determine whether a page feels trustworthy and responsive to real shoppers.

How Each Metric Is Calculated

CLS aggregates layout shift events across the entire page lifecycle. Each shift gets a score equal to the impact fraction (how much of the viewport moved) multiplied by the distance fraction (how far elements moved). Google sums the largest cluster of shifts within a 1-second session window and uses that as the page's CLS score. A single large image loading without declared dimensions can spike a score dramatically.

INP takes a different approach: it records the latency of every discrete interaction during a session โ€” clicks, taps, and keyboard inputs โ€” then reports the worst-case interaction latency, with a small buffer that ignores outliers on very long sessions. INP replaced FID (First Input Delay) in March 2024 because FID only captured the delay before the browser started handling an event, while INP captures the full visual response time from input to the next paint.

The calculation difference matters for ecommerce diagnostics. A high CLS score points to rendering or resource-loading problems visible in the DOM. A high INP score points to JavaScript execution blocking the main thread during user interactions โ€” a different root cause requiring a different fix.

When Each Metric Fires and What Triggers It

CLS fires passively. No user action is required. Layout shifts happen when fonts load and text reflows, when images render without reserved space, when third-party ad scripts inject banners, or when dynamic content like cart notifications push existing elements down. On a product listing page, a lazy-loaded promotional banner appearing above the fold is a classic CLS culprit.

INP fires only after user interaction. A shopper clicking 'Add to Cart' triggers an interaction; INP measures the time until the button visually changes state or the cart count updates on screen. If the main thread is busy processing analytics scripts or rendering recommendations at that moment, INP climbs. Product filter clicks on a category page โ€” where JavaScript recalculates results โ€” are one of the highest-INP moments in ecommerce.

The timing difference means CLS problems appear immediately on page load or during scroll, while INP problems surface at specific interactive moments. A page can score perfectly on CLS but fail INP entirely if its JavaScript is heavy during interactions, and vice versa.

Where CLS and INP Overlap in Practice

The two metrics can interact. A slow INP event sometimes triggers a layout shift. If a user clicks a filter and the page takes 600ms to respond, the resulting DOM changes can cause elements to reflow โ€” contributing to CLS as a side effect. In these cases, fixing the INP (by deferring or breaking up JavaScript tasks) also reduces the downstream CLS score.

Both metrics are also measured in the field via Chrome User Experience Report (CrUX) data, which Google uses in Search Console and PageSpeed Insights. A poor field score on either metric can push a URL into the 'needs improvement' or 'poor' bands in Core Web Vitals reports. For ecommerce stores running A/B tests or personalizing content dynamically, both metrics need active monitoring because any JavaScript that touches the DOM risks affecting one or both.

Fixing CLS vs Fixing INP: Different Strategies

CLS fixes center on reserving space and controlling render order. Setting explicit width and height attributes on images and videos, using CSS aspect-ratio boxes for dynamic content, loading fonts with font-display: optional or swap with fallback metrics, and delaying third-party ad slots until after load are the standard remediation steps. These changes are largely static and infrastructure-level.

INP fixes require JavaScript optimization. Breaking long tasks into smaller chunks using scheduler.yield() or setTimeout, reducing third-party script execution on interaction paths, moving heavy computation off the main thread with Web Workers, and minimizing React or framework re-renders on interaction events are the primary approaches. These require developer instrumentation to identify which specific interactions are slow.

For ecommerce operators, the practical priority depends on where scores are failing. If CLS is the problem, start with image dimensions and font loading. If INP is the problem, audit JavaScript execution during 'Add to Cart,' search, and filter interactions โ€” those are the highest-traffic, highest-impact interactions on most stores.

Actionable Takeaway: Diagnose Before You Fix

Run both metrics in PageSpeed Insights and Google Search Console's Core Web Vitals report before writing a single line of code. The two metrics fail for entirely different reasons, and fixing CLS issues (image dimensions, font loading) does nothing for a failing INP score caused by main-thread congestion. Separate the diagnostic phase for each metric.

For CLS, use the Layout Instability API in Chrome DevTools (the Rendering panel with Layout Shift Regions enabled) to see exactly which elements are shifting. For INP, use the Chrome DevTools Performance panel to record interactions and look for long tasks blocking the main thread. Prioritize whichever metric sits in the 'poor' band first โ€” Google's ranking signal weighs the 75th percentile of field data, so fixing your worst-performing segments delivers the largest ranking benefit.

Frequently asked questions

Is CLS or INP more important for ecommerce SEO?

Neither outranks the other in Google's Core Web Vitals system โ€” both are weighted signals. In practice, INP failures are more common on ecommerce stores because product filters, cart interactions, and search functions involve heavy JavaScript. CLS failures typically appear on content-heavy or ad-supported pages. Fix whichever sits in the 'poor' band (CLS above 0.25, INP above 500ms) first, as those carry the largest ranking penalty.

Can a page have a good CLS score but a bad INP score?

Yes, and it is common. CLS measures passive layout stability during load and scroll; INP measures active responsiveness during clicks and taps. A page with properly dimensioned images and no layout shifts can still have a 700ms INP if heavy JavaScript runs on the main thread during 'Add to Cart' clicks. The two metrics are independent failure modes with different causes and different fixes.

Did INP replace CLS as a Core Web Vital?

No. INP replaced FID (First Input Delay) in March 2024. CLS remains a Core Web Vital unchanged. The current three Core Web Vitals are LCP (Largest Contentful Paint), CLS, and INP. FID was retired because INP captures the full interaction-to-paint latency, which is a more complete measure of responsiveness than FID's narrower metric.

Can fixing INP accidentally improve CLS?

Yes, in specific cases. When a slow interaction (high INP) eventually resolves, the resulting DOM changes can cause layout shifts that contribute to CLS. By reducing INP โ€” typically by breaking up long JavaScript tasks โ€” the DOM updates happen faster and with less visual disruption, which can reduce associated layout shifts. The reverse is less common: CLS fixes rarely impact INP scores directly.

What tools measure CLS and INP together?

Google PageSpeed Insights reports both metrics using real-world CrUX field data alongside lab data. Google Search Console's Core Web Vitals report shows URL-level pass/fail status for both. Chrome DevTools measures both in lab conditions: the Performance panel captures INP via interaction recording, and the Rendering panel with Layout Shift Regions highlights CLS contributors. Web Vitals Chrome extension shows live scores for both during browsing.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method โ€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →