# Core Web Vitals and Performance Metrics

> LCP, INP and CLS: what they measure, their thresholds, and how lab and field data differ. Free notes, key concepts, resources and a mini project.

Canonical: https://www.internhack.in/roadmaps/tracks/frontend/core-web-vitals
Last updated: 2026-11-28

LCP, INP and CLS: what they measure, their thresholds, and how lab and field data differ.

Intermediate · about 3 hours · difficulty 3/5

Learn first: [How Browsers Render a Page](https://www.internhack.in/roadmaps/tracks/frontend/browser-rendering), [The Event Loop](https://www.internhack.in/roadmaps/tracks/frontend/event-loop)

Performance is a feature: slow pages lose users, sales and search ranking. Google's **Core Web Vitals** give a shared vocabulary for the parts of speed users actually feel.

### The three Core Web Vitals

- **Largest Contentful Paint (LCP)**: when the biggest visible element (usually a hero image or heading) finishes rendering. Good: 2.5 s or less. Common causes of slowness: slow server response, render-blocking CSS and JS, a lazy-loaded or unoptimised hero image.
- **Interaction to Next Paint (INP)**: how quickly the page visually responds to clicks, taps and key presses throughout the visit. Good: 200 ms or less. Caused by long JavaScript tasks blocking the main thread.
- **Cumulative Layout Shift (CLS)**: how much content jumps around unexpectedly. Good: 0.1 or less. Caused by images without dimensions, late-loading ads or embeds, and web fonts swapping.

Supporting metrics: **TTFB** (server response time) and **FCP** (first paint of any content).

### Lab vs field data

- **Lab data** (Lighthouse, DevTools) runs a controlled test on one machine. Great for debugging, but it is not your users.
- **Field data** (real user monitoring, the Chrome UX Report shown in PageSpeed Insights, or the `web-vitals` library sending metrics to your analytics) reflects real devices and networks. Judge success by the **75th percentile** of field data.

### Budgets

Set a performance budget (for example LCP under 2.5 s on a mid-range phone on 4G, and under 200 KB of JavaScript for a landing page) and check it in CI so regressions are caught in review.

### Good enough to move on

You can explain each vital, name its typical causes, read a PageSpeed Insights report and collect field metrics from your own app with the web-vitals library.

## Key concepts

- **Largest Contentful Paint (LCP)**
- **Interaction to Next Paint (INP)**
- **Cumulative Layout Shift (CLS)**
- **TTFB and FCP**
- **Lab vs field data**
- **web-vitals library and RUM**
- **Performance budgets**

## Mini project

Add the web-vitals library to one of your deployed apps, log LCP, INP and CLS to the console or an analytics endpoint, and compare the numbers with a PageSpeed Insights run.

## Check yourself

Your Lighthouse score is 98 but field INP is poor. How can both be true?

## Free resources

- [Web Vitals](https://web.dev/articles/vitals) (web.dev)
- [Learn Performance](https://web.dev/learn/performance) (web.dev)
- [PageSpeed Insights](https://pagespeed.web.dev/) (Google)

Previous: [Screen Readers and Accessibility Testing](https://www.internhack.in/roadmaps/tracks/frontend/a11y-testing) · Next: [JavaScript Loading and Runtime Performance](https://www.internhack.in/roadmaps/tracks/frontend/javascript-performance)

## More in Web Performance

- [Core Web Vitals and Performance Metrics](https://www.internhack.in/roadmaps/tracks/frontend/core-web-vitals)
- [JavaScript Loading and Runtime Performance](https://www.internhack.in/roadmaps/tracks/frontend/javascript-performance)
- [Images, Fonts and Critical Rendering Path](https://www.internhack.in/roadmaps/tracks/frontend/asset-optimization)
- [HTTP Caching, Compression and CDNs](https://www.internhack.in/roadmaps/tracks/frontend/caching)
- [Profiling with Lighthouse and DevTools](https://www.internhack.in/roadmaps/tracks/frontend/performance-tooling)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Frontend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/frontend)
