Skip to content
Tutorials Center
My learning

Topics

Lesson 5 of 37 ยท Metrics and Core Web Vitals

Core Web Vitals Overview

Meet the three Core Web Vitals, Largest Contentful Paint, Interaction to Next Paint and Cumulative Layout Shift, with thresholds, how they are judged and how to read them.

Core Web Vitals are a small set of metrics that describe the user experience of a page in three areas: loading, interactivity and visual stability. They are defined by the web platform community and measured in the browser, which makes them the shared language of web performance.

This lesson introduces all three, explains their thresholds and how a page "passes", and shows how to observe them in your own code. The next lessons take each one in depth.

The three vitals

Metric Area Question it answers Good Poor
LCP Largest Contentful Paint Loading When did the main content appear? 2.5 s or less over 4 s
INP Interaction to Next Paint Responsiveness How quickly does the page react to input? 200 ms or less over 500 ms
CLS Cumulative Layout Shift Visual stability Does content jump around? 0.1 or less over 0.25

Values between "good" and "poor" are "needs improvement". The thresholds are stable but occasionally revisited, so check the current definitions on web.dev when you ship.

flowchart LR
  A["Page starts"] --> B["LCP: main content visible"]
  B --> C["User interacts: INP"]
  C --> D["Layout stays stable: CLS"]

The vitals cover the life of a visit, from first load to every interaction.

How a page passes

Each metric is evaluated at the 75th percentile of real page views (see lab and field data), split by phone and desktop. A page passes the Core Web Vitals assessment when LCP, INP and CLS are all "good" at p75. If one fails, the page fails.

This matters for two reasons:

  1. You are optimising for the slower quarter of your users, not the average.
  2. Field data decides. A perfect Lighthouse score on a fast laptop does not mean visitors on mid-range phones pass.

Core Web Vitals feed into Google's page experience signals, but relevance and content quality come first. Treat them as a way to improve experience, not a ranking trick.

Why these three?

Earlier metrics, like the load event, said little about experience. The vitals were chosen because they match what users notice:

  • LCP replaced "page loaded" with "the main thing I came for is visible".
  • INP replaced First Input Delay (FID). FID looked only at the delay before the first interaction; INP looks at all interactions across the visit and measures until the next frame is painted, which is closer to how responsiveness feels.
  • CLS captures the annoyance of a button moving as you tap it.

Observing the vitals in code

Each vital is exposed through a PerformanceObserver. The official web-vitals library wraps this logic, but the raw APIs are short. This demo creates a layout shift on purpose and reads it back.

Create and observe a layout shift

The late banner moves visible content, so the browser records a layout shift. Shifts caused within 500 ms of a user input are excluded (hadRecentInput), because they are expected.

Observing LCP

LCP candidates arrive as the page renders. The last candidate before the user interacts is the final LCP.

Watch LCP candidates

What the vitals do not cover

The vitals are not everything. Other metrics such as TTFB, First Contentful Paint and Total Blocking Time explain causes (see TTFB, FCP and other metrics). Business metrics, like conversion and bounce rate, tell you whether speed work pays off. Use vitals as a compass, not a complete map.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which Core Web Vital measures visual stability?

    Cumulative Layout Shift scores unexpected movement of visible content.
  2. 2. What replaced First Input Delay as a Core Web Vital?

    INP looks at all interactions on a page and measures until the next frame is painted.
  3. 3. A page passes when each vital is good at which point?

    At least 75% of visits must meet the good threshold for the metric.
  4. 4. Which is a good LCP?

    2.5 seconds is the upper bound for good LCP. 0.1 is the CLS threshold.

Summary

  • The vitals are LCP (loading), INP (responsiveness) and CLS (stability).
  • Good thresholds: LCP 2.5 s, INP 200 ms, CLS 0.1, measured at p75 of real visits.
  • Each is observable with PerformanceObserver.
  • Vitals show experience; other metrics and traces explain the causes.

Next: Largest Contentful Paint