/ Performance / INP Optimization Guide: Master the Core Web Vital That Replaced FID
Performance 12 min read

INP Optimization Guide: Master the Core Web Vital That Replaced FID

Learn how to optimize Interaction to Next Paint for better Core Web Vitals scores. Complete INP optimization guide with code examples and tools.

Core Web Vitals dashboard showing INP performance metrics

You click a button on a website and nothing happens. You click again. Still nothing. Finally, after what feels like forever, the page responds. This frustrating experience is exactly what Interaction to Next Paint measures, and in 2025 it directly affects your Google rankings.

Quick Answer: INP measures how quickly your website responds to user interactions like clicks, taps, and keyboard inputs. The target is under 200 milliseconds. INP replaced First Input Delay as a Core Web Vital in March 2024 because it provides a more accurate picture of real-world responsiveness by measuring all interactions throughout a page session, not just the first one.

Key Takeaways:
  • INP target is under 200ms for a "good" score
  • INP replaced FID as a Core Web Vital in March 2024
  • Unlike FID, INP measures all interactions, not just the first
  • JavaScript execution is the primary cause of poor INP
  • Mobile INP optimization is critical for rankings
Why This Matters Now: Google uses mobile-first indexing, meaning your mobile Core Web Vitals scores directly impact rankings. Over 75% of web traffic comes from mobile devices where INP issues are more pronounced due to slower processors.

What Is Interaction to Next Paint?

Interaction to Next Paint measures the time from when a user interacts with your page until the browser displays visual feedback. This includes clicking buttons, tapping links, pressing keys, and any other user-initiated action.

JavaScript optimization and performance profiling visualization

The metric captures the entire interaction lifecycle. When a user clicks something, the browser must receive the input, process any JavaScript that responds to that interaction, update the DOM, and finally paint the visual change to the screen. INP measures this complete journey.

According to Google's official documentation, INP observes all interactions during a page visit and reports a value that represents the responsiveness of the page overall. For most sites, this reported value is the worst interaction, though pages with many interactions may report a high percentile value instead.

How INP Differs from FID

First Input Delay, which INP replaced, only measured the first interaction on a page. This created a significant gap in understanding actual user experience.

Consider a user who lands on a blog post. The first interaction might be a simple scroll, which responds instantly. But later, they click a complex form submit button that takes 500 milliseconds to respond. FID would show a great score while users experienced significant delays.

INP captures all interactions throughout the session. The worst interactions, the ones that frustrate users most, are what INP reports. This provides a much more accurate picture of how responsive your site actually feels.

Metric What It Measures Interaction Scope Replaced By
FID Input delay only First interaction only INP
INP Complete response time All interactions Current metric

INP Score Thresholds

Google defines clear thresholds for INP scores.

Good: 200 milliseconds or less. The page responds quickly enough that users perceive it as instant.

Needs Improvement: Between 200 and 500 milliseconds. Users notice the delay but may tolerate it.

Poor: Over 500 milliseconds. The page feels sluggish and unresponsive, damaging user experience and rankings.

These thresholds apply to the 75th percentile of interactions across all users. This means if 75% of your visitors experience interactions under 200ms, you pass. The remaining 25% can have slower interactions without failing the metric.

Why Does INP Matter for SEO?

INP directly affects your Google rankings as part of the Core Web Vitals assessment. Sites with poor INP scores face ranking disadvantages compared to competitors with better responsiveness.

Mobile user interaction with fast response time feedback

Beyond rankings, INP affects real business metrics. Research shows that slow responsiveness increases bounce rates, reduces conversions, and damages brand perception. Users who experience laggy interactions are less likely to complete purchases, sign up for services, or return to your site.

Mobile users are particularly sensitive to interaction delays. With over 75% of web traffic coming from mobile devices, poor mobile INP can devastate your traffic and conversions.

The Ranking Factor Reality

While Google has stated that content quality remains the most important ranking factor, Core Web Vitals provide tiebreaker signals when content quality is similar. In competitive niches, INP optimization can provide the edge needed to outrank competitors.

More importantly, the user experience benefits of good INP translate directly to better engagement signals. Users who have smooth interactions stay longer, click more, and convert better. These engagement signals indirectly support rankings.

What Causes Poor INP Scores?

Understanding the root causes of INP problems helps you target your optimization efforts effectively.

Long JavaScript Tasks

The most common cause of poor INP is JavaScript that blocks the main thread for too long. When a user clicks something, the browser cannot update the screen until JavaScript finishes executing. Long-running scripts create noticeable delays.

Tasks over 50 milliseconds are considered "long tasks" that can impact responsiveness. Complex JavaScript functions, synchronous operations, and poorly optimized code all contribute to long tasks.

Third-Party Scripts

Analytics, advertising, chat widgets, and other third-party scripts often cause INP problems. These scripts run code you do not control and may not be optimized for performance.

Third-party scripts are particularly problematic because they can unexpectedly block the main thread when users interact with your page. A user clicks your button, but a third-party script is running, so the response is delayed.

Excessive DOM Size

Pages with thousands of DOM elements require more processing for each interaction. The browser must traverse the DOM, apply style calculations, and determine what to repaint. Larger DOMs mean slower interactions.

Inefficient Event Handlers

Event handlers that perform too much work or trigger expensive operations cause interaction delays. Every click, tap, or key press fires event handlers, and slow handlers mean slow responses.

Layout Thrashing

When JavaScript reads layout properties and then immediately writes changes, it forces the browser to recalculate styles repeatedly. This "layout thrashing" blocks the main thread and delays visual feedback.

How Do You Measure INP?

Before optimizing, you need accurate INP measurements. Several tools provide this data.

Google Search Console

Search Console shows Core Web Vitals data for your entire site. The Core Web Vitals report identifies pages with INP issues and tracks improvement over time. This data comes from real users through Chrome User Experience Report.

PageSpeed Insights

PageSpeed Insights provides both lab and field INP data for specific URLs. Lab data shows potential issues on controlled test hardware. Field data shows real user experience from CrUX data when available.

Chrome DevTools

The Performance panel in Chrome DevTools lets you profile interactions and identify exactly what causes delays. Record an interaction, then analyze the flame chart to see where time is spent.

Web Vitals Extension

The Web Vitals Chrome extension shows real-time INP measurements as you interact with a page. This provides immediate feedback during development and testing.

DebugBear and Other Monitoring Tools

Commercial monitoring tools like DebugBear provide continuous INP monitoring with historical trends and alerts. These tools help catch regressions before they affect rankings.

How Do You Optimize INP?

Improving INP requires addressing the root causes of slow interactions. Here are proven optimization strategies.

Step 1: Identify Slow Interactions

Use Chrome DevTools Performance panel to record interactions and identify which ones are slow. Look for long tasks that block the main thread during interactions.

Click or tap elements on your page while recording. The flame chart will show exactly what code runs and how long each part takes.

Step 2: Break Up Long Tasks

JavaScript functions that run for more than 50 milliseconds should be broken into smaller chunks. Use techniques like setTimeout, requestIdleCallback, or scheduler.yield() to split work across multiple frames.

// Instead of one long function
function processAllItems(items) {
  items.forEach(item => expensiveOperation(item));
}

// Break into chunks with setTimeout
function processInChunks(items, chunkSize = 10) {
  let index = 0;

  function processChunk() {
    const chunk = items.slice(index, index + chunkSize);
    chunk.forEach(item => expensiveOperation(item));
    index += chunkSize;

    if (index < items.length) {
      setTimeout(processChunk, 0);
    }
  }

  processChunk();
}

Step 3: Optimize Event Handlers

Keep event handlers lean. Perform only essential work during the interaction and defer non-critical operations.

// Avoid heavy work in handlers
button.addEventListener('click', () => {
  // Show immediate feedback first
  button.classList.add('loading');

  // Defer heavy work
  requestIdleCallback(() => {
    performHeavyOperation();
  });
});

Step 4: Debounce and Throttle

For interactions that fire repeatedly like scrolling or typing, use debouncing or throttling to reduce handler execution frequency.

function debounce(func, wait) {
  let timeout;
  return function(...args) {
    clearTimeout(timeout);
    timeout = setTimeout(() => func.apply(this, args), wait);
  };
}

// Apply to scroll handlers
window.addEventListener('scroll', debounce(handleScroll, 100), { passive: true });

Step 5: Use Passive Event Listeners

For touch and scroll events, use passive listeners to allow browser optimizations. This signals that your handler will not call preventDefault().

element.addEventListener('touchstart', handler, { passive: true });
element.addEventListener('scroll', handler, { passive: true });

Step 6: Minimize Third-Party Impact

Audit third-party scripts and remove unnecessary ones. For essential scripts, consider loading them after critical content or using Web Workers to move execution off the main thread.

Use async or defer attributes on script tags. Consider self-hosting critical third-party resources for more control.

Step 7: Reduce DOM Size

Audit your page for unnecessary DOM elements. Remove hidden elements, flatten nested structures where possible, and use virtualization for long lists.

Target under 1,500 DOM elements for optimal performance. Pages with 5,000+ elements often struggle with INP.

Step 8: Use Web Workers

Move computationally expensive operations to Web Workers. Workers run in separate threads and do not block the main thread or user interactions.

// Main thread
const worker = new Worker('heavy-computation.js');
worker.postMessage(data);
worker.onmessage = (e) => {
  updateUI(e.data);
};

// heavy-computation.js
self.onmessage = (e) => {
  const result = expensiveComputation(e.data);
  self.postMessage(result);
};

Frequently Asked Questions

What is a good INP score?

A good INP score is 200 milliseconds or less at the 75th percentile. This means 75% of all interactions across your users should respond within 200ms. Scores between 200-500ms need improvement, and scores above 500ms are considered poor.

How does INP affect Google rankings?

INP is part of Core Web Vitals, which is a confirmed Google ranking factor. Poor INP scores can negatively impact rankings, especially on mobile where Google uses mobile-first indexing. The impact is typically a tiebreaker between otherwise equal pages.

Why did Google replace FID with INP?

FID only measured the first interaction, which often was not representative of actual user experience. INP measures all interactions throughout a page session, providing a more accurate picture of how responsive a page actually feels to users.

Can I pass INP with JavaScript-heavy sites?

Yes, but it requires careful optimization. Break long tasks into smaller chunks, use Web Workers for heavy computation, defer non-critical operations, and minimize main thread blocking. Many complex applications achieve good INP scores through proper optimization.

Does server response time affect INP?

Not directly. INP measures client-side interaction responsiveness after the page loads. However, slow server responses can indirectly affect INP if they delay JavaScript execution or cause layout shifts during interactions.

How often does Google measure INP?

Google collects INP data continuously from Chrome users who have opted into sharing metrics. This data is aggregated into the Chrome User Experience Report and typically updates monthly. Real-time monitoring requires additional tools.

Should I prioritize INP over LCP?

Both metrics matter. LCP affects first impressions when pages load. INP affects ongoing experience as users interact. For content-heavy sites, LCP may matter more. For interactive applications, INP may be more critical. Optimize both.

How do I test INP on mobile?

Use Chrome DevTools with device emulation, but test on real devices when possible. Mobile CPUs are slower than desktop, causing interactions that pass on desktop to fail on mobile. PageSpeed Insights provides mobile-specific INP data.

What tools show INP in real time?

The Web Vitals Chrome extension shows INP measurements in real time as you interact with pages. Chrome DevTools Performance panel also shows interaction timing during recording sessions.

Can CSS animations affect INP?

CSS animations generally do not affect INP because they run on the compositor thread. However, animations that trigger layout or paint can block the main thread and impact INP. Prefer transform and opacity animations.

Monitoring and Maintaining Good INP

INP optimization is not a one-time task. Regular monitoring catches regressions before they impact rankings or users.

Set up continuous monitoring with tools that track INP over time. Configure alerts for when scores degrade. Include INP checks in your deployment process to catch performance regressions before they reach production.

Review INP metrics monthly alongside other Core Web Vitals. Watch for seasonal patterns or traffic-related changes that might affect scores. Address issues promptly before they accumulate.

As you add features or third-party integrations, test their INP impact before deployment. New code can unexpectedly degrade responsiveness. Proactive testing prevents problems from reaching users.

Good INP requires ongoing attention, but the rewards are worth it. Sites that maintain excellent responsiveness enjoy better rankings, higher engagement, and more conversions. Make INP monitoring part of your regular site maintenance routine.