Scan a site
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Performance

Interaction to Next Paint (INP)

Published: · Updated:

Interaction to Next Paint (INP) measures page responsiveness: the time from a user interaction (a click, tap or key press) to the next paint in which the effect of that interaction becomes visible. A page's score is close to the worst latency observed during the entire visit.

In March 2024, INP replaced First Input Delay (FID) as a Core Web Vitals metric, because it measures the full cost of handling an interaction rather than just the delay in starting it. A good score is at most 200 ms at the 75th percentile.

The three phases of every interaction

  • Input delay — waiting for the main thread to be free to run the handler.
  • Processing time — executing the event handler code.
  • Presentation delay — recalculating layout and painting the next frame.

How to improve INP

The key is unblocking the main thread: breaking up long tasks (yielding), reducing and deferring JavaScript, avoiding unnecessary re-renders, and limiting expensive DOM operations inside event handlers.

Example

A heavy synchronous operation in a click handler blocks the main thread and delays the next paint. Breaking work into smaller chunks (yielding) lets the browser respond faster.

Hurts INP — synchronous loop in handler
JavaScript
button.addEventListener('click', () => {
  for (let i = 0; i < 50000; i++) {
    processItem(items[i]); // blocks the main thread
  }
  updateUI();
});
Better — task splitting (yield)
JavaScript
button.addEventListener('click', async () => {
  for (let i = 0; i < items.length; i++) {
    processItem(items[i]);
    if (i % 100 === 0) await new Promise(requestAnimationFrame);
  }
  updateUI();
});

Sources & further reading

Check your site performance

Insight measures Core Web Vitals and ranks bottlenecks by impact.

No credit card Report with date and sources No account required