Web & Dev

Web Performance Metrics

Core Web Vitals and other timing metrics — targets and what they measure.

Core Web Vitals

MetricMeasuresGoodNeeds improvementPoor
LCP — Largest Contentful PaintWhen the biggest element renders≤ 2.5 s2.5 – 4 s> 4 s
INP — Interaction to Next PaintWorst interaction latency≤ 200 ms200 – 500 ms> 500 ms
CLS — Cumulative Layout ShiftUnexpected layout movement≤ 0.10.1 – 0.25> 0.25

Other timings

MetricWhat it measures
TTFB — Time to First ByteServer response time
FCP — First Contentful PaintFirst DOM render
TBT — Total Blocking TimeSum of long tasks blocking main thread
TTI — Time to InteractivePage becomes reliably interactive
Speed IndexHow quickly page content visually fills
First Input Delay (legacy)Replaced by INP in 2024

Measurement

  • Lab tests: Lighthouse, WebPageTest — repeatable, single run.
  • Field data (RUM): Chrome UX Report (CrUX), PerformanceObserver API — what real users experience.
  • Percentiles: 75th percentile of the metric is what Google reports for Core Web Vitals pass/fail.
  • Mobile vs desktop separate — mobile is typically the bottleneck.

Worked examples

Why the 75th percentile. Suppose ten page loads record these LCP values in seconds: 1.8, 2.0, 2.1, 2.2, 2.4, 2.6, 2.9, 3.4, 3.9 and 5.2. The median is (2.4 + 2.6) / 2 = 2.5 s, which looks good. The 75th percentile, by the nearest-rank method, is the 8th value in sorted order, 3.4 s, which falls in the “needs improvement” band. Core Web Vitals judge the 75th percentile because a page should work well for most visitors, not just the typical one.

How a layout shift is scored. Each shift scores impact fraction times distance fraction. If an element filling half the viewport slides down by a quarter of the viewport height, the affected area (before plus after) is 75 percent of the viewport, so the impact fraction is 0.75 and the distance fraction is 0.25. The score is 0.75 × 0.25 = 0.1875, which is already above the 0.1 “good” limit from a single shift. A late-loading banner or an image without width and height attributes can cause exactly this.

Common causes and fixes

  • Slow LCP: the hero image is large, loaded late or lazy-loaded. Do not lazy-load the largest above-the-fold image, size it correctly and serve a modern format.
  • Poor INP: long JavaScript tasks block the main thread. Split work into smaller chunks and defer scripts that are not needed for the first interaction.
  • High CLS: images, ads and embeds without reserved space, and web fonts that swap late. Set width and height, or an aspect ratio, and reserve the slot.
  • Slow TTFB: server or database latency; caching the page usually helps most.
  • Lab scores from one run on a fast laptop can look perfect while real mobile users on slower networks fail, so check field data when you can.
Was this article helpful?