Core Web Vitals: LCP, INP and CLS Explained
LCP, INP and CLS measure loading, interactivity and visual stability. Learn the thresholds, the causes, and how to improve each one.
By Velloreth
The three metrics
LCP — Largest Contentful Paint. How long the largest visible element takes to render.
INP — Interaction to Next Paint. The latency of an interaction.
CLS — Cumulative Layout Shift. The visual stability.
LCP
The target is under 2.5 seconds at the 75th percentile.
The element measured is usually the hero image, a large heading, or a video poster.
The four phases:
- Time to first byte — the server’s response.
- Resource load delay — the time before the resource starts loading.
- Resource load time — the download.
- Element render delay — the time before it paints.
The fixes:
- Serve the image in a modern format (WebP or AVIF) and the right size.
- Preload the hero image so it starts loading early.
- Use a CDN to reduce the time to first byte.
- Remove a render-blocking resource from the critical path.
- Do not lazy-load the hero image. A
loading="lazy"on the largest element delays it, which is a common mistake.
<link rel="preload" as="image" href="/hero.webp" fetchpriority="high">
<img src="/hero.webp" alt="..." width="1200" height="600" fetchpriority="high">
fetchpriority="high" tells the browser this image matters, which raises it in the queue.
INP
The target is under 200 milliseconds at the 75th percentile.
INP measures the latency of every interaction, from the click to the next paint. It replaced First Input Delay, which measured only the first interaction.
The three parts:
- Input delay — the time before the handler runs, because the main thread is busy.
- Processing time — the time the handler takes.
- Presentation delay — the time to paint the result.
The fixes:
- Break up a long task. A task over 50ms blocks the main thread.
- Yield to the browser between chunks of work.
- Debounce a rapid input such as a keystroke.
- Move heavy work to a web worker.
- Reduce the JavaScript that runs on load.
// Yield to the browser between chunks
async function process(items) {
for (const item of items) {
doWork(item);
if (performance.now() % 50 < 1) {
await new Promise((r) => setTimeout(r, 0));
}
}
}
The scheduler API is the modern way to yield:
await scheduler.yield();
CLS
The target is under 0.1 at the 75th percentile.
CLS measures the unexpected movement of the visible content. A shift caused by a user interaction within 500ms is excluded.
The causes:
- An image without a width and height, so the browser does not reserve the space.
- An ad or an embed injected without a reserved slot.
- A font swap that changes the text metrics.
- Content injected above the existing content, such as a banner.
The fixes:
- Set the width and height on every image, or use
aspect-ratio.
<img src="/photo.webp" alt="..." width="800" height="600">
.photo { aspect-ratio: 4 / 3; }
- Reserve the space for an ad or an embed.
- Use
font-display: optionalor a size-adjusted fallback to reduce the font swap shift. - Insert new content below the existing content, or animate it in.
Field versus lab
A field measurement comes from real users, and it is the metric that counts.
A lab measurement comes from a tool such as Lighthouse, and it is a useful diagnostic.
The two can disagree. A lab test on a fast connection may show a good LCP while the field data shows a poor one, because the real users are on a slower connection.
Use the field data to decide whether there is a problem, and the lab data to find the cause.
The Chrome UX Report provides the field data for a public site, and a real-user monitoring tool provides it for your own.
The 75th percentile
The threshold applies at the 75th percentile, not the average.
A site with a good average and a bad tail fails, because a quarter of the users have a poor experience.
This is deliberate. It prevents a fast majority from hiding a slow minority, which is often a specific device or network.
Segment the data by device and by country, to find the group with the problem.
Improving the metrics together
The three metrics interact, and a fix for one can affect another. Deferring a script improves the interaction latency but can delay the largest element, which hurts the largest contentful paint. Inlining a large stylesheet improves the first paint but adds bytes to the document, which can delay the largest element on a slow connection. The practical approach is to fix the worst metric first, measure again, and check that the others did not regress, because a change that improves one number and worsens another is not a win. The largest contentful paint is usually the first to fix, because it is the most visible to a user and the most affected by an unoptimised image. The interaction latency is the second, and it is usually a matter of reducing the JavaScript that runs on load. The layout shift is the third, and it is usually a matter of reserving space for an image or an embed.
Practical guidance
- Measure the field data first.
- Preload the hero image and do not lazy-load it.
- Serve a modern image format at the right size.
- Break up a long task to improve INP.
- Set the width and height on every image.
- Reserve the space for an ad or an embed.
- Use a CDN to reduce the time to first byte.
- Check the 75th percentile, not the average.
- Segment by device and country.
For the related guides, see critical-css-explained and improve-inp-core-web-vitals-static-site. For the broader context, http-caching-headers and how-cdns-actually-work.
Quotable summary
LCP measures how long the largest visible element takes to render with a target under 2.5 seconds, INP measures the latency of the interaction with a target under 200 milliseconds, and CLS measures the visual stability with a target under 0.1. A field measurement from real users is the metric that counts rather than a lab score, because a lab test on a fast connection can show a good LCP while the field data shows a poor one. The threshold applies at the 75th percentile, so a good average with a bad tail still fails, which is deliberate because it prevents a fast majority from hiding a slow minority. Do not lazy-load the hero image, set the width and height on every image, and break up a long task to improve INP.