Dev tools
Core Web Vitals Explained: LCP, INP and CLS Fixes
Core web vitals measure loading (LCP), responsiveness (INP) and visual stability (CLS). Learn the thresholds, how to measure them and how to fix each.
Core web vitals are three measurements Google uses to describe how a page feels to real visitors: how fast the main content appears (Largest Contentful Paint, LCP), how quickly the page reacts when someone taps or types (Interaction to Next Paint, INP) and how much the layout jumps around while loading (Cumulative Layout Shift, CLS). A page has a good core web vitals score when at least 75% of its visits are good on all three: LCP of 2.5 seconds or less, INP of 200 milliseconds or less and CLS of 0.1 or less.
This guide explains what the metrics measure, where the numbers come from, how to measure core web vitals on your own site and how to fix each one, with a worked example for LCP and CLS, a table of the most common causes and a short list of mistakes that waste time. Everything is checked against Google's own web.dev documentation, and the lab-versus-field difference is covered early because it explains most "my score is perfect but Search Console says failed" confusion.
What Are the Core Web Vitals?
What are the core web vitals? They are the subset of Google's Web Vitals program that applies to every web page and that every site owner should measure. Each one covers a different part of the experience, and each has a "good" threshold that a page should meet for most of its visitors.
| Metric | What it measures | Good | Needs improvement | Poor |
|---|---|---|---|---|
| Largest Contentful Paint (LCP) | How long until the largest image, text block or video in the viewport is rendered | 2.5 s or less | 2.5 to 4.0 s | Over 4.0 s |
| Interaction to Next Paint (INP) | How long the page takes to show a visual response after a tap, click or key press, across the whole visit | 200 ms or less | 200 to 500 ms | Over 500 ms |
| Cumulative Layout Shift (CLS) | How much visible content moves unexpectedly, as a unitless score | 0.1 or less | 0.1 to 0.25 | Over 0.25 |
These three together are usually written as lcp inp cls. A fourth number, Time to First Byte (TTFB), and a few others such as First Contentful Paint are part of the wider Web Vitals set, but they are diagnostic helpers, not part of the Core Web Vitals pass or fail.
Two details matter for reading the table. First, the thresholds are applied at the 75th percentile of page loads, separately for mobile and desktop. If you have 100 mobile visits and the 75th-slowest visit has an LCP of 2.3 seconds, mobile LCP is good, even though a quarter of visitors had it worse. Second, a page passes the overall "Core Web Vitals assessment" only when all three metrics are good at that percentile. One failing metric fails the assessment.
LCP: Loading
LCP reports when the largest image, block of text or video visible in the viewport finished rendering, measured from the moment the visitor started navigating. The candidates are <img> elements, images inside SVG, video poster images, elements with a CSS url() background image and block-level text. Full-viewport background elements, invisible elements and placeholder images are ignored. On most pages the LCP element is the hero image or the main heading, which is why the page's biggest picture is the first thing to look at.
INP: Responsiveness
INP replaced First Input Delay (FID) as a stable Core Web Vital in March 2024. FID only measured the delay before the first interaction began being processed. INP looks at every tap, click and key press during the visit and reports roughly the longest one, ignoring outliers on pages with many interactions. Each interaction has three parts that add up: input delay (waiting for the main thread to be free), processing time (your event handlers running) and presentation delay (the browser producing the next frame).
CLS: Visual Stability
CLS adds up unexpected layout shifts: moments when something visible moves because content above it loaded late. A button that jumps just as you tap it, or text that slides down when an ad appears, is a layout shift. Shifts that happen within 500 milliseconds of a tap or click are excluded, because the visitor expects the page to change. The score is grouped into session windows: bursts of shifts with less than a second between them, capped at five seconds, and the worst window counts.
Do Core Web Vitals Affect SEO?
Yes, but with limits. Google's documentation says Core Web Vitals aligns with what its core ranking systems seek to reward and strongly recommends good scores for success in Search. It does not publish a weight, and it describes the metrics as one part of a wider page experience, not a replacement for relevance. In practice a fast, stable page will not outrank a far more relevant result on speed alone, but among pages that answer a query equally well, a page that frustrates visitors has less going for it.
The reason to improve core web vitals is mostly the visitor, not the ranking. Slow, jumpy pages lose people before they read anything, and that shows up in sign-ups and sales regardless of how a search engine treats the page. Treat the ranking benefit as a side effect and the fixes below as ordinary product quality work.
Field Data vs Lab Data: Why Your Score Disagrees With Search Console
The most common source of confusion is that there are two kinds of measurement, and only one of them counts.
Field data comes from real visitors. Google gathers it through the Chrome User Experience Report (CrUX), a public dataset built from Chrome users who opted in to share usage statistics. CrUX uses a rolling 28-day window, reports the 75th percentile and exists at two levels: the whole origin (your site) and individual URLs, though URL-level data appears only when a page has enough traffic. This is the data behind the Core Web Vitals report in Search Console and the "Discover what your real users are experiencing" panel in PageSpeed Insights.
Lab data comes from a simulated visit, for example a Lighthouse run in DevTools or PageSpeed Insights. It uses fixed conditions, produces a single value and is excellent for finding regressions and testing fixes. It also cannot measure INP at all, because a lab test has no real user to tap anything. Lighthouse uses Total Blocking Time (TBT) as a stand-in that tends to move in the same direction as INP.
| Field data | Lab data | |
|---|---|---|
| Source | Real Chrome visitors (CrUX) | Simulated page load |
| Window | Rolling 28 days | One run |
| INP | Yes | No (TBT as a proxy) |
| Good for | Knowing whether you pass | Debugging and testing a fix |
| Tools | Search Console, PageSpeed Insights field panel, CrUX | Lighthouse, DevTools, PageSpeed Insights lab section |
A page can score 100 in a lab test and still fail in the field, because real visitors use slow phones, bad networks and pages with cookie banners and personalised content that your test run never saw. A related trap: because CrUX is a 28-day average, a fix you ship today takes weeks to show up in Search Console. Verify the fix in the lab first, then wait.
How to Measure Core Web Vitals
To measure core web vitals, start with field data to learn whether there is a problem, then use lab tools to find out why.
- Search Console's Core Web Vitals report groups your URLs into good, needs improvement and poor for mobile and desktop, and lists the issue behind each group. Start here to see which page types are failing.
- PageSpeed Insights takes one URL and shows its field data at the top (if CrUX has enough data) and a Lighthouse lab run below. Read the top section first. If it says "Core Web Vitals Assessment: Failed", that's the number that matters.
- Chrome DevTools has a Performance panel that records a page load or an interaction and highlights long tasks, layout shifts and the LCP element. It is the main tool for finding the cause.
- The web-vitals JavaScript library from the Chrome team reports LCP, INP and CLS from your real visitors to your own analytics. Its
onLCP,onINPandonCLSfunctions each take a callback, and you send the value wherever you collect metrics. This is how you get per-page and per-release data without waiting for CrUX.
If your site is small, CrUX may have no data for individual URLs. In that case, use the origin-level numbers and the web-vitals library, and judge by page template, since most fixes apply to a template that powers many pages, not to a single URL.
How to Improve Core Web Vitals
To improve core web vitals, work on one metric at a time and fix the biggest cause first. Google's own ordering of fixes for each metric is below, followed by examples.
Improve LCP
Almost every slow LCP comes from one of four delays, and Google's guidance gives a rough share of the total LCP for each part:
| LCP part | What it is | Roughly how much of the LCP it should be |
|---|---|---|
| Time to first byte (TTFB) | From navigation start to the first byte of HTML | About 40% |
| Resource load delay | From first byte until the browser starts loading the LCP image or font | Under 10% |
| Resource load duration | How long the LCP resource takes to download | About 40% |
| Element render delay | From the resource finishing until it paints | Under 10% |
These are guidelines, not hard budgets. Their value is relative: if the "load delay" part is 30% of your LCP, something is hiding the image from the browser, and that is cheaper to fix than a faster server. Work through them in this order:
- Remove resource load delay. The browser can only start downloading the LCP image when it discovers it. Put the image in the HTML as an
<img>with asrc, not injected by JavaScript or set as a CSS background, and give it a high priority. Never lazy-load the LCP image:loading="lazy"on a hero image is one of the most common LCP mistakes.
<img src="/img/hero.avif" width="1200" height="600"
fetchpriority="high" alt="Product dashboard on a laptop">- Remove element render delay. Once the image has downloaded, anything that blocks painting makes it wait: large render-blocking stylesheets, synchronous scripts in the head, long main-thread tasks, or a client-side framework that has to hydrate before showing content. Inline the critical CSS, defer scripts and render the page's main content on the server.
- Shorten the resource load duration. Serve the right size (not a 3,000-pixel image into a 400-pixel slot), use a modern format such as AVIF or WebP and serve it from a CDN. Images on the same origin avoid an extra connection setup. Avoid competing downloads: dozens of other requests starting at the same time slow the hero.
- Reduce time to first byte. Avoid redirect chains (a
httptohttpstowwwchain adds round trips), cache rendered pages at the edge and make the server or database queries faster. If your TTFB is 1.5 seconds, a 2.5-second LCP is nearly impossible.
Worked Example: A Page With a 4.2-Second LCP
Take a landing page whose field LCP is 4.2 seconds on mobile. DevTools shows these parts (illustrative numbers, but the pattern is typical):
| Part | Measured | Share | Guideline | Verdict |
|---|---|---|---|---|
| TTFB | 1.4 s | 33% | about 40% | Fine relative to the rest |
| Resource load delay | 1.0 s | 24% | under 10% | Too high: the image is found late |
| Resource load duration | 1.2 s | 29% | about 40% | Fine |
| Element render delay | 0.6 s | 14% | under 10% | A bit high |
The biggest outlier is the load delay: the hero is set as a CSS background that only starts downloading after the stylesheet loads. Changing it to an <img> with fetchpriority="high" removes most of that second. The render delay comes from a script in the head, which gets defer. Re-testing shows load delay at 0.1 seconds and render delay at 0.2 seconds, so LCP falls from 4.2 s to about 2.9 s without touching the server. A modern image format cuts the download by another few tenths, and that gets the page under 2.5 seconds. The lesson is to diagnose which part is wrong before optimising anything.
Improve INP
INP is usually a JavaScript problem: the main thread is busy when the visitor taps, or your handler takes too long, or the next frame takes too long to draw. The three parts of an interaction tell you where to look.
- Long input delay means the main thread was blocked by other work when the tap arrived. Typical culprits: large scripts executing after load, third-party tags (analytics, chat widgets, ad scripts), and long timers. Third-party scripts are also a security surface, and a content security policy lets you control which ones are allowed to run at all. Break up long tasks, load third-party scripts later and remove ones you don't use.
- Long processing time means your event handler does too much. Do the minimum needed to show a response, then defer the rest. A click that updates the screen should paint first and run analytics, logging and heavy computation afterwards.
- Long presentation delay means the browser takes too long to render the next frame. A very large DOM, expensive layout and heavy CSS are the usual causes. Flatten the DOM, avoid forcing layout in a loop (layout thrashing) and consider
content-visibility: autoto skip rendering work for content that is off screen.
The core technique is yielding: giving the browser a chance to paint and handle input in the middle of a long task. Google's guidance is that yielding indiscriminately is better than not yielding at all. The simplest portable version uses setTimeout, and scheduler.yield() is the newer API, which is not yet available in every browser, so check for it first:
function yieldToMain() {
if (globalThis.scheduler?.yield) {
return scheduler.yield();
}
return new Promise((resolve) => setTimeout(resolve, 0));
}
button.addEventListener("click", async () => {
showSpinner(); // update the UI first
await yieldToMain(); // let the browser paint
doSlowWork(); // then do the heavy part
});This pattern does not make doSlowWork() faster, but the visitor sees a response immediately, and INP measures exactly that.
Improve CLS
Layout shifts have a short list of causes, and nearly all can be fixed by reserving space before the content arrives.
- Images and video without dimensions. Always set
widthandheightattributes on<img>and<video>, or reserve the space with the CSSaspect-ratioproperty. Browsers use the ratio to hold the space before the file downloads. - Ads, embeds and iframes. Reserve the slot size in the initial layout, for example with
min-height, and keep the placeholder if no ad comes back instead of collapsing it. - Content injected above existing content. Cookie banners, "subscribe" bars and late-loading promotional strips that push the page down are classic shifts. Overlay them (a fixed or sticky position that doesn't move other content) or reserve their space from the start.
- Web fonts. A fallback font that is a different size from the final web font makes text reflow when the swap happens. Use
font-display: optionalto avoid the re-layout, or match the fallback's metrics to the web font withsize-adjustand related descriptors. - Animations that move layout. Animating
toporleftshifts layout. Animatetransforminstead, which does not.
img, video { max-width: 100%; height: auto; }
.hero { aspect-ratio: 2 / 1; }
.ad-slot { min-height: 250px; }A bonus fix for repeat visits: make pages eligible for the browser's back/forward cache, so returning to a page restores it instantly without re-running its loading shifts.
Worked Example: Calculating a Layout Shift Score
Each layout shift scores impact fraction × distance fraction. The impact fraction is the share of the viewport covered by the shifting elements before and after the move, combined. The distance fraction is the farthest any element moved divided by the viewport's larger dimension.
Say a text block fills the top half of the viewport and a banner loads above it, pushing it down by a quarter of the viewport height. The block covered 50% of the viewport before and 50% after, overlapping in the middle, so together they cover 75%: impact fraction 0.75. The farthest move was 25% of the viewport height: distance fraction 0.25. The shift scores 0.75 × 0.25 = 0.1875, a poor score from a single event. If the banner's space had been reserved, the score would be 0. This is why one late banner can fail a page that is otherwise stable.
Common Causes and Fixes at a Glance
| Symptom | Metric | Likely cause | First fix |
|---|---|---|---|
| Hero image appears late | LCP | Lazy-loaded or CSS-background hero; large file | <img> with fetchpriority="high", no lazy loading, smaller modern format |
| Text appears late | LCP | Render-blocking CSS, font loading, slow server | Inline critical CSS, font-display, cache pages at the edge |
| Slow first byte | LCP | Slow server, redirects, no cache | Remove redirects, cache at the CDN, speed up queries |
| Taps feel sticky | INP | Long tasks, heavy third-party scripts | Break up tasks, yield, defer third-party tags |
| Menu opens slowly | INP | Large handler or huge DOM | Paint first, defer work, flatten the DOM |
| Layout jumps while loading | CLS | Images and embeds without sizes | width and height or aspect-ratio |
| Text shifts after fonts load | CLS | Different fallback font metrics | font-display: optional or size-adjust |
| Banner pushes the page | CLS | Late-injected content | Reserve space or overlay it |
If you are choosing where to host and want these defaults handled for you, our Vercel vs Netlify comparison covers the edge caching and image optimisation each platform provides.
Core Web Vitals Checklist
Use this list for a page template, not a single URL:
- [ ] Field data checked first (Search Console or PageSpeed Insights top section), mobile and desktop separately.
- [ ] LCP element identified in DevTools, and its four parts compared with the guideline shares.
- [ ] LCP image is an
<img>in the HTML, has a high fetch priority and is not lazy-loaded. - [ ] No redirect chain before the page, and HTML cached at the edge where possible.
- [ ] Render-blocking CSS and head scripts reviewed; main content rendered on the server.
- [ ] Long tasks over 50 ms found in the Performance panel and broken up with yielding.
- [ ] Third-party scripts audited, with unused ones removed and the rest deferred.
- [ ] Every image, video, ad and embed has reserved space.
- [ ] Web fonts use
font-displayand a metric-matched fallback. - [ ] The web-vitals library reporting real LCP, INP and CLS to your analytics.
- [ ] A fix verified in the lab first, then rechecked in field data after the 28-day window has moved.
Common Mistakes
- Chasing the Lighthouse score. A 100 in the lab does not mean the field assessment passes. Judge by field data and use the lab to debug.
- Lazy-loading everything, including the hero. Lazy loading is right for images below the fold and wrong for the LCP image.
- Fixing one URL instead of the template. Core Web Vitals problems are almost always shared by every page that uses the same layout, and so are the fixes.
- Ignoring third-party scripts. Tag managers, chat widgets and ad code are among the biggest INP and CLS offenders and are easy to forget because someone else wrote them.
- Testing only on a fast laptop. The 75th percentile is dominated by mid-range phones on average networks. Throttle the CPU and network in DevTools to see what they see.
- Expecting instant results in Search Console. The 28-day window means a fix needs weeks to show. Measure with your own web-vitals data to see it sooner.
- Optimising a metric that already passes. If LCP is 1.8 s and INP is 450 ms, spend the time on INP.
FAQ
What are the three Core Web Vitals?
Largest Contentful Paint (LCP) for loading, Interaction to Next Paint (INP) for responsiveness and Cumulative Layout Shift (CLS) for visual stability. A good score is an LCP of 2.5 seconds or less, an INP of 200 milliseconds or less and a CLS of 0.1 or less, measured at the 75th percentile of visits.
What is a good core web vitals score?
There is no single number. Each metric has its own threshold, and a page passes when all three are good for at least 75% of visits, separately for mobile and desktop. The tools label results as good, needs improvement or poor.
Did INP replace FID?
Yes. INP became a stable Core Web Vital in March 2024 and replaced First Input Delay. FID only measured the delay of the first interaction, while INP considers every interaction in the visit and includes the time until the screen updates.
Why does PageSpeed Insights show a good score but Search Console says my page fails?
PageSpeed Insights shows two things: a simulated lab run and, above it, real field data. The lab run is a single test under fixed conditions, while Search Console uses field data from real visitors over 28 days at the 75th percentile. The field data is what counts for the assessment.
Do Core Web Vitals affect rankings?
Google says they align with what its core ranking systems seek to reward and recommends good scores, but it does not publish a weight, and relevance still matters more. Improve them mainly because faster, steadier pages keep visitors.