Interaction to Next Paint (INP) measures how long a page takes to visibly respond after a click, tap or key press. It is one of the three Core Web Vitals, and it is the one most sites struggle with, because it depends on JavaScript that runs long after the page has loaded.
The thresholds
INP is reported at the 75th percentile of visits:
| INP | Rating |
|---|---|
| 200 ms or less | Good |
| 200 to 500 ms | Needs improvement |
| over 500 ms | Poor |
What INP actually measures
Each interaction has three parts:
- Input delay: the browser is busy with other work when the user clicks.
- Processing time: your event handlers run.
- Presentation delay: the browser recalculates styles, lays out and paints the result.
INP is roughly the slowest interaction of a visit. One sluggish button can ruin the score.
Step 1: find the slow interactions
Lab tools only test the interactions you think of. Start with real user data: which pages have poor INP, and on which devices? Mid-range Android phones are usually where problems show.
Then reproduce in Chrome DevTools: open the Performance panel, set CPU throttling to 4× or 6×, record, and click the slow element. Look for long yellow script blocks after the click.
You can also check a page quickly with the free INP test.
Step 2: shorten long tasks
The main thread can only do one thing at a time. Any task longer than 50 ms can delay an interaction.
- Break up work. Split long loops into chunks and yield between them:
async function processInChunks(items, handle) {
for (let i = 0; i < items.length; i++) {
handle(items[i]);
if (i % 50 === 0) await new Promise((r) => setTimeout(r, 0)); // let the browser respond
}
}
- Use
scheduler.yield()where supported for the same effect with better priority. - Defer non-urgent work with
requestIdleCallback(analytics, prefetching, logging).
Step 3: make event handlers do less
- Show feedback first, then do the heavy work: update the button state immediately and run the expensive part after the next frame.
- Avoid synchronous layout reads after writes (layout thrashing). Read all sizes first, then write.
- Debounce input handlers on search boxes and filters.
Step 4: reduce what the browser must render
- Keep the DOM small: thousands of nodes make every style recalculation slower. Virtualise long lists.
- Avoid animating properties that trigger layout; prefer
transformandopacity. - Use
content-visibility: autofor long off-screen sections.
Step 5: ship less JavaScript
- Remove unused libraries and polyfills.
- Split bundles by route and load heavy widgets (charts, editors, chat) only when needed.
- Audit third-party scripts: tag managers and chat widgets often cause the worst long tasks. Load them after the page is interactive.
Step 6: check frameworks for hydration cost
In React and similar frameworks, a big hydration task right after load blocks early clicks. Server components, partial hydration and smaller client components reduce it.
Measure the result in the field
Lab improvements do not always show up for real users. Track INP from real visits for a week after each change, by page and device. Real user monitoring shows INP per page and device, so you can see whether the fix worked for the people who had the problem.
A real-world example
A product listing page had an INP of 640 ms on mobile. The "Add to cart" button was the slowest interaction. Recording it with a 4× CPU slowdown showed one 520 ms task after each click:
- the click handler updated the cart;
- the whole product grid re-rendered because the cart lived in a shared state at the top of the page;
- an analytics script ran synchronously in the same task.
The fixes:
- moved the cart count into its own small component so only it re-rendered;
- showed the "Added" state immediately, then updated the server in the background;
- sent the analytics event with
requestIdleCallback.
The interaction dropped to about 90 ms, and the page's field INP went from 640 ms to 170 ms over the following two weeks.
Third-party scripts
Chat widgets, tag managers, A/B testing tools and ad scripts are frequent INP culprits because they attach their own listeners and run work on every interaction. For each one, ask:
- Does it need to load on every page?
- Can it load after the page is interactive, or on first user action?
- Is there a lighter alternative?
Removing or deferring one heavy script often helps more than any change to your own code.
What is a good INP score?
200 milliseconds or less at the 75th percentile of visits is good. Over 500 ms is poor.
What causes poor INP?
Mostly long JavaScript tasks on the main thread: heavy event handlers, large hydration work and third-party scripts, plus expensive rendering after the interaction.
Did INP replace FID?
Yes. INP replaced First Input Delay as a Core Web Vital in March 2024, because it measures all interactions, not just the first.
Try VitalRix free
Uptime monitoring, APM, logs, real user monitoring and status pages in one place. No credit card needed.