What Is INP? How to Improve Interaction to Next Paint
What is INP, what is a good INP value and which interactions count? How to find slow interactions, read the three phases and reduce INP.
INP (Interaction to Next Paint) is a Core Web Vitals metric that measures how quickly a page gives visual feedback when a user clicks, taps or presses a key. In short, it answers the question “I clicked, so when did something change on screen?” According to Google, a good INP value is 200 milliseconds or less.[1] The practical side of what INP is comes down to this: first find the slow interaction, then shorten the longest of the three phases that make up its duration.
I covered the place of Core Web Vitals in technical SEO in my post on what technical SEO is, and the order for improving all three metrics in my guide to improving Core Web Vitals. I covered the loading side separately in what is LCP. This post focuses only on INP: how the metric is calculated, which interactions count, how to find a slow interaction and which code fixes work.
How is INP calculated?
INP is the duration of the slowest interaction observed during a visit; on pages with many interactions, extreme outliers are excluded. The browser calculates a latency for every click, tap and key press. When the visit ends, the longest of these is reported as the INP value.
There is one exception for pages with many interactions. According to the web.dev guide, one highest value is ignored for every 50 interactions.[1] The same guide notes that the vast majority of visits have fewer than 50 interactions, so the worst interaction is usually the one reported. The 75th percentile of all visits is then taken.
The duration of an interaction is measured from the moment the user gives input until the browser paints the frame that shows the result. This time is split into three phases:
- Input delay: The time from the user’s click until the event handler starts running. If the main thread is busy with something else, the click waits in line.
- Processing duration: The time during which event handlers such as
clickandkeydown, meaning the JavaScript tied to the interaction, run. - Presentation delay: The time after the handlers finish until the browser calculates styles, runs layout and paint, and draws the frame on screen.
The web.dev INP optimization guide explains that the sum of these three phases makes up the total latency of an interaction.[2] This split turns the diagnosis “INP is high” into the question “which phase is slow?”
Which interactions does INP measure?
INP measures only three types of interaction: mouse clicks, taps on a touchscreen and key presses on a physical or onscreen keyboard.[1] Other ways a user engages with the page are not counted. This rule directly tells you which code you need to examine.
Included in INP
- Mouse click
- Tap on a touchscreen
- Key press on a physical keyboard
- Key press on an onscreen keyboard
Not included in INP
- Scrolling with a mouse wheel or trackpad
- Hovering over an element
- Zooming
- A visit with no interaction at all
If a user opens the page and leaves without clicking, or only scrolls, no INP is reported for that visit.[1] That is why content-heavy blog pages have little INP data. Templates with heavy interaction, such as filters, forms, menus and carts, are where INP problems really show up.
What is the difference between INP and FID?
Unlike FID (First Input Delay), INP looks at every interaction during the visit and measures each interaction in full. FID measured only the input delay of the first interaction. However long the handler itself took, or however late the screen updated, FID did not see it.
Google announced on the Search Central blog in May 2023 that INP would join Core Web Vitals, and that the metric would be added to the Core Web Vitals report in Search Console.[5] As stated in the web.dev announcement, the change took effect on March 12, 2024. Since that date, FID is no longer part of Core Web Vitals.
What is a good INP value in milliseconds?
Short answer
What should INP be in milliseconds?
According to Google’s web.dev guide, an INP of 200 milliseconds or less shows that a page responds well. Between 200 and 500 milliseconds needs improvement, and above 500 milliseconds is considered poor. The assessment is made at the 75th percentile of page visits, with mobile and desktop evaluated separately.
- Good INP threshold
- ≤ 200 ms
- Needs improvement range
- 200-500 ms
- Poor INP
- > 500 ms
The 75th percentile means INP must stay under 200 milliseconds in at least 75 percent of visits.[1] A page that looks good on desktop can be poor on mid-range phones. Mobile processors run the same JavaScript more slowly, which lengthens all three phases.
How do you measure INP and find a slow interaction?
Short answer
How do you measure INP?
INP is measured with field data and diagnosed by reproducing it in the lab. Field data comes from real Chrome users and appears in Search Console and PageSpeed Insights. In the lab, you repeat the interaction by hand in Chrome DevTools and see which phase takes the longest.
- Find the URL group with an INP issue in the Search Console Core Web Vitals report
- Open a sample URL from the group in PageSpeed Insights and read the INP value in the field data
- List the most used interactions on the page: menu, filter, form, cart
- Repeat these interactions one by one in the Chrome DevTools Performance panel with mobile throttling
- Collect real user data with the attribution build of the web-vitals library
I always start measuring with field data, because it shows the problematic template. I explained how to read the report in Search Console in my post on how to use Google Search Console. Field data has one limit: it tells you which template is slow, but not which button is slow.
There is one thing to watch with lab tools. The standard Lighthouse test loads the page but clicks nothing, so it cannot produce INP. Total Blocking Time (TBT) in Lighthouse shows how much the main thread was blocked during loading and is a rough signal for INP. A low TBT does not guarantee that clicks after the page opens are fast.
The Chrome DevTools Performance panel closes this gap. When you record a trace and repeat the interaction, the interaction and the tasks running at that moment appear on the timeline. Recording with mobile CPU throttling reveals delays that do not show up on a powerful computer.
You can also see slow interactions in the console. The code below uses the Event Timing API to print interactions longer than 100 milliseconds:
// Paste into the console, then click and type on the page. Interactions over 100 ms are listed.
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
if (!entry.interactionId) continue; // real interactions only
console.log(entry.name, Math.round(entry.duration), 'ms', entry.target);
}
}).observe({ type: 'event', durationThreshold: 100, buffered: true });
The interactionId field shows whether the entry belongs to a user interaction. target gives the element where the interaction happened. This gets you to a concrete finding such as “the add to cart button takes 400 milliseconds.”
Finding the culprit script with Long Animation Frames
Once you find the slow interaction, the next question is which code slows it down. The Long Animation Frames API (LoAF) reports rendering frames longer than 50 milliseconds and the scripts that ran during them.[4] The report shows the script’s source file and the function that was called. This information separates whether the problem is in your own code or in a third-party tag.
To collect data from real users, I use Google’s open source web-vitals JavaScript library. The attribution build of the library gives the interaction element, the durations of the three phases and the related LoAF entries alongside the INP value. You can send these values through the dataLayer to Google Tag Manager, and from there to GA4 as event parameters.
What causes a high INP?
The cause of a high INP depends on which of the three phases takes the longest, but the common root of all three is long tasks that keep the main thread busy. According to web.dev, any task that keeps the main thread busy for more than 50 milliseconds is a long task.[3] While a long task runs, the browser cannot respond to user input.
| Long phase | Typical cause | Where to look first |
|---|---|---|
| Input delay | Scripts and timers running during load or in the background | Tag manager, analytics and chat scripts |
| Processing duration | Heavy event handlers, a large state update done all at once | Your own click and input handlers |
| Presentation delay | Large DOM, expensive style and layout calculation, redrawing many elements at once | DOM size, CSS selectors, client-side rendering |
The pairings in the table are based on the phase descriptions in web.dev’s INP optimization guide.[2] The same guide notes that rendering work grows as the DOM grows, and that while the relationship is not linear, a large DOM needs more work.[2]
How do you improve INP?
The main way to improve INP is to break up long tasks, do only the work the user needs to see right away in the event handler, and shrink rendering work. The techniques below target each of the three phases. I collected general code-level speed fixes separately in my post on page speed optimization.
Breaking up long tasks and yielding to the main thread
Splitting a long task into parts gives the browser a chance to handle user input between them. This technique is called yielding to the main thread. The web.dev guide recommends deferring part of the work to a new task with setTimeout, and using scheduler.yield() in browsers that support it.[3]
// Helper function that yields to the main thread.
function yieldToMain() {
if (globalThis.scheduler?.yield) return scheduler.yield();
return new Promise((resolve) => setTimeout(resolve, 0));
}
button.addEventListener('click', async () => {
showLoadingState(); // work the user must see right away
await yieldToMain(); // the browser can paint the frame here
updateCart(); // the main work
await yieldToMain();
sendAnalyticsEvent(); // non-urgent work goes last
});
With this structure, the user sees a loading state the moment they click. Non-urgent work such as an analytics event runs after the frame is painted. Processing duration gets shorter, and the user immediately sees that the page responded.
Doing only visible work in the handler
An event handler should make the change the user needs to see at that moment and defer the rest. Instead of running a filter on every keystroke in a search box, waiting briefly on the input (debounce) lowers processing duration. Updating the interface and re-sorting a large dataset in the same handler is one of the patterns that lengthens INP the most.
Shrinking the DOM and rendering work
To shorten presentation delay, you need to shrink the area the browser recalculates after each interaction. Paginating very long product lists or using virtualized lists, using the CSS content-visibility property for sections outside the viewport, and removing unnecessary wrapper elements all help. In React or similar frameworks, you also need to check that a single click does not re-render the whole page.
INP checklist
When I review a page’s INP, I check the items below in order. Each item is a state you can verify with a tool.
Conclusion
INP measures how quickly a page gives visual feedback to user interactions, and a good value is under 200 milliseconds. The way to fix the metric is to first find the slow interaction in field data, then shorten the longest of input delay, processing duration and presentation delay. In most cases, the solution is to break up long tasks and remove unnecessary JavaScript.
As a next step, measure your site’s most used interaction with the code above. If you want to review your technical setup together, take a look at my SEO services page, or see my background on the about page.
Key terms
- Input delay
- Input delay is an INP phase that shows the time between a user's click or key press and the moment the related event handler starts running. If the main thread is busy with another task at that moment, this time grows.
- Processing duration
- Processing duration is an INP phase that shows how long the event handlers tied to an interaction, such as click, keydown or pointerup callbacks, take to run. Heavy computation and unnecessary state updates make it longer.
- Presentation delay
- Presentation delay is an INP phase that shows the time between the event handlers finishing and the browser painting the next frame after style, layout and paint work. A large DOM and expensive rendering make it longer.
- Long Animation Frames API
- Long Animation Frames API (LoAF) is a browser API that reports rendering frames longer than 50 milliseconds and the scripts that ran during them. It is used to find which script and which source file a slow interaction comes from.
- FID
- FID (First Input Delay) is a former Core Web Vitals metric that measured only the input delay of a user's first interaction on a page and was replaced by INP in 2024. FID did not account for event handler time or the time to paint on screen.
Frequently asked questions
What should INP be in milliseconds?
According to Google's web.dev guide, an INP of 200 milliseconds or less is considered good. Between 200 and 500 milliseconds needs improvement, and above 500 milliseconds means poor responsiveness. The assessment is done separately for mobile and desktop, at the 75th percentile of page visits.
What is the difference between INP and FID?
FID only measured the input delay of the first interaction on a page. INP looks at every click, tap and key press during the visit and measures the whole interaction until the next frame is painted on screen. INP replaced FID as a Core Web Vitals metric on March 12, 2024.
Do scrolling and hovering affect INP?
No, INP does not measure scrolling, hovering or zooming. Only mouse clicks, taps on a touchscreen and key presses on a physical or onscreen keyboard count. If the user did none of these, no INP value is reported for that visit.
Does Lighthouse measure INP?
The standard Lighthouse page load test cannot measure INP, because the test has no real user interaction. In the lab, Total Blocking Time (TBT) is used as a rough proxy. For real INP you need Search Console, PageSpeed Insights field data or your own real user monitoring.
Why is INP high?
The most common cause of a high INP is JavaScript tasks that keep the main thread busy for a long time. Scripts running during page load lengthen input delay, heavy event handlers lengthen processing duration, and a large DOM and expensive rendering lengthen presentation delay. Third-party code added through a tag manager can affect all three phases.
Sources
The full topic: Technical SEO guide ↗